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

Luke Kanies luke at puppetlabs.com
Tue May 10 08:08:19 UTC 2011


The following commit has been merged in the experimental branch:
commit 53b0656048c3227048bdc317c5e917ad0c39e850
Author: Luke Kanies <luke at puppetlabs.com>
Date:   Fri Mar 25 08:55:24 2011 -0700

    Config#print action always returns nil
    
    We were returning 'true', which was getting printed
    unnecessarily.
    
    Signed-off-by: Luke Kanies <luke at puppetlabs.com>

diff --git a/lib/puppet/interface/v0.0.1/config.rb b/lib/puppet/interface/v0.0.1/config.rb
index b33e19b..7b74ce5 100644
--- a/lib/puppet/interface/v0.0.1/config.rb
+++ b/lib/puppet/interface/v0.0.1/config.rb
@@ -5,6 +5,7 @@ Puppet::Interface.define(:config, '0.0.1') do
     invoke do |*args|
       Puppet.settings[:configprint] = args.join(",")
       Puppet.settings.print_config_options
+      nil
     end
   end
 end
diff --git a/spec/unit/interface/config_spec.rb b/spec/unit/interface/config_spec.rb
index a2ec7b5..2e82b0b 100644
--- a/spec/unit/interface/config_spec.rb
+++ b/spec/unit/interface/config_spec.rb
@@ -15,4 +15,10 @@ describe Puppet::Interface.define(:config, '0.0.1') do
     subject.print("libdir", "ssldir")
     Puppet.settings[:configprint].should == "libdir,ssldir"
   end
+
+  it "should always return nil" do
+    Puppet.settings.stubs(:puts)
+    Puppet.settings.expects(:print_config_options)
+    subject.print("libdir").should be_nil
+  end
 end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list