[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:08:29 UTC 2011


The following commit has been merged in the experimental branch:
commit 88aeb04a50d8997b5e1e0ed7a5a2239508b174ee
Author: Daniel Pittman <daniel at puppetlabs.com>
Date:   Fri Mar 25 10:38:40 2011 -0700

    MAINT: fix the misordered invocations in action.
    
    When initializing we need to set the name and interface before we do anything
    else, since the reasonable assumption for users is that those invariants are
    there when their setter is called.
    
    This allows someone to override the interface or name by misusing the call to
    new, but they could already screw up by passing the wrong values, so whatever.

diff --git a/lib/puppet/interface/action.rb b/lib/puppet/interface/action.rb
index 1c19bd0..1a5730d 100644
--- a/lib/puppet/interface/action.rb
+++ b/lib/puppet/interface/action.rb
@@ -7,9 +7,9 @@ class Puppet::Interface::Action
     name = name.to_s
     raise "'#{name}' is an invalid action name" unless name =~ /^[a-z]\w*$/
 
-    attrs.each do |k,v| send("#{k}=", v) end
     @interface = interface
-    @name = name
+    @name      = name
+    attrs.each do |k,v| send("#{k}=", v) end
   end
 
   def invoke(*args, &block)

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list