🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

infrataster-plugin-mysql

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

infrataster-plugin-mysql

0.2.1
Rubygems
Version published
Maintainers
1
Created
Source

infrataster-plugin-mysql

Gem Version

MySQL plugin for Infrataster

Installation

Add this line to your Gemfile:

gem 'infrataster-plugin-mysql'

And then add the following line to your spec_helper.rb:

require 'infrataster-plugin-mysql'

Usage

describe server(:db) do
  describe mysql_query('SHOW STATUS') do
    it 'returns positive uptime' do
      row = results.find {|r| r['Variable_name'] == 'Uptime' }
      expect(row['Value'].to_i).to be > 0

      # `results` is an instance of `Mysql2::Result`
      # See: https://github.com/brianmario/mysql2
    end
  end
end

You can specify username, password and database by options passed to Infrataster::Server.define:

Infrataster::Server.define(
  # ...
  mysql: {user: 'app', password: 'app', database: 'myapp'}
)

Contributing

FAQs

Package last updated on 20 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts