Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryotarai/infrataster-plugin-mysql
MySQL plugin for Infrataster
https://github.com/ryotarai/infrataster-plugin-mysql
Last synced: 2 months ago
JSON representation
MySQL plugin for Infrataster
- Host: GitHub
- URL: https://github.com/ryotarai/infrataster-plugin-mysql
- Owner: ryotarai
- License: mit
- Created: 2014-05-06T13:00:10.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-05-10T10:02:46.000Z (over 7 years ago)
- Last Synced: 2024-10-06T03:51:17.674Z (3 months ago)
- Language: Ruby
- Size: 14.6 KB
- Stars: 5
- Watchers: 6
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# infrataster-plugin-mysql
[![Gem Version](https://badge.fury.io/rb/infrataster-plugin-mysql.png)](http://badge.fury.io/rb/infrataster-plugin-mysql)MySQL plugin for [Infrataster](https://github.com/ryotarai/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
```ruby
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`:
```ruby
Infrataster::Server.define(
# ...
mysql: {user: 'app', password: 'app', database: 'myapp'}
)
```## Contributing
1. Fork it ( https://github.com/[my-github-username]/infrataster-plugin-mysql/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request