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

test branch puppet-dev at googlegroups.com
Wed Jul 14 10:31:13 UTC 2010


The following commit has been merged in the upstream branch:
commit fdefb646e722207c57fee9decf4e22fa582a072d
Author: Luke Kanies <luke at reductivelabs.com>
Date:   Tue Mar 23 10:30:32 2010 -0700

    Fixing "require" function to use new class interface
    
    Signed-off-by: Luke Kanies <luke at reductivelabs.com>

diff --git a/lib/puppet/parser/functions/require.rb b/lib/puppet/parser/functions/require.rb
index f634f9f..66d60b9 100644
--- a/lib/puppet/parser/functions/require.rb
+++ b/lib/puppet/parser/functions/require.rb
@@ -39,7 +39,7 @@ fail if used with earlier clients.
         vals.each do |klass|
             # lookup the class in the scopes
             if classobj = find_hostclass(klass)
-                klass = classobj.classname
+                klass = classobj.name
             else
                 raise Puppet::ParseError, "Could not find class %s" % klass
             end
diff --git a/spec/unit/parser/functions/require.rb b/spec/unit/parser/functions/require.rb
index 4e05069..924990a 100755
--- a/spec/unit/parser/functions/require.rb
+++ b/spec/unit/parser/functions/require.rb
@@ -13,7 +13,7 @@ describe "the require function" do
         @scope.stubs(:resource).returns @resource
         @scope.stubs(:findresource)
         @scope.stubs(:compiler).returns(@compiler)
-        @klass = stub 'class', :classname => "myclass"
+        @klass = stub 'class', :name => "myclass"
         @scope.stubs(:find_hostclass).returns(@klass)
     end
 
@@ -52,7 +52,7 @@ describe "the require function" do
         @scope.stubs(:function_include)
 
         @scope.expects(:find_hostclass).with("myclass").returns(@klass)
-        @klass.expects(:classname).returns("myclass")
+        @klass.expects(:name).returns("myclass")
 
         @scope.function_require("myclass")
     end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list