[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5

Jesse Wolfe jes5199 at gmail.com
Tue May 10 07:59:08 UTC 2011


The following commit has been merged in the experimental branch:
commit 9e72ccd8ff087d0cf4a1396401e3843311b4e6d4
Merge: 1d93c4dd86181eb2663dd8df2e84719c2e1ffcdf efa834aaec596b0d5e7b314a53e6b258ce44728c
Author: Jesse Wolfe <jes5199 at gmail.com>
Date:   Mon Sep 13 23:00:35 2010 -0700

    Merge commit '2.6.1rc4' into next

diff --combined lib/puppet/resource/type.rb
index b71eb55,1d378aa..c9ff323
--- a/lib/puppet/resource/type.rb
+++ b/lib/puppet/resource/type.rb
@@@ -13,8 -13,8 +13,8 @@@ class Puppet::Resource::Typ
  
    RESOURCE_SUPERTYPES = [:hostclass, :node, :definition]
  
 -  attr_accessor :file, :line, :doc, :code, :ruby_code, :parent, :resource_type_collection, :module_name
 -  attr_reader :type, :namespace, :arguments, :behaves_like
 +  attr_accessor :file, :line, :doc, :code, :ruby_code, :parent, :resource_type_collection
 +  attr_reader :type, :namespace, :arguments, :behaves_like, :module_name
  
    RESOURCE_SUPERTYPES.each do |t|
      define_method("#{t}?") { self.type == t }
@@@ -92,8 -92,6 +92,8 @@@
      end
  
      set_arguments(options[:arguments])
 +
 +    @module_name = options[:module_name]
    end
  
    # This is only used for node names, and really only when the node name
@@@ -236,7 -234,7 +236,7 @@@
      end
  
      scope.setvar("title", resource.title) unless set.include? :title
-     scope.setvar("name", resource.name) unless set.include? :name
+     scope.setvar("name", resource.name.to_s.downcase) unless set.include? :name
      scope.setvar("module_name", module_name) if module_name and ! set.include? :module_name
  
      if caller_name = scope.parent_module_name and ! set.include?(:caller_module_name)
diff --combined spec/unit/application/apply_spec.rb
index b073d1a,85098f4..edb41b5
--- a/spec/unit/application/apply_spec.rb
+++ b/spec/unit/application/apply_spec.rb
@@@ -142,16 -142,17 +142,16 @@@ describe Puppet::Application::Apply d
  
      describe "the parseonly command" do
        before :each do
 -        Puppet.stubs(:[]).with(:environment)
 +        @environment = Puppet::Node::Environment.new("env")
 +        Puppet.stubs(:[]).with(:environment).returns(@environment)
          Puppet.stubs(:[]).with(:manifest).returns("site.pp")
          Puppet.stubs(:err)
          @apply.stubs(:exit)
          @apply.options.stubs(:[]).with(:code).returns "some code"
 -        @collection = stub_everything
 -        Puppet::Resource::TypeCollection.stubs(:new).returns(@collection)
        end
  
 -      it "should use a Puppet Resource Type Collection to parse the file" do
 -        @collection.expects(:perform_initial_import)
 +      it "should use the environment to parse the file" do
 +        @environment.stubs(:perform_initial_import)
          @apply.parseonly
        end
  
@@@ -161,7 -162,7 +161,7 @@@
        end
  
        it "should exit with exit code 1 if error" do
 -        @collection.stubs(:perform_initial_import).raises(Puppet::ParseError)
 +        @environment.stubs(:perform_initial_import).raises(Puppet::ParseError)
          @apply.expects(:exit).with(1)
          @apply.parseonly
        end
@@@ -311,7 -312,7 +311,7 @@@
        end
  
        it "should apply the catalog" do
-         @catalog.expects(:apply)
+         @catalog.expects(:apply).returns(stub_everything 'transaction')
  
          @apply.main
        end
diff --combined spec/unit/application/master_spec.rb
index d230213,216c7dc..e657445
--- a/spec/unit/application/master_spec.rb
+++ b/spec/unit/application/master_spec.rb
@@@ -23,7 -23,7 +23,7 @@@ describe Puppet::Application::Master d
    end
  
    it "should operate in master run_mode" do
-     @master.class.run_mode.name.should equal :master
+     @master.class.run_mode.name.should equal(:master)
    end
  
    it "should ask Puppet::Application to parse Puppet configuration file" do
@@@ -257,15 -257,16 +257,15 @@@
  
      describe "the parseonly command" do
        before :each do
 -        Puppet.stubs(:[]).with(:environment)
 +        @environment = Puppet::Node::Environment.new("env")
 +        Puppet.stubs(:[]).with(:environment).returns(@environment)
          Puppet.stubs(:[]).with(:manifest).returns("site.pp")
          Puppet.stubs(:err)
          @master.stubs(:exit)
        end
  
        it "should use a Puppet Resource Type Collection to parse the file" do
 -        @collection.expects(:perform_initial_import)
 +        @environment.expects(:perform_initial_import)
          @master.parseonly
        end
  
@@@ -275,7 -276,7 +275,7 @@@
        end
  
        it "should exit with exit code 1 if error" do
 -        @collection.stubs(:perform_initial_import).raises(Puppet::ParseError)
 +        @environment.stubs(:perform_initial_import).raises(Puppet::ParseError)
          @master.expects(:exit).with(1)
          @master.parseonly
        end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list