[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.4-89-gcbbd363

Bryan Kearney bkearney at redhat.com
Tue May 18 09:03:49 UTC 2010


The following commit has been merged in the upstream branch:
commit a1d216c74ee7245e0edaaba7d9384b59d442bcf2
Author: Bryan Kearney <bkearney at redhat.com>
Date:   Wed Mar 17 08:56:36 2010 -0400

    Fixed the return types were valid, and removed the copy paste error with the exception logic

diff --git a/lib/puppet/provider/augeas/augeas.rb b/lib/puppet/provider/augeas/augeas.rb
index d586fc1..5b9133a 100644
--- a/lib/puppet/provider/augeas/augeas.rb
+++ b/lib/puppet/provider/augeas/augeas.rb
@@ -324,15 +324,15 @@ Puppet::Type.type(:augeas).provide(:augeas) do
                     when "set"
                         debug("sending command '#{command}' with params #{cmd_array.inspect}")
                         rv = aug.set(cmd_array[0], cmd_array[1])
-                        fail("Error sending command '#{command}' with params #{cmd_array.inspect}/#{e.message}") if (rv)
+                        fail("Error sending command '#{command}' with params #{cmd_array.inspect}") if (!rv)
                     when "rm", "remove"
                         debug("sending command '#{command}' with params #{cmd_array.inspect}")
                         rv = aug.rm(cmd_array[0])
-                        fail("Error sending command '#{command}' with params #{cmd_array.inspect}/#{e.message}") if (rv)
+                        fail("Error sending command '#{command}' with params #{cmd_array.inspect}") if (rv == -1)
                     when "clear"
                         debug("sending command '#{command}' with params #{cmd_array.inspect}")
                         rv = aug.clear(cmd_array[0])
-                        fail("Error sending command '#{command}' with params #{cmd_array.inspect}/#{e.message}") if (rv == -1)
+                        fail("Error sending command '#{command}' with params #{cmd_array.inspect}") if (!rv)
                     when "insert", "ins"
                         label = cmd_array[0]
                         where = cmd_array[1]
@@ -344,7 +344,7 @@ Puppet::Type.type(:augeas).provide(:augeas) do
                         end
                         debug("sending command '#{command}' with params #{[label, where, path].inspect}")
                         rv = aug.insert(path, label, before)
-                        fail("Error sending command '#{command}' with params #{cmd_array.inspect}/#{e.message}") if (rv == -1)
+                        fail("Error sending command '#{command}' with params #{cmd_array.inspect}") if (rv == -1)
                     else fail("Command '#{command}' is not supported")
                 end
             rescue SystemExit,NoMemoryError
diff --git a/spec/unit/provider/augeas/augeas.rb b/spec/unit/provider/augeas/augeas.rb
index 89d3f50..067126c 100644
--- a/spec/unit/provider/augeas/augeas.rb
+++ b/spec/unit/provider/augeas/augeas.rb
@@ -318,7 +318,7 @@ describe provider_class do
             command = "set JarJar Binks"
             context = "/some/path/"
             @resource.expects(:[]).times(2).returns(command).then.returns(context)
-            @augeas.expects(:set).with("/some/path/JarJar", "Binks")
+            @augeas.expects(:set).with("/some/path/JarJar", "Binks").returns(true)
             @augeas.expects(:save).returns(true)
             @augeas.expects(:close)
             @provider.execute_changes.should == :executed
@@ -348,7 +348,7 @@ describe provider_class do
             command = "clear Jar/Jar"
             context = "/foo/"
             @resource.expects(:[]).times(2).returns(command).then.returns(context)
-            @augeas.expects(:clear).with("/foo/Jar/Jar")
+            @augeas.expects(:clear).with("/foo/Jar/Jar").returns(true)
             @augeas.expects(:save).returns(true)
             @augeas.expects(:close)
             @provider.execute_changes.should == :executed
@@ -390,7 +390,7 @@ describe provider_class do
             context = "/foo/"
             @resource.expects(:[]).times(2).returns(command).then.returns(context)
             @augeas.expects(:insert).with("/Jar/Jar", "Binks", false)
-            @augeas.expects(:clear).with("/foo/Jar/Jar")
+            @augeas.expects(:clear).with("/foo/Jar/Jar").returns(true)
             @augeas.expects(:save).returns(true)
             @augeas.expects(:close)
             @provider.execute_changes.should == :executed

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list