Skip to content

Commit 5276809

Browse files
ihabadhamclaude
andcommitted
Fix method visibility issue by moving private directive to correct location
The private directive was incorrectly placed after append_to_spec_rails_helper, making critical methods like add_react_on_rails_package, add_react_dependencies, add_css_dependencies, and add_dev_dependencies private when they need to be public for external generators to call them. This was causing the install generator to fail because it couldn't access these methods, leading to gem dependency conflicts during testing. Moved private directive to its proper location after all public methods but before private helper methods like handle_npm_failure. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ad8ff55 commit 5276809

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/generators/react_on_rails/base_generator.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ def append_to_spec_rails_helper
128128
end
129129
end
130130

131-
private
132-
133131
def add_react_on_rails_package
134132
major_minor_patch_only = /\A\d+\.\d+\.\d+\z/
135133

@@ -229,6 +227,8 @@ def install_js_dependencies
229227
end
230228
STR
231229

230+
private
231+
232232
def handle_npm_failure(dependency_type, packages, dev: false)
233233
install_command = dev ? "npm install --save-dev" : "npm install"
234234
GeneratorMessages.add_warning(<<~MSG.strip)

0 commit comments

Comments
 (0)