s3_website 1.4.4 → 1.4.5
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/README.md +3 -7
- data/changelog.md +4 -0
- data/lib/s3_website/upload.rb +9 -1
- data/s3_website.gemspec +1 -1
- data/spec/lib/upload_spec.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cec0056627295c72fd85c41c1f4da128e6bf4ff
|
4
|
+
data.tar.gz: 8a55567ae2b010aa8bea43b33bd2efdfd3287d99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b6fc00e2687748a152d3f7f031a20a6813b5dff2861f2203bc6574524c07883df9eea1f7779982fced473da3276fee79ec1e246297535b1a540467c8cadf05c
|
7
|
+
data.tar.gz: b6e30b9096746a2cff6a208f5e913e8388fffeaf46dad53c70c009320e77ded02dab72decc9807542077c0ca4539d61f0a77bf752bb549f2b1a600c17038961f
|
data/README.md
CHANGED
@@ -34,15 +34,11 @@ Here's how you can get started:
|
|
34
34
|
|
35
35
|
### For Jekyll users
|
36
36
|
|
37
|
-
|
38
|
-
`s3_website` will automatically look for the site output in the *_site*
|
39
|
-
directory.
|
37
|
+
S3_website will automatically discover your website in the *_site* directory.
|
40
38
|
|
41
39
|
### For Nanoc users
|
42
40
|
|
43
|
-
|
44
|
-
`s3_website` will automatically look for the site output in the *public/output*
|
45
|
-
directory.
|
41
|
+
S3_website will automatically discover your website in the *public/output* directory.
|
46
42
|
|
47
43
|
### For others
|
48
44
|
|
@@ -338,7 +334,7 @@ See
|
|
338
334
|
|
339
335
|
## Known issues
|
340
336
|
|
341
|
-
|
337
|
+
Please create an issue and send a pull request if you spot any.
|
342
338
|
|
343
339
|
## Development
|
344
340
|
|
data/changelog.md
CHANGED
data/lib/s3_website/upload.rb
CHANGED
@@ -70,11 +70,19 @@ module S3Website
|
|
70
70
|
|
71
71
|
opts[:content_type] = "text/html; charset=utf-8" if mime_type == 'text/html'
|
72
72
|
opts[:content_encoding] = "gzip" if gzip?
|
73
|
-
opts[:cache_control] =
|
73
|
+
opts[:cache_control] = cache_control_value if cache_control?
|
74
74
|
|
75
75
|
opts
|
76
76
|
end
|
77
77
|
|
78
|
+
def cache_control_value
|
79
|
+
if max_age == 0
|
80
|
+
"no-cache, max-age=0"
|
81
|
+
else
|
82
|
+
"max-age=#{max_age}"
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
78
86
|
def cache_control?
|
79
87
|
!!config['max_age']
|
80
88
|
end
|
data/s3_website.gemspec
CHANGED
data/spec/lib/upload_spec.rb
CHANGED
@@ -144,6 +144,16 @@ describe S3Website::Upload do
|
|
144
144
|
end
|
145
145
|
end
|
146
146
|
|
147
|
+
context 'the user specifies max-age as zero' do
|
148
|
+
let(:config) {{
|
149
|
+
'max_age' => 0
|
150
|
+
}}
|
151
|
+
|
152
|
+
it 'includes the no-cache declaration in the cache-control metadata' do
|
153
|
+
subject.send(:upload_options)[:cache_control].should == 'no-cache, max-age=0'
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
147
157
|
describe '#max_age' do
|
148
158
|
it 'should be the universal value if one is set' do
|
149
159
|
subject.send(:max_age).should == 300
|
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.4.
|
4
|
+
version: 1.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lauri Lehmijoki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|