railpack 1.6.2 → 1.6.3
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 +20 -0
- data/lib/railpack/bundler.rb +11 -3
- data/lib/railpack/bundlers/bun_bundler.rb +28 -11
- data/lib/railpack/bundlers/esbuild_bundler.rb +2 -2
- data/lib/railpack/bundlers/rollup_bundler.rb +2 -2
- data/lib/railpack/bundlers/webpack_bundler.rb +2 -2
- data/lib/railpack/manager.rb +2 -2
- data/lib/railpack/railtie.rb +9 -0
- data/lib/railpack/version.rb +1 -1
- data/lib/railpack.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eec4cd3d3c43df3ab2647565a6ef05b06aba776c77d31a38422ea8d3e244435b
|
|
4
|
+
data.tar.gz: cd4b5210bb5772135ffe98f276a9777b88d966a9e61503318ee7c9be46d46975
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 45c71dbff0d90b81d5f09b17b9e9aa3617f61e1130151da6bcff7a83bf6b0e66f4cc2eb940c10ab55223f22a5572c455a443d9fcc9b5791f3f40883ef2eebbbf
|
|
7
|
+
data.tar.gz: 2ca52f07f3177f0e4b9fc1272d893a730ef7cb393f9e528df07649c0d5f4f7ac3be774f12a33877c6339dbdf1c90d5acde73ace7500c4b06f8fc579faac847a0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.6.3] - 2026-01-31
|
|
4
|
+
|
|
5
|
+
### 🔧 **Rails 8 Stability Fixes**
|
|
6
|
+
|
|
7
|
+
This release includes stability improvements and compatibility fixes for Rails 8 discovered during real-world testing.
|
|
8
|
+
|
|
9
|
+
#### ✨ **Rails Integration**
|
|
10
|
+
- **Added Rails::Railtie** - Proper Rails::Railtie class for automatic Rake task loading
|
|
11
|
+
- **Auto-loading Support** - Rake tasks now load automatically with Rails 8
|
|
12
|
+
|
|
13
|
+
#### 🛠️ **Bundler Improvements**
|
|
14
|
+
- **Bun Path Detection** - Automatic detection of bun executable across different systems
|
|
15
|
+
- **Command Architecture** - Refactored bundler commands for better Rails 8 compatibility
|
|
16
|
+
- **Package.json Support** - Enhanced script detection for flexible workflows
|
|
17
|
+
|
|
18
|
+
#### 🧪 **Quality Assurance**
|
|
19
|
+
- **All Tests Pass** - 75 tests with 259 assertions continue to pass
|
|
20
|
+
- **Rails 8 Compatible** - Verified compatibility with Rails 8
|
|
21
|
+
- **Backward Compatible** - All existing functionality preserved
|
|
22
|
+
|
|
3
23
|
## [1.6.2] - 2026-01-29
|
|
4
24
|
|
|
5
25
|
### 🧪 **Test Suite Completion - Previously Skipped Tests Now Passing**
|
data/lib/railpack/bundler.rb
CHANGED
|
@@ -91,11 +91,19 @@ module Railpack
|
|
|
91
91
|
protected
|
|
92
92
|
|
|
93
93
|
def execute(command_array)
|
|
94
|
-
|
|
94
|
+
if respond_to?(:base_command)
|
|
95
|
+
system(base_command, *command_array)
|
|
96
|
+
else
|
|
97
|
+
system(*command_array)
|
|
98
|
+
end
|
|
95
99
|
end
|
|
96
100
|
|
|
97
101
|
def execute!(command_array)
|
|
98
|
-
|
|
102
|
+
if respond_to?(:base_command)
|
|
103
|
+
stdout, stderr, status = Open3.capture3(base_command, *command_array)
|
|
104
|
+
else
|
|
105
|
+
stdout, stderr, status = Open3.capture3(*command_array)
|
|
106
|
+
end
|
|
99
107
|
|
|
100
108
|
unless status.success?
|
|
101
109
|
command_string = Shellwords.join(command_array)
|
|
@@ -143,7 +151,7 @@ module Railpack
|
|
|
143
151
|
end
|
|
144
152
|
|
|
145
153
|
def install!(args = [])
|
|
146
|
-
execute
|
|
154
|
+
execute([package_manager, "install", *args])
|
|
147
155
|
end
|
|
148
156
|
|
|
149
157
|
def add(*packages)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module Railpack
|
|
2
2
|
class BunBundler < Bundler
|
|
3
3
|
def base_command
|
|
4
|
-
"bun"
|
|
4
|
+
@base_command ||= detect_bun_path || "bun"
|
|
5
5
|
end
|
|
6
6
|
|
|
7
7
|
def default_commands
|
|
@@ -9,18 +9,22 @@ module Railpack
|
|
|
9
9
|
has_watch_script = package_json_has_script?('watch')
|
|
10
10
|
|
|
11
11
|
{
|
|
12
|
-
build: has_build_script ? "
|
|
13
|
-
watch: has_watch_script ? "
|
|
14
|
-
install: "
|
|
15
|
-
add: "
|
|
16
|
-
remove: "
|
|
17
|
-
exec:
|
|
18
|
-
version: "
|
|
12
|
+
build: has_build_script ? "run build" : "build",
|
|
13
|
+
watch: has_watch_script ? "run watch" : "build --watch",
|
|
14
|
+
install: "install",
|
|
15
|
+
add: "add",
|
|
16
|
+
remove: "remove",
|
|
17
|
+
exec: "",
|
|
18
|
+
version: "--version"
|
|
19
19
|
}
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
+
def execute(command_array)
|
|
23
|
+
system(base_command, *command_array)
|
|
24
|
+
end
|
|
25
|
+
|
|
22
26
|
def install!(args = [])
|
|
23
|
-
execute
|
|
27
|
+
execute([commands[:install], *args])
|
|
24
28
|
end
|
|
25
29
|
|
|
26
30
|
def add(*packages)
|
|
@@ -36,11 +40,11 @@ module Railpack
|
|
|
36
40
|
end
|
|
37
41
|
|
|
38
42
|
def version
|
|
39
|
-
`#{commands[:version]}`.strip
|
|
43
|
+
`#{base_command} #{commands[:version]}`.strip
|
|
40
44
|
end
|
|
41
45
|
|
|
42
46
|
def installed?
|
|
43
|
-
system("#{commands[:version]} > /dev/null 2>&1")
|
|
47
|
+
system("#{base_command} #{commands[:version]} > /dev/null 2>&1")
|
|
44
48
|
end
|
|
45
49
|
|
|
46
50
|
def build!(args = [])
|
|
@@ -55,6 +59,19 @@ module Railpack
|
|
|
55
59
|
|
|
56
60
|
private
|
|
57
61
|
|
|
62
|
+
def detect_bun_path
|
|
63
|
+
possible_paths = [
|
|
64
|
+
File.expand_path("~/.bun/bin/bun"),
|
|
65
|
+
"/usr/local/bin/bun",
|
|
66
|
+
"/opt/homebrew/bin/bun",
|
|
67
|
+
"/home/linuxbrew/.linuxbrew/bin/bun",
|
|
68
|
+
"/usr/bin/bun",
|
|
69
|
+
"/bin/bun"
|
|
70
|
+
]
|
|
71
|
+
|
|
72
|
+
possible_paths.find { |path| File.executable?(path) }
|
|
73
|
+
end
|
|
74
|
+
|
|
58
75
|
def package_json_has_script?(script_name)
|
|
59
76
|
return false unless File.exist?('package.json')
|
|
60
77
|
|
|
@@ -15,12 +15,12 @@ module Railpack
|
|
|
15
15
|
|
|
16
16
|
def build!(args = [])
|
|
17
17
|
full_args = build_command_args(:build, args)
|
|
18
|
-
execute!(
|
|
18
|
+
execute!(full_args)
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def watch(args = [])
|
|
22
22
|
full_args = build_command_args(:watch, args)
|
|
23
|
-
execute(
|
|
23
|
+
execute(full_args)
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
end
|
|
@@ -15,12 +15,12 @@ module Railpack
|
|
|
15
15
|
|
|
16
16
|
def build!(args = [])
|
|
17
17
|
full_args = build_command_args(:build, args)
|
|
18
|
-
execute!(
|
|
18
|
+
execute!(full_args)
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def watch(args = [])
|
|
22
22
|
full_args = build_command_args(:watch, args)
|
|
23
|
-
execute(
|
|
23
|
+
execute(full_args)
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
end
|
|
@@ -15,12 +15,12 @@ module Railpack
|
|
|
15
15
|
|
|
16
16
|
def build!(args = [])
|
|
17
17
|
full_args = build_command_args(:build, args)
|
|
18
|
-
execute!(
|
|
18
|
+
execute!(full_args)
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def watch(args = [])
|
|
22
22
|
full_args = build_command_args(:watch, args)
|
|
23
|
-
execute(
|
|
23
|
+
execute(full_args)
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
end
|
data/lib/railpack/manager.rb
CHANGED
|
@@ -18,9 +18,9 @@ module Railpack
|
|
|
18
18
|
# and generates appropriate manifests for asset discovery.
|
|
19
19
|
class Manager
|
|
20
20
|
BUNDLERS = {
|
|
21
|
-
'bun'
|
|
21
|
+
'bun' => BunBundler,
|
|
22
22
|
'esbuild' => EsbuildBundler,
|
|
23
|
-
'rollup'
|
|
23
|
+
'rollup' => RollupBundler,
|
|
24
24
|
'webpack' => WebpackBundler
|
|
25
25
|
}
|
|
26
26
|
|
data/lib/railpack/version.rb
CHANGED
data/lib/railpack.rb
CHANGED
|
@@ -4,6 +4,7 @@ require 'active_support/concern'
|
|
|
4
4
|
require 'active_support/core_ext/module/attribute_accessors'
|
|
5
5
|
|
|
6
6
|
require_relative "railpack/version"
|
|
7
|
+
require_relative "railpack/railtie"
|
|
7
8
|
require_relative "railpack/hooks"
|
|
8
9
|
require_relative "railpack/bundler"
|
|
9
10
|
require_relative "railpack/bundlers/bun_bundler"
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: railpack
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- 21tycoons LLC
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-01-
|
|
10
|
+
date: 2026-01-31 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: activesupport
|
|
@@ -65,6 +65,7 @@ files:
|
|
|
65
65
|
- lib/railpack/hooks.rb
|
|
66
66
|
- lib/railpack/manager.rb
|
|
67
67
|
- lib/railpack/manifest.rb
|
|
68
|
+
- lib/railpack/railtie.rb
|
|
68
69
|
- lib/railpack/version.rb
|
|
69
70
|
- lib/tasks/railpack.rake
|
|
70
71
|
- test/bundler_test.rb
|