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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65190ba06f3b41df3783655f29f50d8bddfc9e3380698a0c76f4c29f5e1b4841
4
- data.tar.gz: e417b5906674f996132cdf84b92ee66cfad9c9e2d5e8b2917a2125dd5dc58965
3
+ metadata.gz: 377ff051b0ee804f2c9e982603cb06fc11314d9a20922aca84aaa865a22021ab
4
+ data.tar.gz: 4fcb83e37190b5eab67c6babe9b1aaa1f42e789ad2cbbce623490e1c13d389a3
5
5
  SHA512:
6
- metadata.gz: fbec7a17d5c6dcb309fc30d5880206ec0507d771b5f08c01bbed97bdaf4a35ba0402da65956723c6824ce5087f973b84c8dc2accf736d292d692b22cd44aee81
7
- data.tar.gz: d064a8f46b8e517ee119ccb29ecbc13c9ab87f67291529dc5b3aae02a9cc6fe7a36b0652f604dbfb34ee7df813aef2e6a1987bff0348f130db9743b23cc29c04
6
+ metadata.gz: f6a16c4238742a44057414a3a3be7b60fa6392b0843c226fe05830e71d4a18b676d443b151e95a5f12817791d577d5fddcc5051b01914747ccf20acc19c340e7
7
+ data.tar.gz: 58572ccb8a7adb9c920e5022ddec905d33d6a6da73806e5b218653f5a4ff1f80c2ec605dc75824b3959869119ca0bea560bca2e749fe30855e3b9ed5bc342604
@@ -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'] = relative_path
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'] = relative_path
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 asset pipeline
147
- manifest_path = "#{outdir}/.sprockets-manifest-#{Digest::MD5.hexdigest(manifest.to_s)}.json"
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 asset manifest: #{manifest_path}"
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
@@ -1,3 +1,3 @@
1
1
  module Railpack
2
- VERSION = "1.2.1"
2
+ VERSION = "1.2.2"
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.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - 21tycoons LLC