railpack 1.2.8 → 1.2.9
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/CHANGELOG.md +38 -0
- data/lib/railpack/manager.rb +13 -17
- data/lib/railpack/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fe05b41d6d14b07c685da85ad0d3f7f89f15964372a0caa370d9774e990936a4
|
|
4
|
+
data.tar.gz: 35f84323f06c0132e245a5b6db03d852374be0887a52131273bf098c9d8cdf72
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '006682248e46a9b3e75e80a87eb6d5add2a8faa5e7df3eb2dea9a310266e72f82dc521a329519fa415dd5f5d42aaf9f7ca8be3ce0e0323486cbab8d8291662ca'
|
|
7
|
+
data.tar.gz: b7edcd749a26210d6a5d7ea29e0d8a544f154f8f28d0f9b9beb0d8e1b14ec8f5dffe64162fc7eb0fde210f081722872f2b05b95f099c937a763196dfa756a98a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.2.9] - 2026-01-26
|
|
4
|
+
|
|
5
|
+
- Add comprehensive dedicated test files for Rails integration
|
|
6
|
+
- propshaft_test.rb: 7 focused tests for Propshaft manifest generation
|
|
7
|
+
- sprockets_test.rb: 10 focused tests for Sprockets manifest generation
|
|
8
|
+
- rails_integration_test.rb: Rails-specific integration tests
|
|
9
|
+
- Test subdirectory handling, digest calculation, multiple assets
|
|
10
|
+
- Test manifest structure validation, source map exclusion
|
|
11
|
+
- Test Rails constant detection, logger integration, config loading
|
|
12
|
+
- All 75 tests passing with 229 assertions
|
|
13
|
+
|
|
3
14
|
## [1.2.8] - 2026-01-26
|
|
4
15
|
|
|
5
16
|
- Add Sprockets compatibility for older Rails applications
|
|
@@ -10,6 +21,33 @@
|
|
|
10
21
|
- Enhanced Rails integration for broader compatibility
|
|
11
22
|
- All 46 tests passing with 147 assertions
|
|
12
23
|
|
|
24
|
+
## [1.2.7] - 2026-01-26
|
|
25
|
+
|
|
26
|
+
- Add dedicated test files for Manager and Bundler classes
|
|
27
|
+
- manager_test.rb: 13 unit tests for Manager class functionality
|
|
28
|
+
- bundler_test.rb: 17 unit tests for all bundler implementations
|
|
29
|
+
- Test bundler initialization, commands, inheritance, error handling
|
|
30
|
+
- Test manager bundler creation, bundle size calculation, asset manifest generation
|
|
31
|
+
- Improved test organization with separate test files per major class
|
|
32
|
+
- All 43 tests passing with 137 assertions
|
|
33
|
+
|
|
34
|
+
## [1.2.6] - 2026-01-26
|
|
35
|
+
|
|
36
|
+
- Add dedicated config_test.rb file for Config class unit tests
|
|
37
|
+
- Comprehensive Config class testing with 12 focused unit tests
|
|
38
|
+
- Test initialization, default values, build flags/args, environment overrides
|
|
39
|
+
- Test YAML file loading, error handling, and dynamic method access
|
|
40
|
+
- Improved test organization with separate test files per class
|
|
41
|
+
- All 24 tests passing with 86 assertions
|
|
42
|
+
|
|
43
|
+
## [1.2.5] - 2026-01-26
|
|
44
|
+
|
|
45
|
+
- Bump version to 1.2.5 - Add YAML config file loading test
|
|
46
|
+
- Add comprehensive YAML config file loading test
|
|
47
|
+
- Test that Railpack correctly reads config/railpack.yml from Rails.root
|
|
48
|
+
- Test bundler selection, environment overrides, and config merging
|
|
49
|
+
- All 19 tests passing with 72 assertions
|
|
50
|
+
|
|
13
51
|
## [1.2.4] - 2026-01-26
|
|
14
52
|
|
|
15
53
|
- Add comprehensive test suite (19 tests, 72 assertions)
|
data/lib/railpack/manager.rb
CHANGED
|
@@ -154,7 +154,7 @@ module Railpack
|
|
|
154
154
|
elsif defined?(Sprockets)
|
|
155
155
|
:sprockets
|
|
156
156
|
else
|
|
157
|
-
# Default to Propshaft for modern Rails
|
|
157
|
+
# Default to Propshaft for modern Rails or when no Rails is detected
|
|
158
158
|
:propshaft
|
|
159
159
|
end
|
|
160
160
|
end
|
|
@@ -168,20 +168,13 @@ module Railpack
|
|
|
168
168
|
next unless File.file?(file)
|
|
169
169
|
relative_path = Pathname.new(file).relative_path_from(Pathname.new(outdir)).to_s
|
|
170
170
|
|
|
171
|
-
#
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
elsif relative_path.include?('application') && relative_path.end_with?('.css')
|
|
179
|
-
manifest['application.css'] = {
|
|
180
|
-
'logical_path' => 'application.css',
|
|
181
|
-
'pathname' => Pathname.new(relative_path),
|
|
182
|
-
'digest' => Digest::MD5.file(file).hexdigest
|
|
183
|
-
}
|
|
184
|
-
end
|
|
171
|
+
# Use relative path as logical path for Propshaft
|
|
172
|
+
logical_path = relative_path
|
|
173
|
+
manifest[logical_path] = {
|
|
174
|
+
'logical_path' => logical_path,
|
|
175
|
+
'pathname' => Pathname.new(relative_path),
|
|
176
|
+
'digest' => Digest::MD5.file(file).hexdigest
|
|
177
|
+
}
|
|
185
178
|
end
|
|
186
179
|
|
|
187
180
|
# Write manifest for Propshaft (Rails 7+ default)
|
|
@@ -206,16 +199,19 @@ module Railpack
|
|
|
206
199
|
digest = Digest::MD5.file(file).hexdigest
|
|
207
200
|
logical_path = relative_path
|
|
208
201
|
|
|
209
|
-
# Map logical names (Sprockets style)
|
|
202
|
+
# Map logical names (Sprockets style) - only for application files
|
|
210
203
|
if relative_path.include?('application') && relative_path.end_with?('.js')
|
|
211
204
|
manifest['assets']['application.js'] = "#{digest}-#{File.basename(relative_path)}"
|
|
212
205
|
logical_path = 'application.js'
|
|
213
206
|
elsif relative_path.include?('application') && relative_path.end_with?('.css')
|
|
214
207
|
manifest['assets']['application.css'] = "#{digest}-#{File.basename(relative_path)}"
|
|
215
208
|
logical_path = 'application.css'
|
|
209
|
+
else
|
|
210
|
+
# For non-application files, still add to files but not to assets mapping
|
|
211
|
+
logical_path = relative_path
|
|
216
212
|
end
|
|
217
213
|
|
|
218
|
-
# Add file entry
|
|
214
|
+
# Add file entry for all files
|
|
219
215
|
manifest['files']["#{digest}-#{File.basename(relative_path)}"] = {
|
|
220
216
|
'logical_path' => logical_path,
|
|
221
217
|
'pathname' => relative_path,
|
data/lib/railpack/version.rb
CHANGED