middleman-s3_sync 4.0.1.rc.3 → 4.0.1.rc.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/middleman/s3_sync/caching_policy.rb +1 -0
- data/lib/middleman/s3_sync/version.rb +1 -1
- data/spec/caching_policy_spec.rb +22 -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: 3cc5e83da7bfd7639905564a61f26cc74916b1e8
|
4
|
+
data.tar.gz: c4f2d171cf39e6a5c6ea2776a8813b0dee89992d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c140b7a8ac66998daa5ab29d263c8ac6c2669b359f305b6a6874afd766f855db5ffe67ba259f27a15cd3fcb95c7e7d2a4f9c7109a39080957de231f51be6bef
|
7
|
+
data.tar.gz: 7d6105e86327e6337e8ed340fa6122d5423fb309d5b6ed00b3f3ce2b6a3dd8d28a1db7c4da154d723275b6c73585cdb0ac2b25833402d7f37ff6efd2dc0a0f38
|
data/spec/caching_policy_spec.rb
CHANGED
@@ -96,3 +96,25 @@ describe "Storing and retrieving policies" do
|
|
96
96
|
expect(policy.policies.max_age).to eq(300)
|
97
97
|
end
|
98
98
|
end
|
99
|
+
|
100
|
+
describe "Handling situations where the content type is nil" do
|
101
|
+
class CachingPolicy
|
102
|
+
include Middleman::S3Sync::CachingPolicy
|
103
|
+
end
|
104
|
+
|
105
|
+
let(:caching_policy) { CachingPolicy.new }
|
106
|
+
|
107
|
+
it "returns the default caching policy when the content type is nil" do
|
108
|
+
caching_policy.add_caching_policy(:default, max_age:(60 * 60 * 24 * 365))
|
109
|
+
|
110
|
+
expect(caching_policy.caching_policy_for(nil)).to_not be_nil
|
111
|
+
expect(caching_policy.caching_policy_for(nil).policies[:max_age]).to eq(60 * 60 * 24 * 365)
|
112
|
+
end
|
113
|
+
|
114
|
+
it "returns the default caching policy when the content type is blank" do
|
115
|
+
caching_policy.add_caching_policy(:default, max_age:(60 * 60 * 24 * 365))
|
116
|
+
|
117
|
+
expect(caching_policy.caching_policy_for("")).to_not be_nil
|
118
|
+
expect(caching_policy.caching_policy_for("").policies[:max_age]).to eq(60 * 60 * 24 * 365)
|
119
|
+
end
|
120
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-s3_sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.1.rc.
|
4
|
+
version: 4.0.1.rc.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frederic Jean
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-01-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: middleman-core
|