sewing_kit 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sewing_kit/version.rb +1 -1
- data/lib/sewing_kit/webpack/manifest.rb +15 -2
- 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: a7f11b53cd7599867f27fe7bba0af1435d27713a
|
4
|
+
data.tar.gz: 9729034b26d91852ce43904dc8aa4b45198613a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fe8cb746cbd96023e855ba86ed583c2b86abd712e401999f1f960a75d94f24832f4d21aa1ba08890fc39d1d0471d6eff7fb65c428942dc4e10effe524cfe972
|
7
|
+
data.tar.gz: b30db6c8bf6f28aaf267ab79f4f1ecd797f6d7b1a618b8c7949efef6081e21a4dfbdfbe158e8bc428aaffe8030a15cd8c24c44cfb7b37e82b2dfba7fadb605dd
|
data/lib/sewing_kit/version.rb
CHANGED
@@ -18,14 +18,27 @@ module SewingKit
|
|
18
18
|
paths || {}
|
19
19
|
end
|
20
20
|
|
21
|
+
def clear_cache!
|
22
|
+
@manifest = nil
|
23
|
+
@manifest_expiry_time = nil
|
24
|
+
end
|
25
|
+
|
21
26
|
def manifest
|
22
27
|
if ::Rails.env.production?
|
23
28
|
# Cache at class level, as JSON loading/parsing can be expensive.
|
24
29
|
@manifest ||= load_manifest
|
25
30
|
else
|
26
|
-
#
|
27
|
-
|
31
|
+
# In development, the manifest may change.
|
32
|
+
# A short cache lifetime avoids time consuming node callouts.
|
33
|
+
if self.instance_variable_defined?('@manifest_expiry_time') && @manifest_expiry_time && @manifest_expiry_time >= Time.now
|
34
|
+
@manifest
|
35
|
+
else
|
36
|
+
@manifest = load_manifest
|
37
|
+
@manifest_expiry_time = Time.now + 4
|
38
|
+
end
|
28
39
|
end
|
40
|
+
|
41
|
+
@manifest
|
29
42
|
end
|
30
43
|
|
31
44
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sewing_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Sauve
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|