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

Nick Lewis nick at puppetlabs.com
Tue May 10 08:12:50 UTC 2011


The following commit has been merged in the experimental branch:
commit f6fb193078c497476326ee80827e1585ae26603c
Author: Nick Lewis <nick at puppetlabs.com>
Date:   Tue Apr 12 13:05:54 2011 -0700

    (#5027) Spell deprecation correctly
    
    Paired-With: Jesse Wolfe

diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb
index dba9440..8de9d60 100644
--- a/lib/puppet/parser/scope.rb
+++ b/lib/puppet/parser/scope.rb
@@ -238,7 +238,7 @@ class Puppet::Parser::Scope
       # We can't use "if table[name]" here because the value might be false
       if options[:dynamic] and self != compiler.topscope
         location = (options[:file] && options[:line]) ? " at #{options[:file]}:#{options[:line]}" : ''
-        Puppet.deprication_warning "Dynamic lookup of $#{name}#{location} will not be supported in future versions. Use a fully-qualified variable name or parameterized classes."
+        Puppet.deprecation_warning "Dynamic lookup of $#{name}#{location} will not be supported in future versions. Use a fully-qualified variable name or parameterized classes."
       end
       table[name]
     elsif parent
diff --git a/lib/puppet/util/logging.rb b/lib/puppet/util/logging.rb
index b6845b8..36eb43c 100644
--- a/lib/puppet/util/logging.rb
+++ b/lib/puppet/util/logging.rb
@@ -15,15 +15,15 @@ module Puppet::Util::Logging
     end
   end
 
-  def deprication_warning(message)
-    $deprication_warnings ||= Hash.new(0)
-    if $deprication_warnings.length < 100 and ($deprication_warnings[message] += 1) == 1
+  def deprecation_warning(message)
+    $deprecation_warnings ||= Hash.new(0)
+    if $deprecation_warnings.length < 100 and ($deprecation_warnings[message] += 1) == 1
       warn message
     end
   end
 
-  def clear_deprication_warnings
-    $deprication_warnings.clear if $deprication_warnings
+  def clear_deprecation_warnings
+    $deprecation_warnings.clear if $deprecation_warnings
   end
 
   private
diff --git a/spec/unit/util/logging_spec.rb b/spec/unit/util/logging_spec.rb
index 1585c3e..63f0a4d 100755
--- a/spec/unit/util/logging_spec.rb
+++ b/spec/unit/util/logging_spec.rb
@@ -93,28 +93,28 @@ describe Puppet::Util::Logging do
     end
   end
 
-  describe "when sending a deprication warning" do
+  describe "when sending a deprecation warning" do
     before do
-      @logger.clear_deprication_warnings
+      @logger.clear_deprecation_warnings
     end
 
     it "should the message with warn" do
       @logger.expects(:warn).with('foo')
-      @logger.deprication_warning 'foo'
+      @logger.deprecation_warning 'foo'
     end
 
     it "should only log each unique message once" do
       @logger.expects(:warn).with('foo').once
-      5.times { @logger.deprication_warning 'foo' }
+      5.times { @logger.deprecation_warning 'foo' }
     end
 
     it "should only log the first 100 messages" do
       (1..100).each { |i|
           @logger.expects(:warn).with(i).once
-          @logger.deprication_warning i
+          @logger.deprecation_warning i
       }
       @logger.expects(:warn).with(101).never
-      @logger.deprication_warning 101
+      @logger.deprecation_warning 101
     end
   end
 end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list