Skip to content

Commit 4252368

Browse files
justin808claude
authored andcommitted
Improve method naming: use public_bundles_full_path instead of public_assets_full_path
- Rename public_assets_full_path → public_bundles_full_path for specificity - "public_bundles" is clearer than "public_assets" in Rails context - Avoids confusion with general Rails public assets (images, stylesheets, etc.) - Method specifically handles webpack bundles, not general assets - Update all internal references to use the more specific naming - Maintain backwards compatibility through generated_assets_full_path alias This creates clear semantic distinction: - public_bundles_full_path → webpack bundles in public directories - server_bundle_private_path → server bundles in private directories 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 3d5c7ea commit 4252368

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/react_on_rails/utils.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def self.bundle_js_file_path(bundle_name)
7979
# Default to the non-hashed name in the specified output directory, which, for legacy
8080
# React on Rails, this is the output directory picked up by the asset pipeline.
8181
# For Shakapacker, this is the public output path defined in the (shaka/web)packer.yml file.
82-
File.join(public_assets_full_path, bundle_name)
82+
File.join(public_bundles_full_path, bundle_name)
8383
else
8484
bundle_js_file_path_with_packer(bundle_name)
8585
end
@@ -155,7 +155,7 @@ def self.react_server_client_manifest_file_path
155155
"react_server_client_manifest_file is nil, ensure it is set in your configuration"
156156
end
157157

158-
@react_server_manifest_path = File.join(public_assets_full_path, asset_name)
158+
@react_server_manifest_path = File.join(public_bundles_full_path, asset_name)
159159
end
160160

161161
def self.running_on_windows?
@@ -191,13 +191,13 @@ def self.using_packer_source_path_is_not_defined_and_custom_node_modules?
191191
ReactOnRails.configuration.node_modules_location.present?
192192
end
193193

194-
def self.public_assets_full_path
194+
def self.public_bundles_full_path
195195
ReactOnRails::PackerUtils.packer_public_output_path
196196
end
197197

198-
# DEPRECATED: Use public_assets_full_path for clarity about public vs private asset paths
198+
# DEPRECATED: Use public_bundles_full_path for clarity about public vs private bundle paths
199199
def self.generated_assets_full_path
200-
public_assets_full_path
200+
public_bundles_full_path
201201
end
202202

203203
def self.gem_available?(name)

0 commit comments

Comments
 (0)