s3_website 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/changelog.md +4 -0
- data/features/cassettes/cucumber_tags/empty-bucket.yml +89 -0
- data/features/command-line-help.feature +0 -1
- data/features/security.feature +9 -3
- data/features/support/test_site_dirs/site-that-contains-s3-website-file.com/_site/s3_website.yml +1 -1
- data/features/support/test_site_dirs/site-that-contains-s3-website-file.com/s3_website.yml +1 -1
- data/features/support/vcr.rb +1 -0
- data/lib/s3_website/uploader.rb +2 -2
- data/s3_website.gemspec +1 -1
- metadata +3 -5
- data/features/support/test_site_dirs/site-that-contains-s3-website-file.com/_site/css/styles.css +0 -3
- data/features/support/test_site_dirs/site-that-contains-s3-website-file.com/_site/index.html +0 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a6d978b88e689f1a6f7463c39696829fbdbc3a0b
|
|
4
|
+
data.tar.gz: e43484971117687e58977914ceb57e0e0841158f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b58f0a2ba92a4a4d082fa82aee0720f2003d3591cff245e523428de9c3d8ccd3ce14fbb3d399c95f13df37c4f3dad5211ab70bcd992b1624297c9dad051e979a
|
|
7
|
+
data.tar.gz: d818c530894bca0b630eb77b14a73a5e5addb5e7f8d724a9411b188427e716f47f94da395fdaffc64b62cf53654773abd8a2f08b1a242e454575bd5dea4f26ab
|
data/changelog.md
CHANGED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: get
|
|
5
|
+
uri: https://s3.amazonaws.com/another-s3-website-test.net?max-keys=1000
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: ''
|
|
9
|
+
headers:
|
|
10
|
+
Content-Type:
|
|
11
|
+
- ''
|
|
12
|
+
User-Agent:
|
|
13
|
+
- aws-sdk-ruby/1.8.5 ruby/2.0.0 x86_64-darwin11.4.2
|
|
14
|
+
Date:
|
|
15
|
+
- Sat, 20 Jul 2013 15:03:03 GMT
|
|
16
|
+
Authorization:
|
|
17
|
+
- AWS
|
|
18
|
+
Accept-Encoding:
|
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
20
|
+
Accept:
|
|
21
|
+
- '*/*'
|
|
22
|
+
response:
|
|
23
|
+
status:
|
|
24
|
+
code: 200
|
|
25
|
+
message: OK
|
|
26
|
+
headers:
|
|
27
|
+
X-Amz-Id-2:
|
|
28
|
+
- V9qlQNTysnd4Os0AwfWKWGMZ5Ho8DlbYiQFmZcuTMjVpPGHgZfQYuhTtNv2PERoG
|
|
29
|
+
X-Amz-Request-Id:
|
|
30
|
+
- A2A5B618C76BDC46
|
|
31
|
+
Date:
|
|
32
|
+
- Sat, 20 Jul 2013 15:03:06 GMT
|
|
33
|
+
Content-Type:
|
|
34
|
+
- application/xml
|
|
35
|
+
Transfer-Encoding:
|
|
36
|
+
- chunked
|
|
37
|
+
Server:
|
|
38
|
+
- AmazonS3
|
|
39
|
+
body:
|
|
40
|
+
encoding: UTF-8
|
|
41
|
+
string: |-
|
|
42
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
43
|
+
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Name>another-s3-website-test.net</Name><Prefix></Prefix><Marker></Marker><MaxKeys>1000</MaxKeys><IsTruncated>false</IsTruncated></ListBucketResult>
|
|
44
|
+
http_version:
|
|
45
|
+
recorded_at: Sat, 20 Jul 2013 15:03:04 GMT
|
|
46
|
+
- request:
|
|
47
|
+
method: get
|
|
48
|
+
uri: https://s3.amazonaws.com/another-s3-website-test.net?max-keys=1000
|
|
49
|
+
body:
|
|
50
|
+
encoding: US-ASCII
|
|
51
|
+
string: ''
|
|
52
|
+
headers:
|
|
53
|
+
Content-Type:
|
|
54
|
+
- ''
|
|
55
|
+
User-Agent:
|
|
56
|
+
- aws-sdk-ruby/1.8.5 ruby/2.0.0 x86_64-darwin11.4.2
|
|
57
|
+
Date:
|
|
58
|
+
- Sat, 20 Jul 2013 15:03:04 GMT
|
|
59
|
+
Authorization:
|
|
60
|
+
- AWS
|
|
61
|
+
Accept-Encoding:
|
|
62
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
63
|
+
Accept:
|
|
64
|
+
- '*/*'
|
|
65
|
+
response:
|
|
66
|
+
status:
|
|
67
|
+
code: 200
|
|
68
|
+
message: OK
|
|
69
|
+
headers:
|
|
70
|
+
X-Amz-Id-2:
|
|
71
|
+
- OhoqsN3CE+5FljCn0hTlhThb+nWYkBMKefzL9nU7Tbh/+zry/1gCEX7GWW8oGfIr
|
|
72
|
+
X-Amz-Request-Id:
|
|
73
|
+
- 30864A566FBD97FE
|
|
74
|
+
Date:
|
|
75
|
+
- Sat, 20 Jul 2013 15:03:06 GMT
|
|
76
|
+
Content-Type:
|
|
77
|
+
- application/xml
|
|
78
|
+
Transfer-Encoding:
|
|
79
|
+
- chunked
|
|
80
|
+
Server:
|
|
81
|
+
- AmazonS3
|
|
82
|
+
body:
|
|
83
|
+
encoding: UTF-8
|
|
84
|
+
string: |-
|
|
85
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
86
|
+
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Name>another-s3-website-test.net</Name><Prefix></Prefix><Marker></Marker><MaxKeys>1000</MaxKeys><IsTruncated>false</IsTruncated></ListBucketResult>
|
|
87
|
+
http_version:
|
|
88
|
+
recorded_at: Sat, 20 Jul 2013 15:03:05 GMT
|
|
89
|
+
recorded_with: VCR 2.5.0
|
data/features/security.feature
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
Feature: Security
|
|
2
2
|
|
|
3
|
-
@
|
|
4
|
-
|
|
5
|
-
Scenario: The user does not want the s3_website.yml file to be uploaded
|
|
3
|
+
@empty-bucket
|
|
4
|
+
Scenario: The user does not want to upload the s3_website.yml file
|
|
6
5
|
When my S3 website is in "features/support/test_site_dirs/site-that-contains-s3-website-file.com"
|
|
7
6
|
Then s3_website will push my blog to S3
|
|
8
7
|
And the output should not contain "s3_website.yml"
|
|
8
|
+
And the output should equal
|
|
9
|
+
"""
|
|
10
|
+
Deploying features/support/test_site_dirs/site-that-contains-s3-website-file.com/_site/* to another-s3-website-test.net
|
|
11
|
+
No new or changed files to upload
|
|
12
|
+
Done! Go visit: http://another-s3-website-test.net.s3-website-us-east-1.amazonaws.com/index.html
|
|
13
|
+
|
|
14
|
+
"""
|
data/features/support/vcr.rb
CHANGED
data/lib/s3_website/uploader.rb
CHANGED
|
@@ -42,7 +42,7 @@ module S3Website
|
|
|
42
42
|
def self.upload_files(s3, config, site_dir)
|
|
43
43
|
changed_files, new_files = DiffHelper.resolve_files_to_upload(
|
|
44
44
|
s3.buckets[config['s3_bucket']], site_dir)
|
|
45
|
-
to_upload = changed_files + new_files
|
|
45
|
+
to_upload = (changed_files + new_files).reject { |f| Upload.is_blacklisted f }
|
|
46
46
|
if to_upload.empty?
|
|
47
47
|
puts "No new or changed files to upload"
|
|
48
48
|
else
|
|
@@ -60,7 +60,7 @@ module S3Website
|
|
|
60
60
|
|
|
61
61
|
def self.upload_in_parallel_or_sequentially(files_to_upload, s3, config, site_dir)
|
|
62
62
|
Parallelism.each_in_parallel_or_sequentially(files_to_upload) { |f|
|
|
63
|
-
upload_file(f, s3, config, site_dir)
|
|
63
|
+
upload_file(f, s3, config, site_dir)
|
|
64
64
|
}
|
|
65
65
|
end
|
|
66
66
|
|
data/s3_website.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: s3_website
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lauri Lehmijoki
|
|
@@ -226,6 +226,7 @@ files:
|
|
|
226
226
|
- example-configurations.md
|
|
227
227
|
- features/as-library.feature
|
|
228
228
|
- features/cassettes/cucumber_tags/create-redirect.yml
|
|
229
|
+
- features/cassettes/cucumber_tags/empty-bucket.yml
|
|
229
230
|
- features/cassettes/cucumber_tags/new-and-changed-files.yml
|
|
230
231
|
- features/cassettes/cucumber_tags/new-files-for-sydney.yml
|
|
231
232
|
- features/cassettes/cucumber_tags/new-files.yml
|
|
@@ -278,8 +279,6 @@ files:
|
|
|
278
279
|
- features/support/test_site_dirs/only-changed-files.com/_site/css/styles.css
|
|
279
280
|
- features/support/test_site_dirs/only-changed-files.com/_site/index.html
|
|
280
281
|
- features/support/test_site_dirs/only-changed-files.com/s3_website.yml
|
|
281
|
-
- features/support/test_site_dirs/site-that-contains-s3-website-file.com/_site/css/styles.css
|
|
282
|
-
- features/support/test_site_dirs/site-that-contains-s3-website-file.com/_site/index.html
|
|
283
282
|
- features/support/test_site_dirs/site-that-contains-s3-website-file.com/_site/s3_website.yml
|
|
284
283
|
- features/support/test_site_dirs/site-that-contains-s3-website-file.com/s3_website.yml
|
|
285
284
|
- features/support/test_site_dirs/site.with.css-maxage.com/_site/css/styles.css
|
|
@@ -358,6 +357,7 @@ summary: Manage your S3 website
|
|
|
358
357
|
test_files:
|
|
359
358
|
- features/as-library.feature
|
|
360
359
|
- features/cassettes/cucumber_tags/create-redirect.yml
|
|
360
|
+
- features/cassettes/cucumber_tags/empty-bucket.yml
|
|
361
361
|
- features/cassettes/cucumber_tags/new-and-changed-files.yml
|
|
362
362
|
- features/cassettes/cucumber_tags/new-files-for-sydney.yml
|
|
363
363
|
- features/cassettes/cucumber_tags/new-files.yml
|
|
@@ -410,8 +410,6 @@ test_files:
|
|
|
410
410
|
- features/support/test_site_dirs/only-changed-files.com/_site/css/styles.css
|
|
411
411
|
- features/support/test_site_dirs/only-changed-files.com/_site/index.html
|
|
412
412
|
- features/support/test_site_dirs/only-changed-files.com/s3_website.yml
|
|
413
|
-
- features/support/test_site_dirs/site-that-contains-s3-website-file.com/_site/css/styles.css
|
|
414
|
-
- features/support/test_site_dirs/site-that-contains-s3-website-file.com/_site/index.html
|
|
415
413
|
- features/support/test_site_dirs/site-that-contains-s3-website-file.com/_site/s3_website.yml
|
|
416
414
|
- features/support/test_site_dirs/site-that-contains-s3-website-file.com/s3_website.yml
|
|
417
415
|
- features/support/test_site_dirs/site.with.css-maxage.com/_site/css/styles.css
|