middleman-cloudfront 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/middleman-cloudfront/commands.rb +9 -1
- data/lib/middleman-cloudfront/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 190bdebd3167e7efaf2f270ba2a9dabeaf658642
|
4
|
+
data.tar.gz: b37c0b276d54e00028155e3647ddc7bcaeccadaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d573530a93b5a5fd9e3afee0b4058863a19897c556b17b84e410d05c7c78a25c1e9931a5908972bfcd8cf7431619ef401ed67d3e137d860cbba570a51afdb0d2
|
7
|
+
data.tar.gz: e043eaa6d924d847aac400545df60dc6e9d6f6eb2d915784d27f34b67c7e08a3a4461ae782f534820ab804fd68482154f9ed4cda725027462878793993bd3a81
|
@@ -9,6 +9,12 @@ module Middleman
|
|
9
9
|
include Thor::Actions
|
10
10
|
|
11
11
|
INVALIDATION_LIMIT = 1000
|
12
|
+
INDEX_REGEX = /
|
13
|
+
\A
|
14
|
+
(.*\/)?
|
15
|
+
index\.html
|
16
|
+
\z
|
17
|
+
/ix
|
12
18
|
|
13
19
|
check_unknown_options!
|
14
20
|
|
@@ -91,7 +97,9 @@ end
|
|
91
97
|
def normalize_files(files)
|
92
98
|
# Add directories since they have to be invalidated
|
93
99
|
# as well if :directory_indexes is active
|
94
|
-
files += files.grep(
|
100
|
+
files += files.grep(INDEX_REGEX).map do |file|
|
101
|
+
file == 'index.html' ? '/' : File.dirname(file) << '/'
|
102
|
+
end.uniq
|
95
103
|
|
96
104
|
# URI encode and add leading slash
|
97
105
|
files.map { |f| URI::encode(f.start_with?('/') ? f : "/#{f}") }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-cloudfront
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Korzhuev
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-01-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fog
|
@@ -166,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
166
|
version: '0'
|
167
167
|
requirements: []
|
168
168
|
rubyforge_project: middleman-cloudfront
|
169
|
-
rubygems_version: 2.
|
169
|
+
rubygems_version: 2.2.2
|
170
170
|
signing_key:
|
171
171
|
specification_version: 4
|
172
172
|
summary: Invalidate CloudFront cache after deployment to S3
|