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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 12348384796b7067046a25f423794d619a66e943
4
- data.tar.gz: 8aa2e82b808ca93d29e33104a40fbe5715937150
3
+ metadata.gz: 190bdebd3167e7efaf2f270ba2a9dabeaf658642
4
+ data.tar.gz: b37c0b276d54e00028155e3647ddc7bcaeccadaf
5
5
  SHA512:
6
- metadata.gz: 0837f2f566cf23f9ac6c33f0fdc76c72ed414da0740d8fa3e7ea8bc3d5a91e2fc4638c2d9fec7445773f8864d8ac2a68ae9aee836931f104402ff3d98836038d
7
- data.tar.gz: 0ba79f208ec3c2ce644d5c040338c57dd94b4329bd5139d237d3d989a3fad55589dcd8a61f769728e618d299a33faa215b77d016a0aa356175bcdd571eaebd74
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(/\/index.html\z/).map { |file| File.dirname(file) << '/' }.uniq
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}") }
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module CloudFront
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  end
5
5
  end
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.0
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: 2014-10-07 00:00:00.000000000 Z
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.4.1
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