summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2010-12-16 14:47:23 -0800
committerJesse Wolfe <jes5199@gmail.com>2010-12-16 14:47:23 -0800
commit367633b7e67ff127c0fc8a12c2268941572a7837 (patch)
treef77139071f30fc4a846291f49ed942cbb20f05c3 /lib/puppet
parentb4035315aaad37df97d4e620b4f972cad201d04f (diff)
parente99a3ea6fc2b30ed7bcbd3c1bc011b38d92f57b2 (diff)
downloadpuppet-367633b7e67ff127c0fc8a12c2268941572a7837.tar.gz
puppet-367633b7e67ff127c0fc8a12c2268941572a7837.tar.xz
puppet-367633b7e67ff127c0fc8a12c2268941572a7837.zip
Merge branch 'ticket/2.6.4/5566' into 2.6.next
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/util/checksums.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/puppet/util/checksums.rb b/lib/puppet/util/checksums.rb
index 5aebd8392..6fdf14ecf 100644
--- a/lib/puppet/util/checksums.rb
+++ b/lib/puppet/util/checksums.rb
@@ -1,6 +1,12 @@
# A stand-alone module for calculating checksums
# in a generic way.
module Puppet::Util::Checksums
+ class FakeChecksum
+ def <<(*args)
+ self
+ end
+ end
+
# Is the provided string a checksum?
def checksum?(string)
string =~ /^\{(\w{3,5})\}\S+/
@@ -55,7 +61,10 @@ module Puppet::Util::Checksums
end
# by definition this doesn't exist
+ # but we still need to execute the block given
def mtime_stream
+ noop_digest = FakeChecksum.new
+ yield noop_digest
nil
end
@@ -105,6 +114,8 @@ module Puppet::Util::Checksums
end
def none_stream
+ noop_digest = FakeChecksum.new
+ yield noop_digest
""
end