[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:10:32 UTC 2011


The following commit has been merged in the experimental branch:
commit 1400fec62e4e692badc5b68eb7d6d947997d7204
Author: Daniel Pittman <daniel at puppetlabs.com>
Date:   Fri Apr 1 13:10:42 2011 -0700

    MAINT: nicer to_s for actions, for user-focused rendering.
    
    This makes it possible for us to just print the Action object directly and get
    a human-focused output string.
    
    Reviewed-By: Pieter van de Bruggen <pieter at puppetlabs.com>

diff --git a/lib/puppet/string/action.rb b/lib/puppet/string/action.rb
index 4db9e97..5a7f3f2 100644
--- a/lib/puppet/string/action.rb
+++ b/lib/puppet/string/action.rb
@@ -3,6 +3,10 @@ require 'puppet/string'
 class Puppet::String::Action
   attr_reader :name
 
+  def to_s
+    "#{@string}##{@name}"
+  end
+
   def initialize(string, name, attrs = {})
     name = name.to_s
     raise "'#{name}' is an invalid action name" unless name =~ /^[a-z]\w*$/

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list