lib/nanoc/extra/deployers/fog.rb in nanoc-4.1.1 vs lib/nanoc/extra/deployers/fog.rb in nanoc-4.1.2
- old
+ new
@@ -35,11 +35,11 @@
# Validate params
error 'The path requires no trailing slash' if path && path[-1, 1] == '/'
# Mock if necessary
- if self.dry_run?
+ if dry_run?
puts 'Dry run - simulation'
::Fog.mock!
end
# Get connection
@@ -93,10 +93,10 @@
if cdn_id
puts 'Invalidating CDN distribution'
keys_to_invalidate.concat(keys_to_destroy)
cdn = ::Fog::CDN.new(config)
# fog cannot mock CDN requests
- unless self.dry_run?
+ unless dry_run?
distribution = cdn.get_distribution(cdn_id)
# usual limit per invalidation: 1000 objects
keys_to_invalidate.each_slice(1000) do |paths|
cdn.post_invalidation(distribution, paths)
end