s3_website 2.8.5 → 2.8.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 147c1079964479122eef8b8c049d8c14795b7605
|
4
|
+
data.tar.gz: 4fac5c7fe84796797d2a242656f504be508caa52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df826a2926ecb33997c516c8dcf4f9a8af7f92a05cd0f1af5c18b7b8c860781a784c160ad139d5f7c927a23820e3bf72bd6235d74ce62c13b59cef445594c85e
|
7
|
+
data.tar.gz: 796902606cb3a9c1aec1fb69a76decdbf6919b8bcfde45708444dc23dbefa964133b9b12d247dc2969bac9691375c9553fc65c561ddeadc21a0852d365055b20
|
data/changelog.md
CHANGED
@@ -2,13 +2,19 @@
|
|
2
2
|
|
3
3
|
This project uses [Semantic Versioning](http://semver.org).
|
4
4
|
|
5
|
+
## 2.8.6
|
6
|
+
|
7
|
+
* Detect changed file even though the file has the same contents with another file on the S3 bucket
|
8
|
+
|
9
|
+
See <https://github.com/laurilehmijoki/s3_website/issues/156> for discussion.
|
10
|
+
|
5
11
|
## 2.8.5
|
6
12
|
|
7
13
|
* URL encode (ä|ö|ü) in invalidation path
|
8
14
|
|
9
15
|
## 2.8.4
|
10
16
|
|
11
|
-
* URL
|
17
|
+
* URL encode ' in invalidation path
|
12
18
|
|
13
19
|
See <https://github.com/laurilehmijoki/s3_website/issues/63> for discussion.
|
14
20
|
|
data/lib/s3_website/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
a5dff84ae39e23dae2a6fd3edfa51823
|
@@ -24,10 +24,10 @@ object UploadHelper {
|
|
24
24
|
errorOrS3Files.right.flatMap { s3Files =>
|
25
25
|
Try {
|
26
26
|
val s3KeyIndex = s3Files.map(_.s3Key).toSet
|
27
|
-
val s3Md5Index = s3Files.map(
|
27
|
+
val s3Md5Index = s3Files.map(s3File => (s3File.s3Key, s3File.md5)).toSet
|
28
28
|
val siteFiles = listSiteFiles
|
29
29
|
val existsOnS3 = (f: File) => s3KeyIndex contains site.resolveS3Key(f)
|
30
|
-
val isChangedOnS3 = (upload: Upload) => !(s3Md5Index contains upload.md5.get)
|
30
|
+
val isChangedOnS3 = (upload: Upload) => !(s3Md5Index contains (upload.s3Key, upload.md5.get))
|
31
31
|
val newUploads = siteFiles collect {
|
32
32
|
case file if !existsOnS3(file) => Upload(file, NewFile)
|
33
33
|
}
|
@@ -83,6 +83,14 @@ class S3WebsiteSpec extends Specification {
|
|
83
83
|
noUploadsOccurred must beTrue
|
84
84
|
}
|
85
85
|
|
86
|
+
"detect a changed file even though another file has the same contents as the changed file" in new BasicSetup {
|
87
|
+
setLocalFilesWithContent(("1.txt", "foo"), ("2.txt", "foo"))
|
88
|
+
setS3File("1.txt", md5Hex("bar"))
|
89
|
+
setS3File("2.txt", md5Hex("foo"))
|
90
|
+
push()
|
91
|
+
sentPutObjectRequest.getKey must equalTo("1.txt")
|
92
|
+
}
|
93
|
+
|
86
94
|
"update a file if it has changed" in new BasicSetup {
|
87
95
|
setLocalFileWithContent(("index.html", "<h1>old text</h1>"))
|
88
96
|
setS3File("index.html", md5Hex("<h1>new text</h1>"))
|