[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35

Markus Roberts Markus at reality.com
Wed Jul 14 10:36:56 UTC 2010


The following commit has been merged in the upstream branch:
commit cea2e5b3fe03de8ef56a97af25ef8b6dd7eb3d7d
Author: Jesse Wolfe <jes5199 at gmail.com>
Date:   Thu Jul 8 23:24:50 2010 -0700

    [#3582] Remove assumption that Puppet.settings would return values of a consistent type
    
    Currently, we cannot trust Puppet::Util::Settings to return values of
    any particular type for a given setting.
    This patch makes sure that we explicitly cast to string when checking for
    empty values.

diff --git a/lib/puppet/rails.rb b/lib/puppet/rails.rb
index c0eedfc..532be1e 100644
--- a/lib/puppet/rails.rb
+++ b/lib/puppet/rails.rb
@@ -50,22 +50,22 @@ module Puppet::Rails
         when "sqlite3"
             args[:database] = Puppet[:dblocation]
         when "mysql", "postgresql"
-            args[:host]     = Puppet[:dbserver] unless Puppet[:dbserver].empty?
-            args[:port]     = Puppet[:dbport] unless Puppet[:dbport].empty?
-            args[:username] = Puppet[:dbuser] unless Puppet[:dbuser].empty?
-            args[:password] = Puppet[:dbpassword] unless Puppet[:dbpassword].empty?
+            args[:host]     = Puppet[:dbserver] unless Puppet[:dbserver].to_s.empty?
+            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[:database] = Puppet[:dbname]
             args[:reconnect]= true
 
             socket          = Puppet[:dbsocket]
-            args[:socket]   = socket unless socket.empty?
+            args[:socket]   = socket unless socket.to_s.empty?
 	        
             connections     = Puppet[:dbconnections].to_i
             args[:pool]     = connections if connections > 0 
         when "oracle_enhanced":
-	        args[:database] = Puppet[:dbname] unless Puppet[:dbname].empty?
-	        args[:username] = Puppet[:dbuser] unless Puppet[:dbuser].empty?
-	        args[:password] = Puppet[:dbpassword] unless Puppet[:dbpassword].empty?
+	        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?
 
             connections     = Puppet[:dbconnections].to_i
             args[:pool]     = connections if connections > 0

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list