precompiled_assets 0.2.1 → 0.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bbc13f77485b022c32908da0e53fe6dfe4f82ba717b55cd968c70aa4656bec43
4
- data.tar.gz: f180a457b9aea3ed8a2674feccff3672a2eefe3753a9cdc5332ff0f06baad581
3
+ metadata.gz: 4fdfd14612574dda758b2f305ac00d5557d241ede6b8eefd1c7055f4f12225b1
4
+ data.tar.gz: 8497d12d1f5c7e1cb025f46e5bf16c81562cf37c98a4ef5d1c6822b086c386c1
5
5
  SHA512:
6
- metadata.gz: 6d5b9c4243fa6eabb4c7c6d76f73358b1bbc7ea55572de7c45a3413ce62aab4107fbc3040c8daa53f732280949523c4c339b218aebbe2e4a1b6eb075ac79ebfc
7
- data.tar.gz: b04a4f5714f78c9487f4ca3b2ae7d867c0cc1bfc38f311e72262fcaffb42c9cc6fad9039c64fd5a4b5a03dbc818cd582fc0aa3197dd849d4600cb596ebc9ee83
6
+ metadata.gz: 9f40e81ebfdc9c068c4849cf1539329713cf696ce0b8abbc1da7ecd0231816968905ce5b8774fa922ef9a45bfe0689f4121f4d029086eb7353a76c1c54cadc44
7
+ data.tar.gz: 105792548691c0163179caac86d133934cf640ad6e9f5249528193844d78d7d36de923eba9b04ebd139e1c147b6abfc828e47b24875c626c96030ee3862edb7e
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.1.2
1
+ 3.4.6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.3.0] - 2025-09-22
4
+
5
+ - Support for ViewComponent 4. (ViewComponent 3 support was implicit due to its `ActionView::Base` dependency.)
6
+
3
7
  ## [0.2.1] - 2022-08-29
4
8
 
5
9
  - Fix reloading expired manifest file.
