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

Matt Robinson matt at puppetlabs.com
Tue May 10 08:06:43 UTC 2011


The following commit has been merged in the experimental branch:
commit 66a4f361502864e8ea6ca3a11181851b7c313664
Author: James Turnbull <james at lovedthanlost.net>
Date:   Thu Mar 3 06:54:19 2011 +1100

    Fixed #6555 - Ruby 1.9.x warning: class variable access from toplevel
    
    This came from the use of the @@colormap class variable.
    
    The variables has been changed to a constant.

diff --git a/lib/puppet/util/log/destinations.rb b/lib/puppet/util/log/destinations.rb
index dd0d996..9550e2c 100644
--- a/lib/puppet/util/log/destinations.rb
+++ b/lib/puppet/util/log/destinations.rb
@@ -96,7 +96,7 @@ Puppet::Util::Log.newdesttype :console do
   HWHITE  = {:console => "", :html => "FFFFFF"}
   RESET   = {:console => "",    :html => ""      }
 
-  @@colormap = {
+  Colormap = {
     :debug => WHITE,
     :info => GREEN,
     :notice => CYAN,
@@ -117,11 +117,11 @@ Puppet::Util::Log.newdesttype :console do
   end
 
   def console_color(level, str)
-    @@colormap[level][:console] + str + RESET[:console]
+    Colormap[level][:console] + str + RESET[:console]
   end
 
   def html_color(level, str)
-    %{<span style="color: %s">%s</span>} % [@@colormap[level][:html], str]
+    %{<span style="color: %s">%s</span>} % [Colormap[level][:html], str]
   end
 
   def initialize

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list