jekyll-s3 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data/README.md +25 -3
  2. data/Rakefile +1 -1
  3. data/bin/jekyll-s3 +1 -1
  4. data/features/cassettes/cucumber_tags/new-and-changed-files.yml +302 -0
  5. data/features/cassettes/cucumber_tags/new-files.yml +211 -0
  6. data/features/cassettes/cucumber_tags/no-new-or-changed-files.yml +306 -0
  7. data/features/cassettes/cucumber_tags/only-changed-files.yml +350 -0
  8. data/features/cassettes/cucumber_tags/s3-and-cloudfront.yml +290 -0
  9. data/features/cli-output.feature +84 -0
  10. data/features/jekyll-s3-cloudfront.feature +6 -14
  11. data/features/jekyll-s3.feature +20 -76
  12. data/features/step_definitions/steps.rb +27 -0
  13. data/features/support/test_site_dirs/cdn-powered.blog.fi/_jekyll_s3.yml +4 -0
  14. data/features/support/test_site_dirs/cdn-powered.blog.fi/_site/css/styles.css +3 -0
  15. data/features/support/test_site_dirs/cdn-powered.blog.fi/_site/index.html +5 -0
  16. data/features/support/test_site_dirs/my.blog.com/_jekyll_s3.yml +3 -0
  17. data/features/support/test_site_dirs/my.blog.com/_site/css/styles.css +3 -0
  18. data/features/support/test_site_dirs/my.blog.com/_site/index.html +5 -0
  19. data/features/support/test_site_dirs/new-and-changed-files.com/_jekyll_s3.yml +3 -0
  20. data/features/support/test_site_dirs/new-and-changed-files.com/_site/css/styles.css +3 -0
  21. data/features/support/test_site_dirs/new-and-changed-files.com/_site/index.html +8 -0
  22. data/features/support/test_site_dirs/no-new-or-changed-files.com/_jekyll_s3.yml +3 -0
  23. data/features/support/test_site_dirs/no-new-or-changed-files.com/_site/css/styles.css +3 -0
  24. data/features/support/test_site_dirs/no-new-or-changed-files.com/_site/index.html +5 -0
  25. data/features/support/test_site_dirs/only-changed-files.com/_jekyll_s3.yml +3 -0
  26. data/features/support/test_site_dirs/only-changed-files.com/_site/css/styles.css +3 -0
  27. data/features/support/test_site_dirs/only-changed-files.com/_site/index.html +8 -0
  28. data/features/support/vcr.rb +14 -0
  29. data/jekyll-s3.gemspec +7 -3
  30. data/lib/cloudfront/invalidator.rb +4 -2
  31. data/lib/jekyll-s3.rb +4 -2
  32. data/lib/jekyll-s3/cli.rb +29 -2
  33. data/lib/jekyll-s3/config_loader.rb +60 -0
  34. data/lib/jekyll-s3/diff_helper.rb +23 -0
  35. data/lib/jekyll-s3/errors.rb +6 -1
  36. data/lib/jekyll-s3/keyboard.rb +26 -0
  37. data/lib/jekyll-s3/retry.rb +21 -0
  38. data/lib/jekyll-s3/uploader.rb +56 -123
  39. data/lib/jekyll-s3/version.rb +1 -1
  40. data/spec/lib/keyboard_spec.rb +65 -0
  41. data/spec/lib/retry_spec.rb +34 -0
  42. data/spec/spec_helper.rb +0 -5
  43. metadata +132 -18
  44. data/spec/lib/invalidator_spec.rb +0 -36
  45. data/spec/lib/uploader_spec.rb +0 -62
