diff options
author | needfeed <dev@needfeed.com> | 2012-09-10 12:36:49 -0700 |
---|---|---|
committer | needfeed <dev@needfeed.com> | 2012-09-10 12:36:49 -0700 |
commit | 844ea9c07e0291701215c061985652bfad097a23 (patch) | |
tree | 907f7af768db7357cee72c385fcf64b5d0f95f7a | |
parent | 416884c36d1eb2f0a607ba9a54dbe39773a92f6e (diff) | |
download | rails-844ea9c07e0291701215c061985652bfad097a23.tar.gz rails-844ea9c07e0291701215c061985652bfad097a23.tar.bz2 rails-844ea9c07e0291701215c061985652bfad097a23.zip |
Support MySQL SSL in rails dbconsole.
-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'] |