Skip to content

Commit 3d5c7ea

Browse files
justin808claude
authored andcommitted
Clarify method naming: rename generated_assets_full_path → public_assets_full_path
- Add new `public_assets_full_path` method to be explicit about public asset paths - Keep `generated_assets_full_path` as backwards-compatible deprecated alias - Update internal references to use clearer `public_assets_full_path` method - Addresses naming ambiguity concern about whether paths are public or private - Prepares for future evolution toward simplified public-only asset resolution This improvement clarifies the distinction between: - Public asset paths (client bundles, manifests) → public_assets_full_path - Private asset paths (server bundles with enforcement) → server_bundle_private_path 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 60d498d commit 3d5c7ea

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/react_on_rails/utils.rb

Lines changed: 8 additions & 3 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(generated_assets_full_path, bundle_name)
82+
File.join(public_assets_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(generated_assets_full_path, asset_name)
158+
@react_server_manifest_path = File.join(public_assets_full_path, asset_name)
159159
end
160160

161161
def self.running_on_windows?
@@ -191,10 +191,15 @@ 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.generated_assets_full_path
194+
def self.public_assets_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
199+
def self.generated_assets_full_path
200+
public_assets_full_path
201+
end
202+
198203
def self.gem_available?(name)
199204
Gem.loaded_specs[name].present?
200205
rescue Gem::LoadError

0 commit comments

Comments
 (0)