Skip to content

Commit

Permalink
Merge branch 'release-4.2.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdefreyne committed Jul 1, 2016
2 parents e5efa98 + c5e8c9b commit 5ab89a4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lib/nanoc/base/checksummer.rb
@@ -1,3 +1,5 @@
require 'hamster'

module Nanoc::Int
# Creates checksums for given objects.
#
Expand Down Expand Up @@ -46,14 +48,14 @@ def calc(obj, digest_class = CompactDigest)

private

def update(obj, digest, visited = Set.new)
def update(obj, digest, visited = Hamster::Set.new)
digest.update(obj.class.to_s)

if visited.include?(obj)
digest.update('<recur>')
else
digest.update('<')
behavior_for(obj).update(obj, digest) { |o| update(o, digest, visited + [obj]) }
behavior_for(obj).update(obj, digest) { |o| update(o, digest, visited.add(obj)) }
digest.update('>')
end
end
Expand Down
1 change: 1 addition & 0 deletions nanoc.gemspec
Expand Up @@ -25,6 +25,7 @@ Gem::Specification.new do |s|
s.required_ruby_version = '>= 2.1.0'

s.add_runtime_dependency('cri', '~> 2.3')
s.add_runtime_dependency('hamster', '~> 3.0')

s.add_development_dependency('bundler', '>= 1.7.10', '< 2.0')
end
2 changes: 1 addition & 1 deletion spec/nanoc/extra/deployers/fog_spec.rb
Expand Up @@ -152,7 +152,7 @@
it 'invalidates' do
expect(::Fog::CDN).to receive(:new).with(provider: 'local', local_root: 'remote').and_return(cdn)
expect(cdn).to receive(:get_distribution).with('donkey-cdn').and_return(distribution)
expect(cdn).to receive(:post_invalidation).with(distribution, ['etc/meow', 'woof'])
expect(cdn).to receive(:post_invalidation).with(distribution, contain_exactly('etc/meow', 'woof'))

subject
end
Expand Down

0 comments on commit 5ab89a4

Please sign in to comment.