diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/defaults.rb | 2 | ||||
-rw-r--r-- | lib/puppet/rails.rb | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb index 72b1af188..b8437fe29 100644 --- a/lib/puppet/defaults.rb +++ b/lib/puppet/defaults.rb @@ -663,6 +663,8 @@ module Puppet used when networked databases are used."], :dbpassword => [ "puppet", "The database password for caching. Only used when networked databases are used."], + :dbconnections => [ '', "The number of database connections for networked + databases. Will be ignored unless the value is a positive integer."], :dbsocket => [ "", "The database socket location. Only used when networked databases are used. Will be ignored if the value is an empty string."], :railslog => {:default => "$logdir/rails.log", diff --git a/lib/puppet/rails.rb b/lib/puppet/rails.rb index 44e7a8343..74805bb6f 100644 --- a/lib/puppet/rails.rb +++ b/lib/puppet/rails.rb @@ -52,6 +52,7 @@ module Puppet::Rails args[:port] = Puppet[:dbport] unless Puppet[:dbport].to_s.empty? args[:username] = Puppet[:dbuser] unless Puppet[:dbuser].to_s.empty? args[:password] = Puppet[:dbpassword] unless Puppet[:dbpassword].to_s.empty? + args[:pool] = Puppet[:dbconnections].to_i unless Puppet[:dbconnections].to_i <= 0 args[:database] = Puppet[:dbname] args[:reconnect]= true @@ -61,6 +62,7 @@ module Puppet::Rails args[:database] = Puppet[:dbname] unless Puppet[:dbname].to_s.empty? args[:username] = Puppet[:dbuser] unless Puppet[:dbuser].to_s.empty? args[:password] = Puppet[:dbpassword] unless Puppet[:dbpassword].to_s.empty? + args[:pool] = Puppet[:dbconnections].to_i unless Puppet[:dbconnections].to_i <= 0 else raise ArgumentError, "Invalid db adapter #{adapter}" end |