Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings and prevent Jbuilder::VERSION constant from being obliterated #574

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

pixeltrix
Copy link
Contributor

Fixes the following warnings:

  • Warning about routes.rb file not existing when running tests
  • Warning about method redefinition in test_helper.rb
  • Warning about constant redefinition in jbuilder.rb

Some warnings remain about gem loading but they appear to be upstream issues.

Also fixes bin/test to use the correct path for the env command and adds Rails 7.2 to the Appraisals file.

The controller scaffold generator tries to insert routes but there isn't
a routes file the tmp folder so it prints a warning instead. Prevent the
warning from being printed by using the option to skip routes.
In e18fe2a the Jbuilder::VERSION constant was introduced but in 9aa3dd9
it was used in the gemspec which changed the loading order so that the
version constant was loaded first. This defined Jbuilder as an Object
subclass rather than the intended BasicObject and when jbuilder/jbuilder
was required it redefined the Jbuilder constant and obliterates the
VERSION constant. This commit ensures that the version constant exists
and the Jbuilder parent class is BasicObject.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant