railpack 1.2.1 → 1.2.2
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/lib/railpack/manager.rb +15 -7
- 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: 377ff051b0ee804f2c9e982603cb06fc11314d9a20922aca84aaa865a22021ab
|
|
4
|
+
data.tar.gz: 4fcb83e37190b5eab67c6babe9b1aaa1f42e789ad2cbbce623490e1c13d389a3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f6a16c4238742a44057414a3a3be7b60fa6392b0843c226fe05830e71d4a18b676d443b151e95a5f12817791d577d5fddcc5051b01914747ccf20acc19c340e7
|
|
7
|
+
data.tar.gz: 58572ccb8a7adb9c920e5022ddec905d33d6a6da73806e5b218653f5a4ff1f80c2ec605dc75824b3959869119ca0bea560bca2e749fe30855e3b9ed5bc342604
|
data/lib/railpack/manager.rb
CHANGED
|
@@ -130,23 +130,31 @@ module Railpack
|
|
|
130
130
|
|
|
131
131
|
manifest = {}
|
|
132
132
|
|
|
133
|
-
# Find built assets
|
|
133
|
+
# Find built assets - Propshaft format
|
|
134
134
|
Dir.glob("#{outdir}/**/*.{js,css}").each do |file|
|
|
135
135
|
next unless File.file?(file)
|
|
136
136
|
relative_path = Pathname.new(file).relative_path_from(Pathname.new(outdir)).to_s
|
|
137
137
|
|
|
138
|
-
# Map logical names to physical files
|
|
138
|
+
# Map logical names to physical files (Propshaft style)
|
|
139
139
|
if relative_path.include?('application') && relative_path.end_with?('.js')
|
|
140
|
-
manifest['application.js'] =
|
|
140
|
+
manifest['application.js'] = {
|
|
141
|
+
'logical_path' => 'application.js',
|
|
142
|
+
'pathname' => Pathname.new(relative_path),
|
|
143
|
+
'digest' => Digest::MD5.file(file).hexdigest
|
|
144
|
+
}
|
|
141
145
|
elsif relative_path.include?('application') && relative_path.end_with?('.css')
|
|
142
|
-
manifest['application.css'] =
|
|
146
|
+
manifest['application.css'] = {
|
|
147
|
+
'logical_path' => 'application.css',
|
|
148
|
+
'pathname' => Pathname.new(relative_path),
|
|
149
|
+
'digest' => Digest::MD5.file(file).hexdigest
|
|
150
|
+
}
|
|
143
151
|
end
|
|
144
152
|
end
|
|
145
153
|
|
|
146
|
-
# Write manifest for Rails
|
|
147
|
-
manifest_path = "#{outdir}/.
|
|
154
|
+
# Write manifest for Propshaft (Rails 7+ default)
|
|
155
|
+
manifest_path = "#{outdir}/.manifest.json"
|
|
148
156
|
File.write(manifest_path, JSON.pretty_generate(manifest))
|
|
149
|
-
Railpack.logger.debug "📄 Generated
|
|
157
|
+
Railpack.logger.debug "📄 Generated Propshaft manifest: #{manifest_path}"
|
|
150
158
|
rescue => error
|
|
151
159
|
Railpack.logger.warn "⚠️ Failed to generate asset manifest: #{error.message}"
|
|
152
160
|
end
|
data/lib/railpack/version.rb
CHANGED