s3_website 2.8.1 → 2.8.3

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: 40e97e64d528ad59e6a9ad089fffa120f34b0b1f
4
- data.tar.gz: 9cd5ff6a0b7f0eebeb1c87bbb4e8bfd001195d1a
3
+ metadata.gz: 3ef96125c6a73593af5f5fad43964ec7f968511f
4
+ data.tar.gz: 883d27f9ee3ae528c4d3e76478740c66f56734c5
5
5
  SHA512:
6
- metadata.gz: 13ab5e5f2a72f7beec238e78133a40d9d5986bf1faec79d83253e48fc1bb34f43f0ee07296083ba122abbb105092fde24249117cd4ab2b6e1f1bb9ea3dfdf1a4
7
- data.tar.gz: 166b6375523dec9e3a642d20516676291488c149bd1a7eb48fffbd19d3a75e644fbfef19e4c7a73778cdacb5e5558a08076bd29e296c6083fbfb789f0d7e32b3
6
+ metadata.gz: 183d2e3a0644fc60ca90b045bd74101601e5e6b182a348e5e55b68d3df6090ed81671cf921126e97659ee6fc81b6f384bd861cd160f4d9b1b82403d1e6b220e5
7
+ data.tar.gz: 2580cfc91f7a99ec584d826b1677b87afcb2f90407074a318b02568ae7ed55153849d35d554bb981fba4ea6fdc6ad04d0600cda235753ba7157da8e4af7f11ba
data/changelog.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  This project uses [Semantic Versioning](http://semver.org).
4
4
 
5
+ ## 2.8.3
6
+
7
+ * Fix bug where the setting `cloudfront_invalidate_root: true` resulted in a
8
+ CloudFront invalidation even if there were no changes to push.
9
+
10
+ See <https://github.com/laurilehmijoki/s3_website/issues/149> for discussion.
11
+
5
12
  ## 2.8.1
6
13
 
7
14
  * Change CloudFront `OriginProtocolPolicy` to `http-only`
@@ -1,3 +1,3 @@
1
1
  module S3Website
2
- VERSION = '2.8.1'
2
+ VERSION = '2.8.3'
3
3
  end
@@ -81,9 +81,11 @@ object CloudFront {
81
81
  )
82
82
  if (containsPotentialDefaultRootObject) paths :+ "/" else paths
83
83
  }
84
- def withIndexPathIfNeeded(paths: Seq[String]) = {
85
- if (config.cloudfront_invalidate_root.contains(true)) paths :+ "/index.html" else paths
86
- }
84
+ def withIndexPathIfNeeded(paths: Seq[String]) =
85
+ if (config.cloudfront_invalidate_root.contains(true) && pushSuccessReports.nonEmpty)
86
+ paths :+ "/index.html"
87
+ else
88
+ paths
87
89
  val paths = pushSuccessReports
88
90
  .filter(needsInvalidation) // Assume that redirect objects are never cached.
89
91
  .map(toInvalidationPath)
@@ -238,6 +238,15 @@ class S3WebsiteSpec extends Specification {
238
238
  push()
239
239
  sentInvalidationRequest.getInvalidationBatch.getPaths.getItems.toSeq must contain("/index.html")
240
240
  }
241
+
242
+ "not invalidate anything if there was nothing to push" in new BasicSetup {
243
+ config = """
244
+ |cloudfront_distribution_id: EGM1J2JJX9Z
245
+ |cloudfront_invalidate_root: true
246
+ """.stripMargin
247
+ push()
248
+ noInvalidationsOccurred
249
+ }
241
250
  }
242
251
 
243
252
  "a site with over 1000 items" should {
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3_website
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.1
4
+ version: 2.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lauri Lehmijoki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-19 00:00:00.000000000 Z
11
+ date: 2015-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.18'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.18'
27
27
  - !ruby/object:Gem::Dependency
@@ -56,14 +56,14 @@ dependencies:
56
56
  name: dotenv
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.0'
69
69
  - !ruby/object:Gem::Dependency
@@ -103,8 +103,8 @@ executables:
103
103
  extensions: []
104
104
  extra_rdoc_files: []
105
105
  files:
106
- - .gitignore
107
- - .travis.yml
106
+ - ".gitignore"
107
+ - ".travis.yml"
108
108
  - Gemfile
109
109
  - LICENSE
110
110
  - README.md
@@ -153,17 +153,17 @@ require_paths:
153
153
  - lib
154
154
  required_ruby_version: !ruby/object:Gem::Requirement
155
155
  requirements:
156
- - - '>='
156
+ - - ">="
157
157
  - !ruby/object:Gem::Version
158
158
  version: '0'
159
159
  required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  requirements:
161
- - - '>='
161
+ - - ">="
162
162
  - !ruby/object:Gem::Version
163
163
  version: '0'
164
164
  requirements: []
165
165
  rubyforge_project:
166
- rubygems_version: 2.2.1
166
+ rubygems_version: 2.2.2
167
167
  signing_key:
168
168
  specification_version: 4
169
169
  summary: Manage your S3 website