foresth-cloudfront_asset_host 1.0.3 → 1.0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{foresth-cloudfront_asset_host}
|
|
8
|
-
s.version = "1.0.3"
|
|
8
|
+
s.version = "1.0.3.1"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Menno van der Sman"]
|
|
@@ -22,7 +22,7 @@ module CloudfrontAssetHost
|
|
|
22
22
|
upload_keys_with_paths(gzip_keys_with_paths, dryrun, verbose, true)
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
delete_old_keys
|
|
25
|
+
delete_old_keys(dryrun, verbose)
|
|
26
26
|
|
|
27
27
|
@existing_keys = nil
|
|
28
28
|
end
|
|
@@ -84,12 +84,12 @@ module CloudfrontAssetHost
|
|
|
84
84
|
end
|
|
85
85
|
end
|
|
86
86
|
|
|
87
|
-
def delete_old_keys
|
|
87
|
+
def delete_old_keys(dryrun, verbose)
|
|
88
88
|
puts "-- Removing expired files" if verbose
|
|
89
89
|
(existing_keys - new_keys).uniq.each do |key|
|
|
90
90
|
unless new_keys.include?(key)
|
|
91
91
|
puts "- #{key}" if verbose
|
|
92
|
-
bucket.delete_folder(key)
|
|
92
|
+
bucket.delete_folder(key) unless dryrun
|
|
93
93
|
end
|
|
94
94
|
end
|
|
95
95
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foresth-cloudfront_asset_host
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 81
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 1
|
|
8
8
|
- 0
|
|
9
9
|
- 3
|
|
10
|
-
|
|
10
|
+
- 1
|
|
11
|
+
version: 1.0.3.1
|
|
11
12
|
platform: ruby
|
|
12
13
|
authors:
|
|
13
14
|
- Menno van der Sman
|