-
Notifications
You must be signed in to change notification settings - Fork 22k
Optionally skip bundler-audit #55714
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small things but generally looks good
template "application.rb" | ||
template "environment.rb" | ||
template "bundler-audit.yml" | ||
template "bundler-audit.yml" unless options[:skip_bundler_audit] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
template "bundler-audit.yml" unless options[:skip_bundler_audit] | |
template "bundler-audit.yml" unless skip_bundler_audit? |
Is there a reason to use options
here?
end | ||
|
||
if !bundle_audit_config_exist | ||
if !@options[:skip_bundler_audit] && !bundle_audit_config_exist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
136209f
to
722f442
Compare
Tests are broken |
a65d957
to
10040f8
Compare
Running `bin/rails app:update` with Rails 8.1 adds bin/bundler-audit and config/bundler-audit.yml even if it's not in the Gemfile already. This checks whether bundler_audit is in the bundle and otherwise skips for the app generator. Adds config option to skip bundler-audit in new applications. Extends --minimal option to include bundler-audit Updates changelog Updates test assertions re: bundler-audit; the #generate_test_dummy method skips bundle and bundler-audit, so it should not be expected to be present
10040f8
to
0a0addc
Compare
Sorry for the delay -- all comments have been addressed and tests are green :) |
Amazing, thanks! |
Motivation / Background
Was testing the 8.1 upgrade and noticed that bundler-audit files got added when running
bin/rails app:update
, regardless of whether that gem was included in the gemfile.Since the new/update passes are tightly coupled, this also adds the option to
--skip-bundler-audit
when generating a new app. This flag was passed in to the--minimal
generator option as well.Additional information
Added automated testing for newly-generated apps and tested with an app I'm using to test the Rails 8.1 upgrade.
Checklist
[Fix #issue-number]