diff options
author | James Turnbull <james@lovedthanlost.net> | 2010-01-13 08:07:30 +1100 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2010-01-13 08:07:30 +1100 |
commit | b6f90dfcd96123c245b6f5fd93753790006387c0 (patch) | |
tree | 1668fd8ed480dc0d0cb49c4a3d7f8a13c77dbeb9 /lib/puppet/rails.rb | |
parent | e26e8319186c57a41ea7ca58b0e8e853e9b452e3 (diff) | |
parent | f7e14356ad7781fafa52a459d3c24372fa6c0900 (diff) | |
download | puppet-b6f90dfcd96123c245b6f5fd93753790006387c0.tar.gz puppet-b6f90dfcd96123c245b6f5fd93753790006387c0.tar.xz puppet-b6f90dfcd96123c245b6f5fd93753790006387c0.zip |
Merge branch '0.25.x'
Conflicts:
lib/puppet/ssl/host.rb
spec/spec_helper.rb
Diffstat (limited to 'lib/puppet/rails.rb')
-rw-r--r-- | lib/puppet/rails.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/puppet/rails.rb b/lib/puppet/rails.rb index 34ca58c5a..1e02408b8 100644 --- a/lib/puppet/rails.rb +++ b/lib/puppet/rails.rb @@ -29,7 +29,9 @@ module Puppet::Rails ActiveRecord::Base.verify_active_connections! begin - ActiveRecord::Base.establish_connection(database_arguments()) + args = database_arguments + Puppet.info "Connecting to #{args[:adapter]} database: #{args[:database]}" + ActiveRecord::Base.establish_connection(args) rescue => detail if Puppet[:trace] puts detail.backtrace @@ -46,12 +48,13 @@ module Puppet::Rails case adapter when "sqlite3" - args[:dbfile] = Puppet[:dblocation] + args[:database] = Puppet[:dblocation] when "mysql", "postgresql" args[:host] = Puppet[:dbserver] unless Puppet[:dbserver].empty? args[:username] = Puppet[:dbuser] unless Puppet[:dbuser].empty? args[:password] = Puppet[:dbpassword] unless Puppet[:dbpassword].empty? args[:database] = Puppet[:dbname] + args[:reconnect]= true socket = Puppet[:dbsocket] args[:socket] = socket unless socket.empty? |