s3_website 2.8.4 → 2.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/changelog.md +4 -0
- data/lib/s3_website/version.rb +1 -1
- data/resources/s3_website.jar.md5 +1 -1
- data/src/main/scala/s3/website/CloudFront.scala +9 -2
- data/src/test/scala/s3/website/S3WebsiteSpec.scala +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c1c51a6d20fed9c16cb904e23ad86da4e64921f
|
4
|
+
data.tar.gz: a688890124a62db4d3aed8cb42c4b84d2ffd6aae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51f58e37ce1eb9a3913deb8fe6b0d201d65d1e8a56cfec93c322379ad1b38f9917b4b287a73f1be7da30a70e659680b7d62cab26ab9483e9ea5fbf6c88ea0dcf
|
7
|
+
data.tar.gz: 6768b7634e1ebc228ae50b90e298d586c42125e22cb5b3f57af3c5d7152425966dd8daeb52ee0dea853bdfa9445ab77ab3c500a3aa5a33206c0c0ae1d6ca610b
|
data/README.md
CHANGED
@@ -214,6 +214,8 @@ When you run the command `s3_website cfg apply`, it will ask you whether you
|
|
214
214
|
want to deliver your website via CloudFront. If you answer yes, the command will
|
215
215
|
create a CloudFront distribution for you.
|
216
216
|
|
217
|
+
If you do not want to receive this prompt, or if you are running the command in a non-interactive session, you can use `s3_website cfg apply --headless`.
|
218
|
+
|
217
219
|
#### Using your existing CloudFront distribution
|
218
220
|
|
219
221
|
If you already have a CloudFront distribution that serves data from your website
|
@@ -434,6 +436,7 @@ exist.
|
|
434
436
|
Contributors (in alphabetical order)
|
435
437
|
* Alan deLevie
|
436
438
|
* Almir Sarajčić
|
439
|
+
* Andrew T. Baker
|
437
440
|
* Cory Kaufman-Schofield
|
438
441
|
* Chris Kelly
|
439
442
|
* Chris Moos
|
data/changelog.md
CHANGED
data/lib/s3_website/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
4e1ae1afeac51fc4390d05fcacf4fbe9
|
@@ -117,9 +117,16 @@ object CloudFront {
|
|
117
117
|
def toInvalidationPath(report: PushSuccessReport) = "/" + report.s3Key
|
118
118
|
|
119
119
|
def encodeUnsafeChars(invalidationPath: String) =
|
120
|
-
new URI("http", "cloudfront", invalidationPath, "")
|
120
|
+
new URI("http", "cloudfront", invalidationPath, "")
|
121
|
+
.toURL
|
122
|
+
.getPath
|
121
123
|
.replaceAll("'", URLEncoder.encode("'", "UTF-8")) // CloudFront does not accept ' in invalidation path
|
122
|
-
|
124
|
+
.flatMap(chr => {
|
125
|
+
if (Seq("ä", "ö", "ü").contains(chr.toString.toLowerCase))
|
126
|
+
URLEncoder.encode(chr.toString, "UTF-8")
|
127
|
+
else
|
128
|
+
chr.toString
|
129
|
+
})
|
123
130
|
|
124
131
|
def needsInvalidation: PartialFunction[PushSuccessReport, Boolean] = {
|
125
132
|
case succ: SuccessfulUpload => succ.details.fold(_.uploadType, _.uploadType) == FileUpdate
|
@@ -207,6 +207,14 @@ class S3WebsiteSpec extends Specification {
|
|
207
207
|
sentInvalidationRequest.getInvalidationBatch.getPaths.getItems.toSeq.sorted must equalTo(("/articles/arnold%27s%20file.html" :: Nil).sorted)
|
208
208
|
}
|
209
209
|
|
210
|
+
"encode unsafe characters in the keys" in new BasicSetup {
|
211
|
+
config = "cloudfront_distribution_id: EGM1J2JJX9Z"
|
212
|
+
setLocalFile("articles/Äöü.html")
|
213
|
+
setOutdatedS3Keys("articles/Äöü.html")
|
214
|
+
push()
|
215
|
+
sentInvalidationRequest.getInvalidationBatch.getPaths.getItems.toSeq.sorted must equalTo(("/articles/%C3%84%C3%B6%C3%BC.html" :: Nil).sorted)
|
216
|
+
}
|
217
|
+
|
210
218
|
"invalidate the root object '/' if a top-level object is updated or deleted" in new BasicSetup {
|
211
219
|
config = "cloudfront_distribution_id: EGM1J2JJX9Z"
|
212
220
|
setLocalFile("maybe-index.html")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s3_website
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.8.
|
4
|
+
version: 2.8.5
|
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-
|
11
|
+
date: 2015-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|