@@ -0,0 +1,290 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://s3.amazonaws.com/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - ''
12
+ User-Agent:
13
+ - aws-sdk-ruby/1.5.6 ruby/1.9.3 x86_64-darwin11.4.0
14
+ Date:
15
+ - Sun, 14 Oct 2012 17:19:58 +0300
16
+ Authorization:
17
+ - AWS
18
+ Accept:
19
+ - ! '*/*'
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ X-Amz-Id-2:
26
+ - XVTH5v7I60Us5NH8Zkjqe+hJt2pZSJufKVDZYyeWa64s44hHkHpniCmXgOwpTz44
27
+ X-Amz-Request-Id:
28
+ - 814A58953B2F1408
29
+ Date:
30
+ - Sun, 14 Oct 2012 14:20:00 GMT
31
+ Content-Type:
32
+ - application/xml
33
+ Transfer-Encoding:
34
+ - chunked
35
+ Server:
36
+ - AmazonS3
37
+ body:
38
+ encoding: US-ASCII
39
+ string: ! '<?xml version="1.0" encoding="UTF-8"?>
40
+
41
+ <ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Owner><ID></ID><DisplayName></DisplayName></Owner><Buckets><Bucket><Name>jekyll-s3-test.net</Name><CreationDate>2012-10-14T12:58:37.000Z</CreationDate></Bucket></Buckets></ListAllMyBucketsResult>'
42
+ http_version:
43
+ recorded_at: Sun, 14 Oct 2012 14:19:59 GMT
44
+ - request:
45
+ method: get
46
+ uri: https://s3.amazonaws.com/jekyll-s3-test.net?max-keys=1000
47
+ body:
48
+ encoding: US-ASCII
49
+ string: ''
50
+ headers:
51
+ Content-Type:
52
+ - ''
53
+ User-Agent:
54
+ - aws-sdk-ruby/1.5.6 ruby/1.9.3 x86_64-darwin11.4.0
55
+ Date:
56
+ - Sun, 14 Oct 2012 17:19:59 +0300
57
+ Authorization:
58
+ - AWS
59
+ Accept:
60
+ - ! '*/*'
61
+ response:
62
+ status:
63
+ code: 200
64
+ message: OK
65
+ headers:
66
+ X-Amz-Id-2:
67
+ - kqI8qY2X6hz6gn5LkBZ5ucppTQAnEtwB/WUxm3Mpp5IP9maZEOrudhkrnSZ50L8Z
68
+ X-Amz-Request-Id:
69
+ - AA070701525DE2D7
70
+ Date:
71
+ - Sun, 14 Oct 2012 14:20:03 GMT
72
+ Content-Type:
73
+ - application/xml
74
+ Transfer-Encoding:
75
+ - chunked
76
+ Server:
77
+ - AmazonS3
78
+ body:
79
+ encoding: US-ASCII
80
+ string: ! '<?xml version="1.0" encoding="UTF-8"?>
81
+
82
+ <ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Name>jekyll-s3-test.net</Name><Prefix></Prefix><Marker></Marker><MaxKeys>1000</MaxKeys><IsTruncated>false</IsTruncated></ListBucketResult>'
83
+ http_version:
84
+ recorded_at: Sun, 14 Oct 2012 14:20:01 GMT
85
+ - request:
86
+ method: put
87
+ uri: https://s3.amazonaws.com/jekyll-s3-test.net/css/styles.css
88
+ body:
89
+ encoding: ASCII-8BIT
90
+ string: !binary |-
91
+ Ym9keSB7Cgp9Cg==
92
+ headers:
93
+ Content-Type:
94
+ - ''
95
+ Content-Length:
96
+ - '10'
97
+ User-Agent:
98
+ - aws-sdk-ruby/1.5.6 ruby/1.9.3 x86_64-darwin11.4.0
99
+ Date:
100
+ - Sun, 14 Oct 2012 17:20:01 +0300
101
+ Authorization:
102
+ - AWS
103
+ Accept:
104
+ - ! '*/*'
105
+ response:
106
+ status:
107
+ code: 200
108
+ message: OK
109
+ headers:
110
+ X-Amz-Id-2:
111
+ - yiJ0xvPzssJs1/qbY1JtU4eCcrCb7RoGKmCubzT66JE2f97jBRCh/GrDGQbhzBE0
112
+ X-Amz-Request-Id:
113
+ - A48B2F4C626AA36F
114
+ Date:
115
+ - Sun, 14 Oct 2012 14:20:04 GMT
116
+ Etag:
117
+ - ! '"8fcf43a38cbf0c502f029a50645f2374"'
118
+ Content-Length:
119
+ - '0'
120
+ Server:
121
+ - AmazonS3
122
+ body:
123
+ encoding: US-ASCII
124
+ string: ''
125
+ http_version:
126
+ recorded_at: Sun, 14 Oct 2012 14:20:02 GMT
127
+ - request:
128
+ method: put
129
+ uri: https://s3.amazonaws.com/jekyll-s3-test.net/index.html
130
+ body:
131
+ encoding: ASCII-8BIT
132
+ string: !binary |-
133
+ PGh0bWw+CiAgPGhlYWQ+CiAgICA8dGl0bGU+aGVsbG8hPC90aXRsZT4KICA8
134
+ L2hlYWQ+CjwvaHRtbD4K
135
+ headers:
136
+ Content-Type:
137
+ - ''
138
+ Content-Length:
139
+ - '60'
140
+ User-Agent:
141
+ - aws-sdk-ruby/1.5.6 ruby/1.9.3 x86_64-darwin11.4.0
142
+ Date:
143
+ - Sun, 14 Oct 2012 17:20:02 +0300
144
+ Authorization:
145
+ - AWS
146
+ Accept:
147
+ - ! '*/*'
148
+ response:
149
+ status:
150
+ code: 200
151
+ message: OK
152
+ headers:
153
+ X-Amz-Id-2:
154
+ - jB6/sj8qczNX7hdyr0BxlkN4hbv3ztad+qTDnC6b9XY580AcWSCMKMr2j5AzB/TR
155
+ X-Amz-Request-Id:
156
+ - 9EDF08D87D4C7EA2
157
+ Date:
158
+ - Sun, 14 Oct 2012 14:20:04 GMT
159
+ Etag:
160
+ - ! '"8a8892a2b0fad281f26c0dedbff7011a"'
161
+ Content-Length:
162
+ - '0'
163
+ Server:
164
+ - AmazonS3
165
+ body:
166
+ encoding: US-ASCII
167
+ string: ''
168
+ http_version:
169
+ recorded_at: Sun, 14 Oct 2012 14:20:03 GMT
170
+ - request:
171
+ method: get
172
+ uri: https://s3.amazonaws.com/jekyll-s3-test.net?max-keys=1000
173
+ body:
174
+ encoding: US-ASCII
175
+ string: ''
176
+ headers:
177
+ Content-Type:
178
+ - ''
179
+ User-Agent:
180
+ - aws-sdk-ruby/1.5.6 ruby/1.9.3 x86_64-darwin11.4.0
181
+ Date:
182
+ - Sun, 14 Oct 2012 17:20:03 +0300
183
+ Authorization:
184
+ - AWS
185
+ Accept:
186
+ - ! '*/*'
187
+ response:
188
+ status:
189
+ code: 200
190
+ message: OK
191
+ headers:
192
+ X-Amz-Id-2:
193
+ - 28rS+qE332bAH7P5X4xCZSTKfk41Aa8+8coL6JykVGWgook8UwngNCs+vdp+MUjU
194
+ X-Amz-Request-Id:
195
+ - FE954A121529EA60
196
+ Date:
197
+ - Sun, 14 Oct 2012 14:20:05 GMT
198
+ Content-Type:
199
+ - application/xml
200
+ Transfer-Encoding:
201
+ - chunked
202
+ Server:
203
+ - AmazonS3
204
+ body:
205
+ encoding: US-ASCII
206
+ string: ! '<?xml version="1.0" encoding="UTF-8"?>
207
+
208
+ <ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Name>jekyll-s3-test.net</Name><Prefix></Prefix><Marker></Marker><MaxKeys>1000</MaxKeys><IsTruncated>false</IsTruncated><Contents><Key>css/styles.css</Key><LastModified>2012-10-14T14:20:04.000Z</LastModified><ETag>&quot;8fcf43a38cbf0c502f029a50645f2374&quot;</ETag><Size>10</Size><Owner><ID>3855ebae0f370c3dd0c8d8031863792112bd2a2cb18fa310d3f463ae0dea62f1</ID><DisplayName>fluid83</DisplayName></Owner><StorageClass>STANDARD</StorageClass></Contents><Contents><Key>index.html</Key><LastModified>2012-10-14T14:20:04.000Z</LastModified><ETag>&quot;8a8892a2b0fad281f26c0dedbff7011a&quot;</ETag><Size>60</Size><Owner><ID>3855ebae0f370c3dd0c8d8031863792112bd2a2cb18fa310d3f463ae0dea62f1</ID><DisplayName>fluid83</DisplayName></Owner><StorageClass>STANDARD</StorageClass></Contents></ListBucketResult>'
209
+ http_version:
210
+ recorded_at: Sun, 14 Oct 2012 14:20:03 GMT
211
+ - request:
212
+ method: get
213
+ uri: https://s3.amazonaws.com/jekyll-s3-test.net?max-keys=1000
214
+ body:
215
+ encoding: US-ASCII
216
+ string: ''
217
+ headers:
218
+ Content-Type:
219
+ - ''
220
+ User-Agent:
221
+ - aws-sdk-ruby/1.5.6 ruby/1.9.3 x86_64-darwin11.4.0
222
+ Date:
223
+ - Sun, 14 Oct 2012 17:20:03 +0300
224
+ Authorization:
225
+ - AWS
226
+ Accept:
227
+ - ! '*/*'
228
+ response:
229
+ status:
230
+ code: 200
231
+ message: OK
232
+ headers:
233
+ X-Amz-Id-2:
234
+ - H8PnL8xdXT/f8NBPuBRM20MoNP3GXwCurPtToM9xm1xRz8dSWhvmZRz5gtbHLEaS
235
+ X-Amz-Request-Id:
236
+ - A88E10E350D2ABBF
237
+ Date:
238
+ - Sun, 14 Oct 2012 14:20:05 GMT
239
+ Content-Type:
240
+ - application/xml
241
+ Transfer-Encoding:
242
+ - chunked
243
+ Server:
244
+ - AmazonS3
245
+ body:
246
+ encoding: US-ASCII
247
+ string: ! '<?xml version="1.0" encoding="UTF-8"?>
248
+
249
+ <ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Name>jekyll-s3-test.net</Name><Prefix></Prefix><Marker></Marker><MaxKeys>1000</MaxKeys><IsTruncated>false</IsTruncated><Contents><Key>css/styles.css</Key><LastModified>2012-10-14T14:20:04.000Z</LastModified><ETag>&quot;8fcf43a38cbf0c502f029a50645f2374&quot;</ETag><Size>10</Size><Owner><ID>3855ebae0f370c3dd0c8d8031863792112bd2a2cb18fa310d3f463ae0dea62f1</ID><DisplayName>fluid83</DisplayName></Owner><StorageClass>STANDARD</StorageClass></Contents><Contents><Key>index.html</Key><LastModified>2012-10-14T14:20:04.000Z</LastModified><ETag>&quot;8a8892a2b0fad281f26c0dedbff7011a&quot;</ETag><Size>60</Size><Owner><ID>3855ebae0f370c3dd0c8d8031863792112bd2a2cb18fa310d3f463ae0dea62f1</ID><DisplayName>fluid83</DisplayName></Owner><StorageClass>STANDARD</StorageClass></Contents></ListBucketResult>'
250
+ http_version:
251
+ recorded_at: Sun, 14 Oct 2012 14:20:04 GMT
252
+ - request:
253
+ method: post
254
+ uri: https://cloudfront.amazonaws.com/2012-05-05/distribution/foo/invalidation
255
+ body:
256
+ encoding: US-ASCII
257
+ string: ! "\n <InvalidationBatch>\n <Paths>\n <Quantity>2</Quantity>\n
258
+ \ <Items>\n [\"<Path>/css/styles.css</Path>\", \"<Path>/index.html</Path>\"]\n
259
+ \ </Items>\n </Paths>\n <CallerReference>1350224404</CallerReference>\n
260
+ \ </InvalidationBatch>\n "
261
+ headers:
262
+ X-Amz-Date:
263
+ - Sun, 14 Oct 2012 17:20:04 EEST
264
+ Content-Type:
265
+ - text/xml
266
+ Authorization:
267
+ - AWS
268
+ response:
269
+ status:
270
+ code: 201
271
+ message: Created
272
+ headers:
273
+ X-Amzn-Requestid:
274
+ - 402b2709-160a-11e2-8263-5718d272b82f
275
+ Location:
276
+ - https://cloudfront.amazonaws.com/2012-05-05/distribution/foo/invalidation/I29QRGBBZOGEZ9
277
+ Content-Type:
278
+ - text/xml
279
+ Content-Length:
280
+ - '394'
281
+ Date:
282
+ - Sun, 14 Oct 2012 14:20:06 GMT
283
+ body:
284
+ encoding: US-ASCII
285
+ string: ! '<?xml version="1.0"?>
286
+
287
+ <Invalidation xmlns="http://cloudfront.amazonaws.com/doc/2012-05-05/"><Id>I29QRGBBZOGEZ9</Id><Status>InProgress</Status><CreateTime>2012-10-14T14:20:05.839Z</CreateTime><InvalidationBatch><Paths><Quantity>2</Quantity><Items><Path>/index.html</Path><Path>/css/styles.css</Path></Items></Paths><CallerReference>1350224404</CallerReference></InvalidationBatch></Invalidation>'
288
+ http_version:
289
+ recorded_at: Sun, 14 Oct 2012 14:20:05 GMT
290
+ recorded_with: VCR 2.2.4
@@ -0,0 +1,84 @@
1
+ Feature: Command-line interface feedback
2
+
3
+ Scenario: Run jekyll-s3 in the wrong directory
4
+ When I run `jekyll-s3`
5
+ Then the output should contain:
6
+ """
7
+ I can't find any directory called _site. Are you in the right directory?
8
+ """
9
+
10
+ # For some reason this scenario fails on Travis but on on localhost
11
+ @skip-on-travis
12
+ Scenario: Run jekyll-s3 for the first time
13
+ Given a directory named "_site"
14
+ When I run `jekyll-s3`
15
+ Then the output should contain:
16
+ """
17
+ I've just generated a file called _jekyll_s3.yml. Go put your details in it!
18
+ """
19
+ Then the file "_jekyll_s3.yml" should contain:
20
+ """
21
+ s3_id: YOUR_AWS_S3_ACCESS_KEY_ID
22
+ s3_secret: YOUR_AWS_S3_SECRET_ACCESS_KEY
23
+ s3_bucket: your.blog.bucket.com
24
+ cloudfront_distribution_id: YOUR_CLOUDFRONT_DIST_ID (OPTIONAL)
25
+ """
26
+
27
+ Scenario: Run jekyll-s3 with an empty configuration file
28
+ Given a directory named "_site"
29
+ And an empty file named "_jekyll_s3.yml"
30
+ When I run `jekyll-s3`
31
+ Then the output should contain:
32
+ """
33
+ I can't parse the file _jekyll_s3.yml. It should look like this:
34
+ s3_id: YOUR_AWS_S3_ACCESS_KEY_ID
35
+ s3_secret: YOUR_AWS_S3_SECRET_ACCESS_KEY
36
+ s3_bucket: your.blog.bucket.com
37
+ """
38
+
39
+ Scenario: Run jekyll-s3 with a malformed configuration file
40
+ Given a directory named "_site"
41
+ And a file named "_jekyll_s3.yml" with:
42
+ """
43
+ s3_id: YOUR_AWS_S3_ACCESS_KEY_ID
44
+ this is not yaml
45
+ """
46
+ When I run `jekyll-s3`
47
+ Then the output should contain:
48
+ """
49
+ I can't parse the file _jekyll_s3.yml. It should look like this:
50
+ s3_id: YOUR_AWS_S3_ACCESS_KEY_ID
51
+ s3_secret: YOUR_AWS_S3_SECRET_ACCESS_KEY
52
+ s3_bucket: your.blog.bucket.com
53
+ """
54
+
55
+ Scenario: Run jekyll-s3 with a configuration file that does not contain a bucket
56
+ Given a directory named "_site"
57
+ And a file named "_jekyll_s3.yml" with:
58
+ """
59
+ s3_id: YOUR_AWS_S3_ACCESS_KEY_ID
60
+ s3_secret: YOUR_AWS_S3_SECRET_ACCESS_KEY
61
+ s3_bucket:
62
+ """
63
+ When I run `jekyll-s3`
64
+ Then the output should contain:
65
+ """
66
+ I can't parse the file _jekyll_s3.yml. It should look like this:
67
+ s3_id: YOUR_AWS_S3_ACCESS_KEY_ID
68
+ s3_secret: YOUR_AWS_S3_SECRET_ACCESS_KEY
69
+ s3_bucket: your.blog.bucket.com
70
+ """
71
+
72
+ Scenario: Run jekyll-s3
73
+ Given a directory named "_site"
74
+ And a file named "_jekyll_s3.yml" with:
75
+ """
76
+ s3_id: YOUR_AWS_S3_ACCESS_KEY_ID
77
+ s3_secret: YOUR_AWS_S3_SECRET_ACCESS_KEY
78
+ s3_bucket: your.blog.bucket.com
79
+ """
80
+ When I run `jekyll-s3`
81
+ Then the output should contain:
82
+ """
83
+ Deploying _site/* to your.blog.bucket.com
84
+ """
@@ -6,17 +6,9 @@ Feature: Invalidate the Cloudfront distribution
6
6
  And see, that the items in the distribution were invalidated
7
7
  So that my latest updates will be immediately available to readers
8
8
 
9
- Scenario: Run jekyll-s3 for the first time
10
- Given a directory named "_site"
11
- When I run `jekyll-s3`
12
- Then the output should contain:
13
- """
14
- I've just generated a file called _jekyll_s3.yml. Go put your details in it!
15
- """
16
- Then the file "_jekyll_s3.yml" should contain:
17
- """
18
- s3_id: YOUR_AWS_S3_ACCESS_KEY_ID
19
- s3_secret: YOUR_AWS_S3_SECRET_ACCESS_KEY
20
- s3_bucket: your.blog.bucket.com
21
- cloudfront_distribution_id: YOUR_CLOUDFRONT_DIST_ID (OPTIONAL)
22
- """
9
+ @s3-and-cloudfront
10
+ Scenario: Upload to S3 and then invalidate the Cloudfront distribution
11
+ When my Jekyll site is in "features/support/test_site_dirs/cdn-powered.blog.fi"
12
+ And the configuration contains the Cloudfront distribution id
13
+ Then jekyll-s3 will push my blog to S3 and invalidate the Cloudfront distribution
14
+ And report that it uploaded 2 new and 0 changed files into S3
@@ -4,82 +4,26 @@ Feature: jekyll-s3
4
4
  As a blogger
5
5
  I want to run jekyll-s3 and say OMG it just worked!
6
6
 
7
- Scenario: Run jekyll-s3 in the wrong directory
8
- When I run `jekyll-s3`
9
- Then the output should contain:
10
- """
11
- I can't find any directory called _site. Are you in the right directory?
12
- """
7
+ @new-files
8
+ Scenario: Push a new Jekyll site to S3
9
+ When my Jekyll site is in "features/support/test_site_dirs/my.blog.com"
10
+ Then jekyll-s3 will push my blog to S3
11
+ And report that it uploaded 2 new and 0 changed files into S3
13
12
 
14
- Scenario: Run jekyll-s3 for the first time
15
- Given a directory named "_site"
16
- When I run `jekyll-s3`
17
- Then the output should contain:
18
- """
19
- I've just generated a file called _jekyll_s3.yml. Go put your details in it!
20
- """
21
- Then the file "_jekyll_s3.yml" should contain:
22
- """
23
- s3_id: YOUR_AWS_S3_ACCESS_KEY_ID
24
- s3_secret: YOUR_AWS_S3_SECRET_ACCESS_KEY
25
- s3_bucket: your.blog.bucket.com
26
- """
13
+ @new-and-changed-files
14
+ Scenario: Upload a new blog post and change an old post
15
+ When my Jekyll site is in "features/support/test_site_dirs/new-and-changed-files.com"
16
+ Then jekyll-s3 will push my blog to S3
17
+ And report that it uploaded 1 new and 1 changed files into S3
27
18
 
28
- Scenario: Run jekyll-s3 with an empty configuration file
29
- Given a directory named "_site"
30
- And an empty file named "_jekyll_s3.yml"
31
- When I run `jekyll-s3`
32
- Then the output should contain:
33
- """
34
- I can't parse the file _jekyll_s3.yml. It should look like this:
35
- s3_id: YOUR_AWS_S3_ACCESS_KEY_ID
36
- s3_secret: YOUR_AWS_S3_SECRET_ACCESS_KEY
37
- s3_bucket: your.blog.bucket.com
38
- """
19
+ @only-changed-files
20
+ Scenario: Update an existing blog post
21
+ When my Jekyll site is in "features/support/test_site_dirs/only-changed-files.com"
22
+ Then jekyll-s3 will push my blog to S3
23
+ And report that it uploaded 0 new and 1 changed files into S3
39
24
 
40
- Scenario: Run jekyll-s3 with a malformed configuration file
41
- Given a directory named "_site"
42
- And a file named "_jekyll_s3.yml" with:
43
- """
44
- s3_id: YOUR_AWS_S3_ACCESS_KEY_ID
45
- this is not yaml
46
- """
47
- When I run `jekyll-s3`
48
- Then the output should contain:
49
- """
50
- I can't parse the file _jekyll_s3.yml. It should look like this:
51
- s3_id: YOUR_AWS_S3_ACCESS_KEY_ID
52
- s3_secret: YOUR_AWS_S3_SECRET_ACCESS_KEY
53
- s3_bucket: your.blog.bucket.com
54
- """
55
-
56
- Scenario: Run jekyll-s3 with a configuration file that does not contain a bucket
57
- Given a directory named "_site"
58
- And a file named "_jekyll_s3.yml" with:
59
- """
60
- s3_id: YOUR_AWS_S3_ACCESS_KEY_ID
61
- s3_secret: YOUR_AWS_S3_SECRET_ACCESS_KEY
62
- s3_bucket:
63
- """
64
- When I run `jekyll-s3`
65
- Then the output should contain:
66
- """
67
- I can't parse the file _jekyll_s3.yml. It should look like this:
68
- s3_id: YOUR_AWS_S3_ACCESS_KEY_ID
69
- s3_secret: YOUR_AWS_S3_SECRET_ACCESS_KEY
70
- s3_bucket: your.blog.bucket.com
71
- """
72
-
73
- Scenario: Run jekyll-s3
74
- Given a directory named "_site"
75
- And a file named "_jekyll_s3.yml" with:
76
- """
77
- s3_id: YOUR_AWS_S3_ACCESS_KEY_ID
78
- s3_secret: YOUR_AWS_S3_SECRET_ACCESS_KEY
79
- s3_bucket: your.blog.bucket.com
80
- """
81
- When I run `jekyll-s3`
82
- Then the output should contain:
83
- """
84
- Deploying _site/* to your.blog.bucket.com
85
- """
25
+ @no-new-or-changed-files
26
+ Scenario: The user runs jekyll-s3 even though he doesn't have new or changed posts
27
+ When my Jekyll site is in "features/support/test_site_dirs/no-new-or-changed-files.com"
28
+ Then jekyll-s3 will push my blog to S3
29
+ And report that it uploaded 0 new and 0 changed files into S3