-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Update scaffold generator to care about --api flag. #1685
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
The CI failures seem to be of two kinds:
How should I proceed? Do you have suggestions on what to extract out of the ScaffoldGenerator class, and how to address the weird errors? |
I've bumped the broken build, you'll need to fix the rubocop failure though.
It's a side effect of the version we're running. |
Per the linked issue, the easiest way to satisfy Rubocop here would be to just drop these methods. Is it okay, if that solution were to be accepted, to do that in this PR? |
If you're sure they're not used, the build should fail if they are... |
Rebasing to current master and updating. |
I chose to test for |
context "with invalid params" do | ||
it "renders a JSON response with errors for the <%= ns_file_name %>" do | ||
<% if RUBY_VERSION < '1.9.3' -%> | ||
<%= file_name %> = <%= class_name %>.create! valid_attributes |
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.
you missed moving this file name assignment up to outside of the 1.9.3 conditional, so this does not work on ruby interpreters greater than or equal to 1.9.3, can you add a spec for this case and make it pass? Thanks
@k3rni sorry about the slow review here, it's been a crazy week at work. I've left you a review note, but apart from that, I think this looks great and I'll merge it when you're done 👍 Thank you so much ✨ |
@samphippen so basically just move the assignment (line 140 above) up outside the conditional, and verify in tests, got it. |
Thanks ❤️ |
* Update scaffold generator to care about --api flag. * Fix misplaced assignment in update/invalid params test.
[skip ci]
with JSON expectations
Addresses #1672