-
Notifications
You must be signed in to change notification settings - Fork 141
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
Use wrapped Rails request helpers instead of custom ones #51
Use wrapped Rails request helpers instead of custom ones #51
Conversation
Ah yes, the new syntax. I'll see if I can do something about that. @miq-bot add-label wip |
cb04833
to
b3dec52
Compare
b3dec52
to
f79513c
Compare
@miq-bot rm-label wip |
e5e7d02
to
b23dbfc
Compare
b23dbfc
to
aa22270
Compare
Creates a `RequestHelpers` module in a distinct `Spec::Support::Api` namespace (and moves the `ApiHelper` in there for consistency) with patched versions of the request helpers provided by Rails.
aa22270
to
0fdf463
Compare
Checked commits imtayadeway/manageiq-api@53ca003~...0fdf463 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
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.
Paired on this with @imtayadeway and happy with the results 👍 LGTM
By wrapping
Session#process
to do a little extra work for us (namely defaulting to:as => :json
for PUT/PATCH/POST and merging in the request headers that are created by thebasic_authorize
method), therun_get
,run_post
, etc. helpers become transparent wrappers for the request helpers provided by Rails, meaning that we can simply use those ones instead. I think this will provide a better experience for new contributors who will be more familiar with these helpers (if they are a Rails developer).@miq-bot add-label refactoring, test
@miq-bot assign @abellotti