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

Daniel Pittman daniel at puppetlabs.com
Tue May 10 08:19:31 UTC 2011


The following commit has been merged in the experimental branch:
commit dda32647b4c11ecb352e469088f2438835ff99d7
Author: Daniel Pittman <daniel at puppetlabs.com>
Date:   Wed May 4 10:40:55 2011 -0700

    (#7353) Note the :for_humans compatibility issue.
    
    Where we need special support for :for_humans as an alias for :console, call
    it out in comments.  This makes it clear to someone who wonders why what the
    actual underlying purpose of the whole thing is.
    
    Reviewed-By: Jacob Helwig <jacob at puppetlabs.com>

diff --git a/lib/puppet/interface/action_builder.rb b/lib/puppet/interface/action_builder.rb
index 0bf4f14..1630553 100644
--- a/lib/puppet/interface/action_builder.rb
+++ b/lib/puppet/interface/action_builder.rb
@@ -38,6 +38,8 @@ class Puppet::Interface::ActionBuilder
   def render_as(value = nil)
     value.nil? and raise ArgumentError, "You must give a rendering format to render_as"
 
+    # :for_humans is a compatibility alias for :console, but since we shipped
+    # it in 2.7.0rc1 we need to support it ongoing. --daniel 2011-05-04
     formats = Puppet::Network::FormatHandler.formats << :for_humans
     unless formats.include? value
       raise ArgumentError, "#{value.inspect} is not a valid rendering format: #{formats.sort.join(", ")}"
diff --git a/spec/unit/interface/action_builder_spec.rb b/spec/unit/interface/action_builder_spec.rb
index e0d0ebe..89aef26 100755
--- a/spec/unit/interface/action_builder_spec.rb
+++ b/spec/unit/interface/action_builder_spec.rb
@@ -200,6 +200,8 @@ describe Puppet::Interface::ActionBuilder do
       end
     end
 
+    # :for_humans is an alias for :console, and deprecated, but since we
+    # shipped it in 2.7.0rc1 we need to support it. --daniel 2011-05-04
     it "should accept :for_humans format" do
       action = Puppet::Interface::ActionBuilder.build(face, :foo) do
         when_invoked do true end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list