railpack 1.2.4 → 1.2.5

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: 21f2c37d6ae5d2b014ce1271ee6a641f16c3794b62cd02b2247a50ba3f85e05b
4
- data.tar.gz: 9246c36e1e123dea6c9cc79d0695255ebeeb2500bb6cd44f82cc4c1980728706
3
+ metadata.gz: b13af1329c7192e2a8fd5c83eb0cc9ff07a0edec87b7311dedae0f26b4710975
4
+ data.tar.gz: 757f2eedf1421e59d9ae165f13a353918cdad3bad8cee83cdf0bc60078ede4d1
5
5
  SHA512:
6
- metadata.gz: d4c07780ac0d88dbe06a6cb0812c19621f56452afe25da7c5ceac7217c4b1003cb0b93fdb1e48cffde26459f8fd6e5333ff6ea8f32a5246ba7bd3131b7855d3c
7
- data.tar.gz: 858a12ceb1ea3811f05b567886162bb1a3d60d35a07ee42b529ced30ee9dfbccdd2ce71afb999013d3f3f1152915734fcd1906f7d85fd5709cb9b1f0b72edbac
6
+ metadata.gz: f14bb9cb2f37592089c517a4c8dcd16185bf9fa6d5029344031c58e9f54baa1cea24a0542bb8059f96acc59d54d0aec00b3c783f787ba5188743553b63864777
7
+ data.tar.gz: 17748f4d280fbfebefec259db9525daf4609285886a98a0027cd29a53a1c5a8aa0ff3007e05ffed4c96802a048d58cceae3ec2d056ab50f9c953f7d3e276ad40
data/CHANGELOG.md CHANGED
@@ -1,11 +1,19 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.2.5] - 2026-01-26
4
+
5
+ - Add test_config_yaml_file_loading test for YAML config file loading
6
+ - Test that Railpack correctly reads config/railpack.yml from Rails.root
7
+ - Test bundler selection, environment overrides, and config merging
8
+ - All 19 tests passing with 72 assertions
9
+
3
10
  ## [1.2.4] - 2026-01-26
4
11
 
5
- - Add comprehensive test suite (18 tests, 62 assertions)
6
- - Test config system, bundler implementations, manager functionality
7
- - Test event hooks, error handling, asset manifest generation
8
- - Test bundle size calculation and Rails integration
12
+ - Add comprehensive test suite (19 tests, 72 assertions)
13
+ - Test config system including YAML file loading from Rails.root
14
+ - Test bundler implementations, manager features, event hooks
15
+ - Test error handling, asset manifest generation, bundle size calculation
16
+ - Test Rails integration and environment overrides
9
17
  - Add default logger with Logger.new($stdout)
10
18
  - Fix logger nil issues in manager
11
19
 
@@ -1,3 +1,3 @@
1
1
  module Railpack
2
- VERSION = "1.2.4"
2
+ VERSION = "1.2.5"
3
3
  end
@@ -56,6 +56,55 @@ class RailpackTest < Minitest::Test
56
56
  assert_equal './app/javascript/application.js', config.entrypoint
57
57
  end
58
58
 
59
+ def test_config_yaml_file_loading
60
+ # Test that Railpack can load config from a YAML file
61
+ config_dir = File.join(@temp_dir, 'config')
62
+ FileUtils.mkdir_p(config_dir)
63
+ config_file = File.join(config_dir, 'railpack.yml')
64
+
65
+ File.write(config_file, <<~YAML)
66
+ default:
67
+ bundler: rollup
68
+ target: node
69
+ format: cjs
70
+ entrypoint: "./server.js"
71
+ outdir: "dist"
72
+ minify: false
73
+ development:
74
+ sourcemap: true
75
+ production:
76
+ minify: true
77
+ sourcemap: false
78
+ YAML
79
+
80
+ # Verify the file was created
81
+ assert File.exist?(config_file), "Config file should exist at #{config_file}"
82
+
83
+ # Mock Rails.root to point to our temp directory
84
+ mock_rails_root(@temp_dir)
85
+
86
+ # Create a fresh config instance to test file loading
87
+ config = Railpack::Config.new
88
+
89
+
90
+
91
+ # Test that the YAML file was loaded correctly
92
+ assert_equal 'rollup', config.bundler
93
+ assert_equal './server.js', config.entrypoint
94
+ assert_equal 'dist', config.outdir
95
+ assert_equal 'node', config.target
96
+ assert_equal 'cjs', config.format
97
+ assert_equal false, config.minify
98
+
99
+ # Test environment overrides
100
+ dev_config = config.for_environment('development')
101
+ prod_config = config.for_environment('production')
102
+
103
+ assert_equal true, dev_config['sourcemap']
104
+ assert_equal true, prod_config['minify']
105
+ assert_equal false, prod_config['sourcemap']
106
+ end
107
+
59
108
  def test_config_environment_overrides
60
109
  # Test environment override logic with default config
61
110
  config = Railpack::Config.new
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.4
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - 21tycoons LLC