diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-09-11 06:15:08 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-09-11 06:15:08 -0700 |
commit | 616ba15f2cb89588ae3b0a55452f4059f2c118b1 (patch) | |
tree | caa57dc4ba1f070cae6e8325a72799af06baaa68 | |
parent | 829566355818cf40f3aafda70e429670483ba9a3 (diff) | |
parent | 844ea9c07e0291701215c061985652bfad097a23 (diff) | |
download | rails-616ba15f2cb89588ae3b0a55452f4059f2c118b1.tar.gz rails-616ba15f2cb89588ae3b0a55452f4059f2c118b1.tar.bz2 rails-616ba15f2cb89588ae3b0a55452f4059f2c118b1.zip |
Merge pull request #7488 from needfeed/master
Have rails dbconsole pass sslca to the mysql command line client.
-rw-r--r-- | railties/CHANGELOG.md | 3 | ||||
-rw-r--r-- | railties/lib/rails/commands/dbconsole.rb | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index b42ef8e14a..e889f0c23c 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,5 +1,8 @@ ## Rails 4.0.0 (unreleased) ## +* rails dbconsole now can use SSL for MySQL. The database.yml options sslca, sslcert, sslcapath, sslcipher, + and sslkey now affect rails dbconsole. *Jim Kingdon and Lars Petrus* + * Correctly handle SCRIPT_NAME when generating routes to engine in application that's mounted at a sub-uri. With this behavior, you *should not* use default_url_options[:script_name] to set proper application's mount point by diff --git a/railties/lib/rails/commands/dbconsole.rb b/railties/lib/rails/commands/dbconsole.rb index cc0552184a..c84fa832f5 100644 --- a/railties/lib/rails/commands/dbconsole.rb +++ b/railties/lib/rails/commands/dbconsole.rb @@ -26,7 +26,12 @@ module Rails 'port' => '--port', 'socket' => '--socket', 'username' => '--user', - 'encoding' => '--default-character-set' + 'encoding' => '--default-character-set', + 'sslca' => '--ssl-ca', + 'sslcert' => '--ssl-cert', + 'sslcapath' => '--ssl-capath', + 'sslcipher' => '--ssh-cipher', + 'sslkey' => '--ssl-key' }.map { |opt, arg| "#{arg}=#{config[opt]}" if config[opt] }.compact if config['password'] && options['include_password'] |