-
-
Notifications
You must be signed in to change notification settings - Fork 266
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: generators can run without prior migrations #2861
fix: generators can run without prior migrations #2861
Conversation
Code Climate has analyzed commit 48a05c4 and detected 1 issue on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
model.in?(%w[ApplicationRecord]) | ||
end | ||
.each do |model| | ||
begin |
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.
[rubocop] reported by reviewdog 🐶
[Corrected] Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body beginning.
model.in?(%w[ApplicationRecord]) | ||
end | ||
.each do |model| | ||
begin |
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.
[rubocop] reported by reviewdog 🐶
[Corrected] Layout/TrailingWhitespace: Trailing whitespace detected.
model.in?(%w[ApplicationRecord]) | ||
end | ||
.each do |model| | ||
begin |
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.
[rubocop] reported by reviewdog 🐶
[Corrected] Style/RedundantBegin: Redundant begin block detected.
end | ||
.each do |model| | ||
begin | ||
invoke "avo:resource", [model.underscore], {} |
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.
[rubocop] reported by reviewdog 🐶
[Corrected] Layout/IndentationWidth: Use 2 (not 4) spaces for indentation.
.each do |model| | ||
begin | ||
invoke "avo:resource", [model.underscore], {} | ||
rescue => e |
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.
[rubocop] reported by reviewdog 🐶
[Corrected] Layout/RescueEnsureAlignment: rescue at 20, 12 is not aligned with models
model_name.camelize.constantize | ||
model_name.camelize | ||
rescue NameError | ||
nil |
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.
[rubocop] reported by reviewdog 🐶
[Corrected] Layout/IndentationWidth: Use 2 (not 0) spaces for indentation.
models | ||
.each do |model| | ||
begin | ||
Rails::Generators.invoke "avo:resource", [model.underscore], {} |
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.
[rubocop] reported by reviewdog 🐶
[Corrected] Layout/IndentationWidth: Use 2 (not 4) spaces for indentation.
.each do |model| | ||
begin | ||
Rails::Generators.invoke "avo:resource", [model.underscore], {} | ||
rescue => e |
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.
[rubocop] reported by reviewdog 🐶
[Corrected] Layout/RescueEnsureAlignment: rescue at 18, 12 is not aligned with models
This PR has been merged into Please check the release guide for more information. |
Description
Fixes an issue where the generators would fail if there were pending migrations.
This is common if you install rails, run the devise generator and then Avo's.
This PR also brings a new command
all_resources
which will generate all resources.Problem
We're now stuck at generating all the resources. The
all_resources
generator will not continue past the first resource it finds.Checklist:
Screenshots & recording
Manual review steps
Manual reviewer: please leave a comment with output from the test if that's the case.