middleman-s3_sync 3.3.7 → 3.3.8
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/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: 7d6f64bd4cc8bd531a509a39d8016cf6547cb688
|
4
|
+
data.tar.gz: b39d69cf55120f47993514293c8a8d003a9e2530
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: febf95daf6aae730a306717f84b39da170ee0a3156ed4c756a93877df21fc864e71c1222b1e6ddfaca55688a2d847d1f5673812b744e14692a3be0e78135e481
|
7
|
+
data.tar.gz: 8285acbdcf71288e8cdd3f6996f9fb552e80303f132b21af752644ffc52f32febf3de8928c31f29ece87168d6b2cf6c6f359af198978a6bc07d8ab36870dc8ae
|
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: 3.3.
|
4
|
+
version: 3.3.8
|
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
|