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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f0320f9e06f583c9ef4ff7bbcd1aef431a96aec01aa6a45666545c4041af3f9
4
- data.tar.gz: 46a10e8013605de64bc3e3f409249f0820df85290900b521d582408a9086e136
3
+ metadata.gz: bbc13f77485b022c32908da0e53fe6dfe4f82ba717b55cd968c70aa4656bec43
4
+ data.tar.gz: f180a457b9aea3ed8a2674feccff3672a2eefe3753a9cdc5332ff0f06baad581
5
5
  SHA512:
6
- metadata.gz: 3758f0bc4631ea3bc7e1b0f32ca3d93591e01999715567e245f6f099fa8c4882e44291c898f5fa394308a9fdd8ac054c31e756a16585ce845632ee46c3e7f866
7
- data.tar.gz: 7cff3b5686510acfda6d36c0bc3e7dde5347bdb3a25ebbb336a96908d0a331507c4e633cfab3a8b22845df59472b5cbbd9a04c6969d0608e7e0524d2eb71c68c
6
+ metadata.gz: 6d5b9c4243fa6eabb4c7c6d76f73358b1bbc7ea55572de7c45a3413ce62aab4107fbc3040c8daa53f732280949523c4c339b218aebbe2e4a1b6eb075ac79ebfc
7
+ data.tar.gz: b04a4f5714f78c9487f4ca3b2ae7d867c0cc1bfc38f311e72262fcaffb42c9cc6fad9039c64fd5a4b5a03dbc818cd582fc0aa3197dd849d4600cb596ebc9ee83
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.1] - 2022-08-29
4
+
5
+ - Fix reloading expired manifest file.
6
+ - Fix typos in readme document.
7
+
3
8
  ## [0.2.0] - 2022-08-04
4
9
 
5
10
  - `Manifest#updated_at` now exposes manifest's modification time.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- precompiled_assets (0.2.0)
4
+ precompiled_assets (0.2.1)
5
5
  railties (>= 6.0.0)
6
6
 
7
7
  GEM
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 motification time from the file system. If your production environments use a distributed file system, it is not recommended for etagging in production.
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
- @mtime || fetch_mtime
24
+ mtime || fetch_mtime
25
25
  end
26
26
 
27
27
  def expired?
28
28
  # Not intended for use in production environments.
29
- @time && @time != fetch_mtime
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
- @mtime = fetch_mtime
47
+ self.mtime = fetch_mtime
46
48
 
47
49
  json = pathname.read
48
50
  JSON.parse(json)
@@ -1,3 +1,3 @@
1
1
  module PrecompiledAssets
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
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.0
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-04 00:00:00.000000000 Z
11
+ date: 2022-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties