[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.4-89-gcbbd363
James Turnbull
james at lovedthanlost.net
Tue May 18 09:03:41 UTC 2010
The following commit has been merged in the upstream branch:
commit 71653a74d91b1e6e9845b4a41249861319c0d6b0
Author: James Turnbull <james at lovedthanlost.net>
Date: Tue Feb 9 00:18:13 2010 +1100
Fixed #3162 - tidy does not remove empty files when "size => 0" is set
Thanks to Stig Sandbeck Mathisen for the fix
See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=513309
diff --git a/lib/puppet/type/tidy.rb b/lib/puppet/type/tidy.rb
index b5ccb3f..3d7190c 100755
--- a/lib/puppet/type/tidy.rb
+++ b/lib/puppet/type/tidy.rb
@@ -139,7 +139,7 @@ Puppet::Type.newtype(:tidy) do
end
def tidy?(path, stat)
- if stat.size > value
+ if stat.size >= value
return true
else
return false
diff --git a/spec/unit/type/tidy.rb b/spec/unit/type/tidy.rb
index 88e2e28..ccec9ed 100755
--- a/spec/unit/type/tidy.rb
+++ b/spec/unit/type/tidy.rb
@@ -273,6 +273,12 @@ describe tidy do
@sizer.must be_tidy("/what/ever", @stat)
end
+
+ it "should return true if the file is equal to the specified size" do
+ @stat.expects(:size).returns(1024)
+
+ @sizer.must be_tidy("/what/ever", @stat)
+ end
end
describe "and determining whether a file should be tidied" do
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list