s3_website 1.0.2 → 1.0.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: 9db72b2e594d4960fbf0dd0cc2302f380aa776e4
4
- data.tar.gz: d7de0719b35ba9639dc145fec0f7202921d7f791
3
+ metadata.gz: a6d978b88e689f1a6f7463c39696829fbdbc3a0b
4
+ data.tar.gz: e43484971117687e58977914ceb57e0e0841158f
5
5
  SHA512:
6
- metadata.gz: 4fb0c3f83704ac818ec1e602f2f0cb1d1ff2cda38cc5c3f677892df3d5db61860d353fedb755fafc074f5354b3aee93928d2932fc43cb90f15c59110c03a0208
7
- data.tar.gz: 6bbf791ff5e4628eead0f6e07e2b427df07a1b2c86fc04efe217227705b384272b6155c6f967a9e27fe4434b7f70d37a0e5e91159b70bca5fad4cf4835953259
6
+ metadata.gz: b58f0a2ba92a4a4d082fa82aee0720f2003d3591cff245e523428de9c3d8ccd3ce14fbb3d399c95f13df37c4f3dad5211ab70bcd992b1624297c9dad051e979a
7
+ data.tar.gz: d818c530894bca0b630eb77b14a73a5e5addb5e7f8d724a9411b188427e716f47f94da395fdaffc64b62cf53654773abd8a2f08b1a242e454575bd5dea4f26ab
data/changelog.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  This project uses [Semantic Versioning](http://semver.org).
4
4
 
5
+ ## 1.0.3
6
+
7
+ * Reject blacklisted files in a more appropriate place
8
+
5
9
  ## 1.0.2
6
10
 
7
11
  * Never upload the file *s3_website.yml*
@@ -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
@@ -45,7 +45,6 @@ Feature: displaying help text in the command-line interface
45
45
  """
46
46
 
47
47
  @starts-new-os-process
48
- @wip
49
48
  Scenario: User wants to know what the cfg create command does
50
49
  When I run `s3_website cfg help create`
51
50
  Then the output should contain:
@@ -1,8 +1,14 @@
1
1
  Feature: Security
2
2
 
3
- @new-files
4
- @wip
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
+ """
@@ -1,3 +1,3 @@
1
1
  s3_id: key
2
2
  s3_secret: pass
3
- s3_bucket: s3-website-test.net
3
+ s3_bucket: another-s3-website-test.net
@@ -1,3 +1,3 @@
1
1
  s3_id: key
2
2
  s3_secret: pass
3
- s3_bucket: s3-website-test.net
3
+ s3_bucket: another-s3-website-test.net
@@ -15,4 +15,5 @@ VCR.cucumber_tags do |t|
15
15
  t.tag '@s3-and-cloudfront-when-updating-a-file'
16
16
  t.tag '@one-file-to-delete'
17
17
  t.tag '@create-redirect'
18
+ t.tag '@empty-bucket'
18
19
  end
@@ -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) unless Upload.is_blacklisted f
63
+ upload_file(f, s3, config, site_dir)
64
64
  }
65
65
  end
66
66
 
data/s3_website.gemspec CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "s3_website"
6
- s.version = "1.0.2"
6
+ s.version = "1.0.3"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Lauri Lehmijoki"]
9
9
  s.email = ["lauri.lehmijoki@iki.fi"]
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.2
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
@@ -1,5 +0,0 @@
1
- <html>
2
- <head>
3
- <title>hello!</title>
4
- </head>
5
- </html>