s3_website 1.6.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/changelog.md +4 -0
- data/features/cassettes/cucumber_tags/s3-and-cloudfront-after-deleting-a-file.yml +434 -0
- data/features/cloudfront.feature +18 -0
- data/features/support/test_site_dirs/cdn-powered.when-deleted-a-file.blog.fi/_site/index.html +10 -0
- data/features/support/test_site_dirs/cdn-powered.when-deleted-a-file.blog.fi/s3_website.yml +5 -0
- data/features/support/vcr.rb +1 -0
- data/lib/s3_website/tasks.rb +3 -3
- data/lib/s3_website/uploader.rb +6 -6
- data/s3_website.gemspec +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29a254f2801e9e63b44ad767609e498309bf1002
|
4
|
+
data.tar.gz: e0262bc0a34a7a94ddc0dab19bcaecfc7981ab06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a1feb02a3114c23a620152f409d5985759ce518399856ec7324fc09bebc8e2b535f92b76307da15ab3c861db280686b5947bebd94666664ce7564f177526e7c
|
7
|
+
data.tar.gz: b3aa31a71a4430a2ebb35a713eb9a2d6ff87ebac3d90a7c9b7b875f35037b930c9f8400de955de6c7a430e9ef5905beaf67a6d712739624590ded98ae8adc6a0
|
data/changelog.md
CHANGED
@@ -0,0 +1,434 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://s3.amazonaws.com/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
|
+
- Thu, 02 Jan 2014 03:04:19 GMT
|
16
|
+
Authorization:
|
17
|
+
- AWS foo
|
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
|
+
- LGMrtCcqE1mXF7d5Jm0N1pfm00ZQbDHB0yQ1rSwb+b72oJgtN9GsQpgow9vsIxzV
|
29
|
+
X-Amz-Request-Id:
|
30
|
+
- 3E383D14CF35C182
|
31
|
+
Date:
|
32
|
+
- Thu, 02 Jan 2014 03:04:21 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>s3-website-test.net</Name><Prefix></Prefix><Marker></Marker><MaxKeys>1000</MaxKeys><IsTruncated>false</IsTruncated><Contents><Key>css/styles.css</Key><LastModified>2014-01-02T03:01:51.000Z</LastModified><ETag>"8fcf43a38cbf0c502f029a50645f2374"</ETag><Size>10</Size><Owner><ID>3855ebae0f370c3dd0c8d8031863792112bd2a2cb18fa310d3f463ae0dea62f1</ID><DisplayName>foo</DisplayName></Owner><StorageClass>STANDARD</StorageClass></Contents><Contents><Key>index.html</Key><LastModified>2014-01-02T03:01:51.000Z</LastModified><ETag>"af57cd2c1da58734749af7f49e38952c"</ETag><Size>117</Size><Owner><ID>3855ebae0f370c3dd0c8d8031863792112bd2a2cb18fa310d3f463ae0dea62f1</ID><DisplayName>foo</DisplayName></Owner><StorageClass>STANDARD</StorageClass></Contents></ListBucketResult>
|
44
|
+
http_version:
|
45
|
+
recorded_at: Thu, 02 Jan 2014 03:04:20 GMT
|
46
|
+
- request:
|
47
|
+
method: head
|
48
|
+
uri: https://s3.amazonaws.com/s3-website-test.net/css/styles.css
|
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
|
+
- Thu, 02 Jan 2014 03:04:20 GMT
|
59
|
+
Authorization:
|
60
|
+
- AWS foo
|
61
|
+
Accept:
|
62
|
+
- '*/*'
|
63
|
+
response:
|
64
|
+
status:
|
65
|
+
code: 200
|
66
|
+
message: OK
|
67
|
+
headers:
|
68
|
+
X-Amz-Id-2:
|
69
|
+
- 4SqYK9CwhNDvyVNRMIH3uCE059aiNKxWv8nf5lrtBSQMbYtgiywsv8RXYGNvkhzQ
|
70
|
+
X-Amz-Request-Id:
|
71
|
+
- 4DDB98AC357B55D3
|
72
|
+
Date:
|
73
|
+
- Thu, 02 Jan 2014 03:04:21 GMT
|
74
|
+
Last-Modified:
|
75
|
+
- Thu, 02 Jan 2014 03:01:51 GMT
|
76
|
+
Etag:
|
77
|
+
- '"8fcf43a38cbf0c502f029a50645f2374"'
|
78
|
+
Accept-Ranges:
|
79
|
+
- bytes
|
80
|
+
Content-Type:
|
81
|
+
- text/css
|
82
|
+
Content-Length:
|
83
|
+
- '10'
|
84
|
+
Server:
|
85
|
+
- AmazonS3
|
86
|
+
body:
|
87
|
+
encoding: UTF-8
|
88
|
+
string: ''
|
89
|
+
http_version:
|
90
|
+
recorded_at: Thu, 02 Jan 2014 03:04:21 GMT
|
91
|
+
- request:
|
92
|
+
method: head
|
93
|
+
uri: https://s3.amazonaws.com/s3-website-test.net/css/styles.css
|
94
|
+
body:
|
95
|
+
encoding: US-ASCII
|
96
|
+
string: ''
|
97
|
+
headers:
|
98
|
+
Content-Type:
|
99
|
+
- ''
|
100
|
+
User-Agent:
|
101
|
+
- aws-sdk-ruby/1.8.5 ruby/2.0.0 x86_64-darwin11.4.2
|
102
|
+
Date:
|
103
|
+
- Thu, 02 Jan 2014 03:04:21 GMT
|
104
|
+
Authorization:
|
105
|
+
- AWS foo
|
106
|
+
Accept:
|
107
|
+
- '*/*'
|
108
|
+
response:
|
109
|
+
status:
|
110
|
+
code: 200
|
111
|
+
message: OK
|
112
|
+
headers:
|
113
|
+
X-Amz-Id-2:
|
114
|
+
- 4iU6lxZyo/Bse8SPYb0OVXieITKjQQJQ36stYVm1jjtQ2lCJ0jgllGsDtIoHyLsv
|
115
|
+
X-Amz-Request-Id:
|
116
|
+
- 2CFD4B5CB963E3A8
|
117
|
+
Date:
|
118
|
+
- Thu, 02 Jan 2014 03:04:22 GMT
|
119
|
+
Last-Modified:
|
120
|
+
- Thu, 02 Jan 2014 03:01:51 GMT
|
121
|
+
Etag:
|
122
|
+
- '"8fcf43a38cbf0c502f029a50645f2374"'
|
123
|
+
Accept-Ranges:
|
124
|
+
- bytes
|
125
|
+
Content-Type:
|
126
|
+
- text/css
|
127
|
+
Content-Length:
|
128
|
+
- '10'
|
129
|
+
Server:
|
130
|
+
- AmazonS3
|
131
|
+
body:
|
132
|
+
encoding: UTF-8
|
133
|
+
string: ''
|
134
|
+
http_version:
|
135
|
+
recorded_at: Thu, 02 Jan 2014 03:04:21 GMT
|
136
|
+
- request:
|
137
|
+
method: head
|
138
|
+
uri: https://s3.amazonaws.com/s3-website-test.net/css/styles.css
|
139
|
+
body:
|
140
|
+
encoding: US-ASCII
|
141
|
+
string: ''
|
142
|
+
headers:
|
143
|
+
Content-Type:
|
144
|
+
- ''
|
145
|
+
User-Agent:
|
146
|
+
- aws-sdk-ruby/1.8.5 ruby/2.0.0 x86_64-darwin11.4.2
|
147
|
+
Date:
|
148
|
+
- Thu, 02 Jan 2014 03:04:21 GMT
|
149
|
+
Authorization:
|
150
|
+
- AWS foo
|
151
|
+
Accept:
|
152
|
+
- '*/*'
|
153
|
+
response:
|
154
|
+
status:
|
155
|
+
code: 200
|
156
|
+
message: OK
|
157
|
+
headers:
|
158
|
+
X-Amz-Id-2:
|
159
|
+
- KHEnlG2H8YLMzbU793DQw/K1oz5ocndugXNNYybUI+GM0LE5GrwhvLNLS8cWVrBV
|
160
|
+
X-Amz-Request-Id:
|
161
|
+
- 916813B4A81ACBEC
|
162
|
+
Date:
|
163
|
+
- Thu, 02 Jan 2014 03:04:23 GMT
|
164
|
+
Last-Modified:
|
165
|
+
- Thu, 02 Jan 2014 03:01:51 GMT
|
166
|
+
Etag:
|
167
|
+
- '"8fcf43a38cbf0c502f029a50645f2374"'
|
168
|
+
Accept-Ranges:
|
169
|
+
- bytes
|
170
|
+
Content-Type:
|
171
|
+
- text/css
|
172
|
+
Content-Length:
|
173
|
+
- '10'
|
174
|
+
Server:
|
175
|
+
- AmazonS3
|
176
|
+
body:
|
177
|
+
encoding: UTF-8
|
178
|
+
string: ''
|
179
|
+
http_version:
|
180
|
+
recorded_at: Thu, 02 Jan 2014 03:04:22 GMT
|
181
|
+
- request:
|
182
|
+
method: head
|
183
|
+
uri: https://s3.amazonaws.com/s3-website-test.net/index.html
|
184
|
+
body:
|
185
|
+
encoding: US-ASCII
|
186
|
+
string: ''
|
187
|
+
headers:
|
188
|
+
Content-Type:
|
189
|
+
- ''
|
190
|
+
User-Agent:
|
191
|
+
- aws-sdk-ruby/1.8.5 ruby/2.0.0 x86_64-darwin11.4.2
|
192
|
+
Date:
|
193
|
+
- Thu, 02 Jan 2014 03:04:22 GMT
|
194
|
+
Authorization:
|
195
|
+
- AWS foo
|
196
|
+
Accept:
|
197
|
+
- '*/*'
|
198
|
+
response:
|
199
|
+
status:
|
200
|
+
code: 200
|
201
|
+
message: OK
|
202
|
+
headers:
|
203
|
+
X-Amz-Id-2:
|
204
|
+
- vw8vUUNW3sGOCy0A/MzU+waFY4c8Fk7J3+EQgAgW7U4AbPDrI6W4ydB7ZPXRmvHD
|
205
|
+
X-Amz-Request-Id:
|
206
|
+
- 3B8119FAA8C2A10F
|
207
|
+
Date:
|
208
|
+
- Thu, 02 Jan 2014 03:04:23 GMT
|
209
|
+
Last-Modified:
|
210
|
+
- Thu, 02 Jan 2014 03:01:51 GMT
|
211
|
+
Etag:
|
212
|
+
- '"af57cd2c1da58734749af7f49e38952c"'
|
213
|
+
Accept-Ranges:
|
214
|
+
- bytes
|
215
|
+
Content-Type:
|
216
|
+
- text/html; charset=utf-8
|
217
|
+
Content-Length:
|
218
|
+
- '117'
|
219
|
+
Server:
|
220
|
+
- AmazonS3
|
221
|
+
body:
|
222
|
+
encoding: UTF-8
|
223
|
+
string: ''
|
224
|
+
http_version:
|
225
|
+
recorded_at: Thu, 02 Jan 2014 03:04:22 GMT
|
226
|
+
- request:
|
227
|
+
method: head
|
228
|
+
uri: https://s3.amazonaws.com/s3-website-test.net/index.html
|
229
|
+
body:
|
230
|
+
encoding: US-ASCII
|
231
|
+
string: ''
|
232
|
+
headers:
|
233
|
+
Content-Type:
|
234
|
+
- ''
|
235
|
+
User-Agent:
|
236
|
+
- aws-sdk-ruby/1.8.5 ruby/2.0.0 x86_64-darwin11.4.2
|
237
|
+
Date:
|
238
|
+
- Thu, 02 Jan 2014 03:04:22 GMT
|
239
|
+
Authorization:
|
240
|
+
- AWS foo
|
241
|
+
Accept:
|
242
|
+
- '*/*'
|
243
|
+
response:
|
244
|
+
status:
|
245
|
+
code: 200
|
246
|
+
message: OK
|
247
|
+
headers:
|
248
|
+
X-Amz-Id-2:
|
249
|
+
- /bADSwdGx0itqr2eoceLa3CrNOIbB56fcHuR5ZUxY0SJfFO02qP9sAJ+troIb2/b
|
250
|
+
X-Amz-Request-Id:
|
251
|
+
- 9047D10D733C8F01
|
252
|
+
Date:
|
253
|
+
- Thu, 02 Jan 2014 03:04:24 GMT
|
254
|
+
Last-Modified:
|
255
|
+
- Thu, 02 Jan 2014 03:01:51 GMT
|
256
|
+
Etag:
|
257
|
+
- '"af57cd2c1da58734749af7f49e38952c"'
|
258
|
+
Accept-Ranges:
|
259
|
+
- bytes
|
260
|
+
Content-Type:
|
261
|
+
- text/html; charset=utf-8
|
262
|
+
Content-Length:
|
263
|
+
- '117'
|
264
|
+
Server:
|
265
|
+
- AmazonS3
|
266
|
+
body:
|
267
|
+
encoding: UTF-8
|
268
|
+
string: ''
|
269
|
+
http_version:
|
270
|
+
recorded_at: Thu, 02 Jan 2014 03:04:23 GMT
|
271
|
+
- request:
|
272
|
+
method: head
|
273
|
+
uri: https://s3.amazonaws.com/s3-website-test.net/index.html
|
274
|
+
body:
|
275
|
+
encoding: US-ASCII
|
276
|
+
string: ''
|
277
|
+
headers:
|
278
|
+
Content-Type:
|
279
|
+
- ''
|
280
|
+
User-Agent:
|
281
|
+
- aws-sdk-ruby/1.8.5 ruby/2.0.0 x86_64-darwin11.4.2
|
282
|
+
Date:
|
283
|
+
- Thu, 02 Jan 2014 03:04:23 GMT
|
284
|
+
Authorization:
|
285
|
+
- AWS foo
|
286
|
+
Accept:
|
287
|
+
- '*/*'
|
288
|
+
response:
|
289
|
+
status:
|
290
|
+
code: 200
|
291
|
+
message: OK
|
292
|
+
headers:
|
293
|
+
X-Amz-Id-2:
|
294
|
+
- fEznpLNhA2Es4G4kKTKyw2scdgjp743gZ0xcsBSch4kOic4tbhSCrnMmya9OYNa7
|
295
|
+
X-Amz-Request-Id:
|
296
|
+
- 2B65DDB496502465
|
297
|
+
Date:
|
298
|
+
- Thu, 02 Jan 2014 03:04:25 GMT
|
299
|
+
Last-Modified:
|
300
|
+
- Thu, 02 Jan 2014 03:01:51 GMT
|
301
|
+
Etag:
|
302
|
+
- '"af57cd2c1da58734749af7f49e38952c"'
|
303
|
+
Accept-Ranges:
|
304
|
+
- bytes
|
305
|
+
Content-Type:
|
306
|
+
- text/html; charset=utf-8
|
307
|
+
Content-Length:
|
308
|
+
- '117'
|
309
|
+
Server:
|
310
|
+
- AmazonS3
|
311
|
+
body:
|
312
|
+
encoding: UTF-8
|
313
|
+
string: ''
|
314
|
+
http_version:
|
315
|
+
recorded_at: Thu, 02 Jan 2014 03:04:24 GMT
|
316
|
+
- request:
|
317
|
+
method: get
|
318
|
+
uri: https://s3.amazonaws.com/s3-website-test.net?max-keys=1000
|
319
|
+
body:
|
320
|
+
encoding: US-ASCII
|
321
|
+
string: ''
|
322
|
+
headers:
|
323
|
+
Content-Type:
|
324
|
+
- ''
|
325
|
+
User-Agent:
|
326
|
+
- aws-sdk-ruby/1.8.5 ruby/2.0.0 x86_64-darwin11.4.2
|
327
|
+
Date:
|
328
|
+
- Thu, 02 Jan 2014 03:04:24 GMT
|
329
|
+
Authorization:
|
330
|
+
- AWS foo
|
331
|
+
Accept-Encoding:
|
332
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
333
|
+
Accept:
|
334
|
+
- '*/*'
|
335
|
+
response:
|
336
|
+
status:
|
337
|
+
code: 200
|
338
|
+
message: OK
|
339
|
+
headers:
|
340
|
+
X-Amz-Id-2:
|
341
|
+
- 0hwSRY4oKFGxplKvgR5uhigyak8Hr/Hc20sjcV4LzTcfjZn2u6b9lcf8dxofZ4An
|
342
|
+
X-Amz-Request-Id:
|
343
|
+
- 9AC5E5FDDF9A1581
|
344
|
+
Date:
|
345
|
+
- Thu, 02 Jan 2014 03:04:25 GMT
|
346
|
+
Content-Type:
|
347
|
+
- application/xml
|
348
|
+
Transfer-Encoding:
|
349
|
+
- chunked
|
350
|
+
Server:
|
351
|
+
- AmazonS3
|
352
|
+
body:
|
353
|
+
encoding: UTF-8
|
354
|
+
string: |-
|
355
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
356
|
+
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Name>s3-website-test.net</Name><Prefix></Prefix><Marker></Marker><MaxKeys>1000</MaxKeys><IsTruncated>false</IsTruncated><Contents><Key>css/styles.css</Key><LastModified>2014-01-02T03:01:51.000Z</LastModified><ETag>"8fcf43a38cbf0c502f029a50645f2374"</ETag><Size>10</Size><Owner><ID>3855ebae0f370c3dd0c8d8031863792112bd2a2cb18fa310d3f463ae0dea62f1</ID><DisplayName>foo</DisplayName></Owner><StorageClass>STANDARD</StorageClass></Contents><Contents><Key>index.html</Key><LastModified>2014-01-02T03:01:51.000Z</LastModified><ETag>"af57cd2c1da58734749af7f49e38952c"</ETag><Size>117</Size><Owner><ID>3855ebae0f370c3dd0c8d8031863792112bd2a2cb18fa310d3f463ae0dea62f1</ID><DisplayName>foo</DisplayName></Owner><StorageClass>STANDARD</StorageClass></Contents></ListBucketResult>
|
357
|
+
http_version:
|
358
|
+
recorded_at: Thu, 02 Jan 2014 03:04:25 GMT
|
359
|
+
- request:
|
360
|
+
method: delete
|
361
|
+
uri: https://s3.amazonaws.com/s3-website-test.net/css/styles.css
|
362
|
+
body:
|
363
|
+
encoding: US-ASCII
|
364
|
+
string: ''
|
365
|
+
headers:
|
366
|
+
Content-Type:
|
367
|
+
- ''
|
368
|
+
User-Agent:
|
369
|
+
- aws-sdk-ruby/1.8.5 ruby/2.0.0 x86_64-darwin11.4.2
|
370
|
+
Date:
|
371
|
+
- Thu, 02 Jan 2014 03:04:25 GMT
|
372
|
+
Authorization:
|
373
|
+
- AWS foo
|
374
|
+
Accept-Encoding:
|
375
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
376
|
+
Accept:
|
377
|
+
- '*/*'
|
378
|
+
response:
|
379
|
+
status:
|
380
|
+
code: 204
|
381
|
+
message: No Content
|
382
|
+
headers:
|
383
|
+
X-Amz-Id-2:
|
384
|
+
- 4R5N9SuCYZ1aiexSGOwF7DGKKS5uA0w4arIuBG7OBzuwibs0/q/HfLBHGK/p4Lo4
|
385
|
+
X-Amz-Request-Id:
|
386
|
+
- DC937C728950B247
|
387
|
+
Date:
|
388
|
+
- Thu, 02 Jan 2014 03:04:26 GMT
|
389
|
+
Server:
|
390
|
+
- AmazonS3
|
391
|
+
body:
|
392
|
+
encoding: UTF-8
|
393
|
+
string: ''
|
394
|
+
http_version:
|
395
|
+
recorded_at: Thu, 02 Jan 2014 03:04:25 GMT
|
396
|
+
- request:
|
397
|
+
method: post
|
398
|
+
uri: https://cloudfront.amazonaws.com/2012-05-05/distribution/some-cf-id/invalidation
|
399
|
+
body:
|
400
|
+
encoding: UTF-8
|
401
|
+
string: "\n <InvalidationBatch>\n <Paths>\n <Quantity>2</Quantity>\n
|
402
|
+
\ <Items>\n [\"<Path>/css/styles.css</Path>\", \"<Path>/</Path>\"]\n
|
403
|
+
\ </Items>\n </Paths>\n <CallerReference>1388631865</CallerReference>\n
|
404
|
+
\ </InvalidationBatch>\n "
|
405
|
+
headers:
|
406
|
+
X-Amz-Date:
|
407
|
+
- Thu, 02 Jan 2014 03:04:25 UTC
|
408
|
+
Content-Type:
|
409
|
+
- text/xml
|
410
|
+
Authorization:
|
411
|
+
- AWS foo
|
412
|
+
response:
|
413
|
+
status:
|
414
|
+
code: 201
|
415
|
+
message: Created
|
416
|
+
headers:
|
417
|
+
X-Amzn-Requestid:
|
418
|
+
- 96a78aca-735a-11e3-908a-dfaa7fc51261
|
419
|
+
Location:
|
420
|
+
- https://cloudfront.amazonaws.com/2012-05-05/distribution/some-cf-id/invalidation/IVABZ2VV0CGL2
|
421
|
+
Content-Type:
|
422
|
+
- text/xml
|
423
|
+
Content-Length:
|
424
|
+
- '383'
|
425
|
+
Date:
|
426
|
+
- Thu, 02 Jan 2014 03:04:25 GMT
|
427
|
+
body:
|
428
|
+
encoding: UTF-8
|
429
|
+
string: |-
|
430
|
+
<?xml version="1.0"?>
|
431
|
+
<Invalidation xmlns="http://cloudfront.amazonaws.com/doc/2012-05-05/"><Id>IVABZ2VV0CGL2</Id><Status>InProgress</Status><CreateTime>2014-01-02T03:04:26.515Z</CreateTime><InvalidationBatch><Paths><Quantity>2</Quantity><Items><Path>/</Path><Path>/css/styles.css</Path></Items></Paths><CallerReference>1388631865</CallerReference></InvalidationBatch></Invalidation>
|
432
|
+
http_version:
|
433
|
+
recorded_at: Thu, 02 Jan 2014 03:04:26 GMT
|
434
|
+
recorded_with: VCR 2.5.0
|
data/features/cloudfront.feature
CHANGED
@@ -34,3 +34,21 @@ Feature: Invalidate the Cloudfront distribution
|
|
34
34
|
succeeded
|
35
35
|
|
36
36
|
"""
|
37
|
+
|
38
|
+
@s3-and-cloudfront-after-deleting-a-file
|
39
|
+
Scenario: Delete a blog post and then push the website
|
40
|
+
When my S3 website is in "features/support/test_site_dirs/cdn-powered.when-deleted-a-file.blog.fi"
|
41
|
+
Then s3_website will push my blog to S3 and invalidate the Cloudfront distribution
|
42
|
+
And the output should equal
|
43
|
+
"""
|
44
|
+
Deploying features/support/test_site_dirs/cdn-powered.when-deleted-a-file.blog.fi/_site/* to s3-website-test.net
|
45
|
+
Calculating diff ... done
|
46
|
+
No new or changed files to upload
|
47
|
+
Delete css/styles.css: Success!
|
48
|
+
Done! Go visit: http://s3-website-test.net.s3-website-us-east-1.amazonaws.com/index.html
|
49
|
+
Invalidating Cloudfront items...
|
50
|
+
/css/styles.css
|
51
|
+
/
|
52
|
+
succeeded
|
53
|
+
|
54
|
+
"""
|
data/features/support/vcr.rb
CHANGED
@@ -13,6 +13,7 @@ VCR.cucumber_tags do |t|
|
|
13
13
|
t.tag '@no-new-or-changed-files'
|
14
14
|
t.tag '@s3-and-cloudfront'
|
15
15
|
t.tag '@s3-and-cloudfront-when-updating-a-file'
|
16
|
+
t.tag '@s3-and-cloudfront-after-deleting-a-file'
|
16
17
|
t.tag '@one-file-to-delete'
|
17
18
|
t.tag '@create-redirect'
|
18
19
|
t.tag '@empty-bucket'
|
data/lib/s3_website/tasks.rb
CHANGED
@@ -4,14 +4,14 @@ module S3Website
|
|
4
4
|
ConfigLoader.check_project site_dir
|
5
5
|
ConfigLoader.check_s3_configuration config_file_dir
|
6
6
|
config = S3Website::ConfigLoader.load_configuration config_file_dir
|
7
|
-
new_files_count, changed_files_count,
|
7
|
+
new_files_count, changed_files_count, deleted_files, changed_files, changed_redirects =
|
8
8
|
Uploader.run(site_dir, config, in_headless_mode)
|
9
9
|
invalidated_items_count =
|
10
|
-
invalidate_cf_dist_if_configured(config, changed_files + changed_redirects)
|
10
|
+
invalidate_cf_dist_if_configured(config, changed_files + deleted_files + changed_redirects)
|
11
11
|
{
|
12
12
|
:new_files_count => new_files_count,
|
13
13
|
:changed_files_count => changed_files_count,
|
14
|
-
:deleted_files_count =>
|
14
|
+
:deleted_files_count => deleted_files.size,
|
15
15
|
:invalidated_items_count => invalidated_items_count,
|
16
16
|
:changed_redirects_count => changed_redirects.size
|
17
17
|
}
|
data/lib/s3_website/uploader.rb
CHANGED
@@ -18,7 +18,7 @@ module S3Website
|
|
18
18
|
redirects = config['redirects'] || {}
|
19
19
|
changed_redirects = setup_redirects redirects, config, s3
|
20
20
|
|
21
|
-
|
21
|
+
deleted_files = remove_superfluous_files(
|
22
22
|
s3,
|
23
23
|
config,
|
24
24
|
{
|
@@ -32,7 +32,7 @@ module S3Website
|
|
32
32
|
|
33
33
|
print_done_report config
|
34
34
|
|
35
|
-
[new_files_count, changed_files_count,
|
35
|
+
[new_files_count, changed_files_count, deleted_files, changed_files, changed_redirects, deleted_files]
|
36
36
|
end
|
37
37
|
|
38
38
|
private
|
@@ -132,19 +132,19 @@ module S3Website
|
|
132
132
|
local_files = load_all_local_files(site_dir) + options.fetch(:redirects).keys
|
133
133
|
files_to_delete = build_list_of_files_to_delete(remote_files, local_files, options[:ignore_on_server])
|
134
134
|
|
135
|
-
|
135
|
+
deleted_files = []
|
136
136
|
if in_headless_mode
|
137
137
|
files_to_delete.each { |s3_object_key|
|
138
138
|
delete_s3_object s3, s3_bucket_name, s3_object_key
|
139
|
-
|
139
|
+
deleted_files << s3_object_key
|
140
140
|
}
|
141
141
|
else
|
142
142
|
Keyboard.if_user_confirms_delete(files_to_delete, config) { |s3_object_key|
|
143
143
|
delete_s3_object s3, s3_bucket_name, s3_object_key
|
144
|
-
|
144
|
+
deleted_files << s3_object_key
|
145
145
|
}
|
146
146
|
end
|
147
|
-
|
147
|
+
deleted_files
|
148
148
|
end
|
149
149
|
|
150
150
|
def self.build_list_of_files_to_delete(remote_files, local_files, ignore_on_server = nil)
|
data/s3_website.gemspec
CHANGED
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: 1.6.
|
4
|
+
version: 1.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lauri Lehmijoki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -233,6 +233,7 @@ files:
|
|
233
233
|
- features/cassettes/cucumber_tags/no-new-or-changed-files.yml
|
234
234
|
- features/cassettes/cucumber_tags/one-file-to-delete.yml
|
235
235
|
- features/cassettes/cucumber_tags/only-changed-files.yml
|
236
|
+
- features/cassettes/cucumber_tags/s3-and-cloudfront-after-deleting-a-file.yml
|
236
237
|
- features/cassettes/cucumber_tags/s3-and-cloudfront-when-updating-a-file.yml
|
237
238
|
- features/cassettes/cucumber_tags/s3-and-cloudfront.yml
|
238
239
|
- features/cloudfront.feature
|
@@ -249,6 +250,8 @@ files:
|
|
249
250
|
- features/support/test_site_dirs/cdn-powered.blog.fi/_site/css/styles.css
|
250
251
|
- features/support/test_site_dirs/cdn-powered.blog.fi/_site/index.html
|
251
252
|
- features/support/test_site_dirs/cdn-powered.blog.fi/s3_website.yml
|
253
|
+
- features/support/test_site_dirs/cdn-powered.when-deleted-a-file.blog.fi/_site/index.html
|
254
|
+
- features/support/test_site_dirs/cdn-powered.when-deleted-a-file.blog.fi/s3_website.yml
|
252
255
|
- features/support/test_site_dirs/cdn-powered.with-one-change.blog.fi/_site/css/styles.css
|
253
256
|
- features/support/test_site_dirs/cdn-powered.with-one-change.blog.fi/_site/index.html
|
254
257
|
- features/support/test_site_dirs/cdn-powered.with-one-change.blog.fi/s3_website.yml
|
@@ -372,6 +375,7 @@ test_files:
|
|
372
375
|
- features/cassettes/cucumber_tags/no-new-or-changed-files.yml
|
373
376
|
- features/cassettes/cucumber_tags/one-file-to-delete.yml
|
374
377
|
- features/cassettes/cucumber_tags/only-changed-files.yml
|
378
|
+
- features/cassettes/cucumber_tags/s3-and-cloudfront-after-deleting-a-file.yml
|
375
379
|
- features/cassettes/cucumber_tags/s3-and-cloudfront-when-updating-a-file.yml
|
376
380
|
- features/cassettes/cucumber_tags/s3-and-cloudfront.yml
|
377
381
|
- features/cloudfront.feature
|
@@ -388,6 +392,8 @@ test_files:
|
|
388
392
|
- features/support/test_site_dirs/cdn-powered.blog.fi/_site/css/styles.css
|
389
393
|
- features/support/test_site_dirs/cdn-powered.blog.fi/_site/index.html
|
390
394
|
- features/support/test_site_dirs/cdn-powered.blog.fi/s3_website.yml
|
395
|
+
- features/support/test_site_dirs/cdn-powered.when-deleted-a-file.blog.fi/_site/index.html
|
396
|
+
- features/support/test_site_dirs/cdn-powered.when-deleted-a-file.blog.fi/s3_website.yml
|
391
397
|
- features/support/test_site_dirs/cdn-powered.with-one-change.blog.fi/_site/css/styles.css
|
392
398
|
- features/support/test_site_dirs/cdn-powered.with-one-change.blog.fi/_site/index.html
|
393
399
|
- features/support/test_site_dirs/cdn-powered.with-one-change.blog.fi/s3_website.yml
|