precompiled_assets 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/precompiled_assets/manifest.rb +5 -3
- data/lib/precompiled_assets/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbc13f77485b022c32908da0e53fe6dfe4f82ba717b55cd968c70aa4656bec43
|
4
|
+
data.tar.gz: f180a457b9aea3ed8a2674feccff3672a2eefe3753a9cdc5332ff0f06baad581
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d5b9c4243fa6eabb4c7c6d76f73358b1bbc7ea55572de7c45a3413ce62aab4107fbc3040c8daa53f732280949523c4c339b218aebbe2e4a1b6eb075ac79ebfc
|
7
|
+
data.tar.gz: b04a4f5714f78c9487f4ca3b2ae7d867c0cc1bfc38f311e72262fcaffb42c9cc6fad9039c64fd5a4b5a03dbc818cd582fc0aa3197dd849d4600cb596ebc9ee83
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -66,7 +66,7 @@ resolver.manifest.updated_at
|
|
66
66
|
# => (returns a Time instance)
|
67
67
|
```
|
68
68
|
|
69
|
-
Side note: `Manifest#updated_at` reads its
|
69
|
+
Side note: `Manifest#updated_at` reads its modification time from the file system. If your production environments use a distributed file system, it is not recommended to use for etagging in production.
|
70
70
|
|
71
71
|
|
72
72
|
## Development
|
@@ -21,16 +21,18 @@ module PrecompiledAssets
|
|
21
21
|
|
22
22
|
def updated_at
|
23
23
|
# Not intended for use in production environments.
|
24
|
-
|
24
|
+
mtime || fetch_mtime
|
25
25
|
end
|
26
26
|
|
27
27
|
def expired?
|
28
28
|
# Not intended for use in production environments.
|
29
|
-
|
29
|
+
mtime && mtime != fetch_mtime
|
30
30
|
end
|
31
31
|
|
32
32
|
private
|
33
33
|
|
34
|
+
attr_accessor :mtime
|
35
|
+
|
34
36
|
def filename
|
35
37
|
Rails.configuration.try(:asset_manifest_filename) || DEFAULT_FILENAME
|
36
38
|
end
|
@@ -42,7 +44,7 @@ module PrecompiledAssets
|
|
42
44
|
def parse_manifest
|
43
45
|
raise NotFound, "Manifest not found at #{pathname}" unless pathname.exist?
|
44
46
|
|
45
|
-
|
47
|
+
self.mtime = fetch_mtime
|
46
48
|
|
47
49
|
json = pathname.read
|
48
50
|
JSON.parse(json)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: precompiled_assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arne Hartherz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|