meskyanichi/backup — pull request #266 by cknoxrun (2012-01-26 23:25:34+00:00)
Title: Added ability to dump all databases for MySQL.

Currently, if you want to dump all databases, you need to look through your database table similar to:

```ruby
client = Mysql2::Client.new(options)
results = client.query("SHOW DATABASES")
results.collect { |row| row['Database'] }
```

Here I have added an option (for MySQL only at present) to specify you want to dump all databases:

```ruby
database MySQL do |database|
database.username = 'my_username'
database.password = 'my_password'
database.all = true
database.additional_options = ['--single-transaction', '--quick']
end
```

This will pass the ```--all-databases``` option to mysqldump.

Options ```db.skip_tables``` and ```db.only_tables``` are ignored if ```db.all = true``` (for now, I guess you could still ignore tables but the database name would need to be specified which added an extra layer of complexity for something people may not be interested in if they are dumping all databases).

I added rspec tests, but please note I am new to rspec. All tests pass.

Thanks,
Craig