data/Gemfile.lock CHANGED
@@ -1,95 +1,158 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- precompiled_assets (0.2.1)
4
+ precompiled_assets (0.3.0)
5
5
  railties (>= 6.0.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actionpack (7.0.3.1)
11
- actionview (= 7.0.3.1)
12
- activesupport (= 7.0.3.1)
13
- rack (~> 2.0, >= 2.2.0)
10
+ actionpack (8.0.2.1)
11
+ actionview (= 8.0.2.1)
12
+ activesupport (= 8.0.2.1)
13
+ nokogiri (>= 1.8.5)
14
+ rack (>= 2.2.4)
15
+ rack-session (>= 1.0.1)
14
16
  rack-test (>= 0.6.3)
15
- rails-dom-testing (~> 2.0)
16
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
17
- actionview (7.0.3.1)
18
- activesupport (= 7.0.3.1)
17
+ rails-dom-testing (~> 2.2)
18
+ rails-html-sanitizer (~> 1.6)
19
+ useragent (~> 0.16)
20
+ actionview (8.0.2.1)
21
+ activesupport (= 8.0.2.1)
19
22
  builder (~> 3.1)
20
- erubi (~> 1.4)
21
- rails-dom-testing (~> 2.0)
22
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
23
- activesupport (7.0.3.1)
24
- concurrent-ruby (~> 1.0, >= 1.0.2)
23
+ erubi (~> 1.11)
24
+ rails-dom-testing (~> 2.2)
25
+ rails-html-sanitizer (~> 1.6)
26
+ activesupport (8.0.2.1)
27
+ base64
28
+ benchmark (>= 0.3)
29
+ bigdecimal
30
+ concurrent-ruby (~> 1.0, >= 1.3.1)
31
+ connection_pool (>= 2.2.5)
32
+ drb
25
33
  i18n (>= 1.6, < 2)
34
+ logger (>= 1.4.2)
26
35
  minitest (>= 5.1)
27
- tzinfo (~> 2.0)
28
- ast (2.4.2)
29
- builder (3.2.4)
30
- concurrent-ruby (1.1.10)
36
+ securerandom (>= 0.3)
37
+ tzinfo (~> 2.0, >= 2.0.5)
38
+ uri (>= 0.13.1)
39
+ ast (2.4.3)
40
+ base64 (0.3.0)
41
+ benchmark (0.4.1)
42
+ bigdecimal (3.2.3)
43
+ builder (3.3.0)
44
+ concurrent-ruby (1.3.5)
45
+ connection_pool (2.5.4)
31
46
  crass (1.0.6)
32
- erubi (1.10.0)
33
- i18n (1.12.0)
47
+ date (3.4.1)
48
+ drb (2.2.3)
49
+ erb (5.0.2)
50
+ erubi (1.13.1)
51
+ i18n (1.14.7)
34
52
  concurrent-ruby (~> 1.0)
35
- loofah (2.18.0)
53
+ io-console (0.8.1)
54
+ irb (1.15.2)
55
+ pp (>= 0.6.0)
56
+ rdoc (>= 4.0.0)
57
+ reline (>= 0.4.2)
58
+ json (2.15.0)
59
+ language_server-protocol (3.17.0.5)
60
+ logger (1.7.0)
61
+ loofah (2.24.1)
36
62
  crass (~> 1.0.2)
37
- nokogiri (>= 1.5.9)
38
- makandra-rubocop (9.1.0)
39
- rubocop (~> 1.25.0)
40
- rubocop-rails (~> 2.11.3)
41
- rubocop-rspec (~> 2.4.0)
42
- method_source (1.0.0)
43
- minitest (5.16.2)
44
- nokogiri (1.13.8-x86_64-linux)
63
+ nokogiri (>= 1.12.0)
64
+ makandra-rubocop (16.2.0)
65
+ rubocop (~> 1.70.0)
66
+ rubocop-capybara (~> 2.20.0)
67
+ rubocop-factory_bot (~> 2.25.1)
68
+ rubocop-rails (~> 2.23.1)
69
+ rubocop-rspec (~> 3.0.3)
70
+ rubocop-rspec_rails (~> 2.30.0)
71
+ minitest (5.25.5)
72
+ nokogiri (1.18.10-x86_64-linux-gnu)
45
73
  racc (~> 1.4)
46
- parallel (1.22.1)
47
- parser (3.1.2.0)
74
+ parallel (1.27.0)
75
+ parser (3.3.9.0)
48
76
  ast (~> 2.4.1)
49
- racc (1.6.0)
50
- rack (2.2.4)
51
- rack-test (2.0.2)
77
+ racc
78
+ pp (0.6.2)
79
+ prettyprint
80
+ prettyprint (0.2.0)
81
+ prism (1.5.1)
82
+ psych (5.2.6)
83
+ date
84
+ stringio
85
+ racc (1.8.1)
86
+ rack (3.2.1)
87
+ rack-session (2.1.1)
88
+ base64 (>= 0.1.0)
89
+ rack (>= 3.0.0)
90
+ rack-test (2.2.0)
52
91
  rack (>= 1.3)
53
- rails-dom-testing (2.0.3)
54
- activesupport (>= 4.2.0)
92
+ rackup (2.2.1)
93
+ rack (>= 3)
94
+ rails-dom-testing (2.3.0)
95
+ activesupport (>= 5.0.0)
96
+ minitest
55
97
  nokogiri (>= 1.6)
56
- rails-html-sanitizer (1.4.3)
57
- loofah (~> 2.3)
58
- railties (7.0.3.1)
59
- actionpack (= 7.0.3.1)
60
- activesupport (= 7.0.3.1)
61
- method_source
98
+ rails-html-sanitizer (1.6.2)
99
+ loofah (~> 2.21)
100
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
101
+ railties (8.0.2.1)
102
+ actionpack (= 8.0.2.1)
103
+ activesupport (= 8.0.2.1)
104
+ irb (~> 1.13)
105
+ rackup (>= 1.0.0)
62
106
  rake (>= 12.2)
63
- thor (~> 1.0)
64
- zeitwerk (~> 2.5)
107
+ thor (~> 1.0, >= 1.2.2)
108
+ zeitwerk (~> 2.6)
65
109
  rainbow (3.1.1)
66
- rake (13.0.6)
67
- regexp_parser (2.5.0)
68
- rexml (3.2.5)
69
- rubocop (1.25.1)
110
+ rake (13.3.0)
111
+ rdoc (6.14.2)
112
+ erb
113
+ psych (>= 4.0.0)
114
+ regexp_parser (2.11.3)
115
+ reline (0.6.2)
116
+ io-console (~> 0.5)
117
+ rubocop (1.70.0)
118
+ json (~> 2.3)
119
+ language_server-protocol (>= 3.17.0)
70
120
  parallel (~> 1.10)
71
- parser (>= 3.1.0.0)
121
+ parser (>= 3.3.0.2)
72
122
  rainbow (>= 2.2.2, < 4.0)
73
- regexp_parser (>= 1.8, < 3.0)
74
- rexml
75
- rubocop-ast (>= 1.15.1, < 2.0)
123
+ regexp_parser (>= 2.9.3, < 3.0)
124
+ rubocop-ast (>= 1.36.2, < 2.0)
76
125
  ruby-progressbar (~> 1.7)
77
- unicode-display_width (>= 1.4.0, < 3.0)
78
- rubocop-ast (1.19.1)
79
- parser (>= 3.1.1.0)
80
- rubocop-rails (2.11.3)
126
+ unicode-display_width (>= 2.4.0, < 4.0)
127
+ rubocop-ast (1.47.1)
128
+ parser (>= 3.3.7.2)
129
+ prism (~> 1.4)
130
+ rubocop-capybara (2.20.0)
131
+ rubocop (~> 1.41)
132
+ rubocop-factory_bot (2.25.1)
133
+ rubocop (~> 1.41)
134
+ rubocop-rails (2.23.1)
81
135
  activesupport (>= 4.2.0)
82
136
  rack (>= 1.1)
83
- rubocop (>= 1.7.0, < 2.0)
84
- rubocop-rspec (2.4.0)
85
- rubocop (~> 1.0)
86
- rubocop-ast (>= 1.1.0)
87
- ruby-progressbar (1.11.0)
88
- thor (1.2.1)
89
- tzinfo (2.0.5)
137
+ rubocop (>= 1.33.0, < 2.0)
138
+ rubocop-ast (>= 1.30.0, < 2.0)
139
+ rubocop-rspec (3.0.5)
140
+ rubocop (~> 1.61)
141
+ rubocop-rspec_rails (2.30.0)
142
+ rubocop (~> 1.61)
143
+ rubocop-rspec (~> 3, >= 3.0.1)
144
+ ruby-progressbar (1.13.0)
145
+ securerandom (0.4.1)
146
+ stringio (3.1.7)
147
+ thor (1.4.0)
148
+ tzinfo (2.0.6)
90
149
  concurrent-ruby (~> 1.0)
91
- unicode-display_width (2.2.0)
92
- zeitwerk (2.6.0)
150
+ unicode-display_width (3.2.0)
151
+ unicode-emoji (~> 4.1)
152
+ unicode-emoji (4.1.0)
153
+ uri (1.0.3)
154
+ useragent (0.16.11)
155
+ zeitwerk (2.7.3)
93
156
 
94
157
  PLATFORMS
95
158
  x86_64-linux
@@ -101,4 +164,4 @@ DEPENDENCIES
101
164
  rubocop
102
165
 
103
166
  BUNDLED WITH
104
- 2.3.18
167
+ 2.6.9
data/README.md CHANGED
@@ -19,6 +19,8 @@ If bundler is not being used to manage dependencies, install the gem by executin
19
19
 
20
20
  $ gem install precompiled_assets
21
21
 
22
+ If your application uses Sprockets, remove `sprockets-rails` (and possibly `sprockets`) from your `Gemfile` as well as any corresponding initializers, `require` statements, and the `config.assets` configuration settings.
23
+
22
24
  ## Usage
23
25
 
24
26
  ### Configuration
@@ -29,6 +31,12 @@ In your `config/application.rb`, configure an `asset_path` which should be in yo
29
31
  config.asset_path = '/assets'
30
32
  ```
31
33
 
34
+ For the `test` environment, you may want to use a separate path, i.e. in your `config/environments/test.rb` say:
35
+
36
+ ```ruby
37
+ config.asset_path = '/assets-test'
38
+ ```
39
+
32
40
  Inside that path, a `manifest.json` is expected to exist which resolves your undigested input names to digested output paths.
33
41
  If your manifest has a different filename, you may set `config.asset_manifest_filename`.
34
42
 
@@ -42,6 +50,8 @@ A manifest file can look like this:
42
50
  }
43
51
  ```
44
52
 
53
+ The [esbuild-manifest-plugin](https://www.npmjs.com/package/esbuild-manifest-plugin) is one way to generate such a manifest during your build process.
54
+
45
55
  Once that is set up, `javascript_include_tag('application.js')` or `image_path('example.png')` will resolve to their digested filenames and paths.
46
56
 
47
57
  In the `development` Rails environment, the gem detects changes to the manifest and reloads the manifest automatically.
@@ -4,9 +4,12 @@ module PrecompiledAssets
4
4
  class Railtie < ::Rails::Railtie
5
5
 
6
6
  config.after_initialize do
7
- ActiveSupport.on_load(:action_view) do
8
- require 'precompiled_assets/helper'
9
- include PrecompiledAssets::Helper
7
+ require 'precompiled_assets/helper'
8
+
9
+ [:action_view, :view_component].each do |framework|
10
+ ActiveSupport.on_load(framework) do
11
+ include PrecompiledAssets::Helper
12
+ end
10
13
  end
11
14
  end
12
15
 
@@ -1,3 +1,3 @@
1
1
  module PrecompiledAssets
2
- VERSION = '0.2.1'.freeze
2
+ VERSION = '0.3.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: precompiled_assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arne Hartherz
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2022-08-29 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: railties
@@ -58,7 +57,6 @@ metadata:
58
57
  homepage_uri: https://github.com/makandra/precompiled_assets
59
58
  source_code_uri: https://github.com/makandra/precompiled_assets
60
59
  changelog_uri: https://github.com/makandra/precompiled_assets/blob/main/CHANGELOG.md
61
- post_install_message:
62
60
  rdoc_options: []
63
61
  require_paths:
64
62
  - lib
@@ -73,8 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
71
  - !ruby/object:Gem::Version
74
72
  version: '0'
75
73
  requirements: []
76
- rubygems_version: 3.3.7
77
- signing_key:
74
+ rubygems_version: 3.6.9
78
75
  specification_version: 4
79
76
  summary: Serve assets without any asset processing in Rails.
80
77
  test_files: []