[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:32:08 UTC 2010


The following commit has been merged in the upstream branch:
commit 90607662c36aa4b5a055c3e68cd52c030ff08f98
Author: Luke Kanies <luke at reductivelabs.com>
Date:   Fri Jan 8 16:04:23 2010 -0800

    s/DSL::ResourceHelper/DSL::ResourceAPI/g
    
    Signed-off-by: Luke Kanies <luke at reductivelabs.com>

diff --git a/lib/puppet/dsl.rb b/lib/puppet/dsl.rb
index 93cf0fb..28f4a7e 100644
--- a/lib/puppet/dsl.rb
+++ b/lib/puppet/dsl.rb
@@ -4,7 +4,7 @@ module Puppet::DSL
 end
 
 require 'puppet/dsl/resource_type_api'
-require 'puppet/dsl/resource_helper'
+require 'puppet/dsl/resource_api'
 
 class Object
     include Puppet::DSL::ResourceTypeAPI
diff --git a/lib/puppet/dsl/resource_helper.rb b/lib/puppet/dsl/resource_api.rb
similarity index 98%
rename from lib/puppet/dsl/resource_helper.rb
rename to lib/puppet/dsl/resource_api.rb
index aaf8ab5..d4f623b 100644
--- a/lib/puppet/dsl/resource_helper.rb
+++ b/lib/puppet/dsl/resource_api.rb
@@ -3,7 +3,7 @@
 # hooking into the scope system.
 require 'puppet/resource/type_collection_helper'
 
-module Puppet::DSL::ResourceHelper
+module Puppet::DSL::ResourceAPI
     include Puppet::Resource::TypeCollectionHelper
 
     FUNCTION_MAP = {:acquire => :include}
diff --git a/lib/puppet/resource/type.rb b/lib/puppet/resource/type.rb
index fa5fd5c..2acb990 100644
--- a/lib/puppet/resource/type.rb
+++ b/lib/puppet/resource/type.rb
@@ -220,7 +220,7 @@ class Puppet::Resource::Type
     end
 
     def evaluate_ruby_code(resource, scope)
-        resource.extend(Puppet::DSL::ResourceHelper)
+        resource.extend(Puppet::DSL::ResourceAPI)
 
         resource.set_instance_variables
 
diff --git a/spec/unit/dsl/resource_helper.rb b/spec/unit/dsl/resource_api.rb
similarity index 95%
rename from spec/unit/dsl/resource_helper.rb
rename to spec/unit/dsl/resource_api.rb
index 11dad40..11ea500 100755
--- a/spec/unit/dsl/resource_helper.rb
+++ b/spec/unit/dsl/resource_api.rb
@@ -2,22 +2,22 @@
 
 require File.dirname(__FILE__) + '/../../spec_helper'
 
-require 'puppet/dsl/resource_helper'
+require 'puppet/dsl/resource_api'
 
-class DSLResourceHelperTester
-    include Puppet::DSL::ResourceHelper
+class DSLResourceAPITester
+    include Puppet::DSL::ResourceAPI
 end
 
-describe Puppet::DSL::ResourceHelper do
+describe Puppet::DSL::ResourceAPI do
     before do
         @resource = Puppet::Parser::Resource.new(:type => :mytype, :title => "myresource", :scope => mock("scope"), :source => mock("source"))
         class << @resource
-            include Puppet::DSL::ResourceHelper
+            include Puppet::DSL::ResourceAPI
         end
     end
 
     it "should include the resource type collection helper" do
-        Puppet::DSL::ResourceHelper.ancestors.should be_include(Puppet::Resource::TypeCollectionHelper)
+        Puppet::DSL::ResourceAPI.ancestors.should be_include(Puppet::Resource::TypeCollectionHelper)
     end
 
     it "should be able to set all of its parameters as instance variables" do
diff --git a/spec/unit/resource/type.rb b/spec/unit/resource/type.rb
index bb37217..d623eca 100755
--- a/spec/unit/resource/type.rb
+++ b/spec/unit/resource/type.rb
@@ -387,7 +387,7 @@ describe Puppet::Resource::Type do
             it "should include the DSL Resource Helper module in the provided resource" do
                 @type.evaluate_code(@resource)
 
-                @resource.metaclass.ancestors.should be_include(Puppet::DSL::ResourceHelper)
+                @resource.metaclass.ancestors.should be_include(Puppet::DSL::ResourceAPI)
             end
 
             it "should convert the resource's parameters to instance variables" do

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list