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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 78f1e4155bf62341ff89f8740ae745ad8d661a4268d6770bd9c7c5117ec1c516
4
- data.tar.gz: 9f940702b52d4b4d2d6e17a62292cad384cf1c3a37ef73b34d94271bdb160bbc
3
+ metadata.gz: fe05b41d6d14b07c685da85ad0d3f7f89f15964372a0caa370d9774e990936a4
4
+ data.tar.gz: 35f84323f06c0132e245a5b6db03d852374be0887a52131273bf098c9d8cdf72
5
5
  SHA512:
6
- metadata.gz: 73e1eb2404abc24a6ca389019012bb43aa26f37de80efc7db5f66bc56a41e3b9ca4c12f9b830957df9265baf31a915d52326690b844596e1fd269faba038be3a
7
- data.tar.gz: c1eafb1385dc6eaeeacb0e589964cb1d2de997642e5cccba4e77ba72bb6ef11318e45a1d0d7e625100412da47ed96aca895ea90324c8bb80aa70f30f9ad05806
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)
@@ -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
- # Map logical names to physical files (Propshaft style)
172
- if relative_path.include?('application') && relative_path.end_with?('.js')
173
- manifest['application.js'] = {
174
- 'logical_path' => 'application.js',
175
- 'pathname' => Pathname.new(relative_path),
176
- 'digest' => Digest::MD5.file(file).hexdigest
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,
@@ -1,3 +1,3 @@
1
1
  module Railpack
2
- VERSION = "1.2.8"
2
+ VERSION = "1.2.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.8
4
+ version: 1.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - 21tycoons LLC