-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Rewrite API RABL views as Jbuilder #2147
Conversation
adc5f19
to
5fcfa3b
Compare
786315b
to
33d5314
Compare
This copies the JSON caching previously employed by RABL, without serious consideration of its correctness or utility.
489de5a
to
7836835
Compare
This spec failed under the previous RABL caching.
7836835
to
54bb3ea
Compare
4a7e964
to
3013834
Compare
This all looks good to me, are the changes here 100% compatible (as far as you can tell) or is there something we should maybe be aware of that behaves differently? |
Changes should be 100% compatible. One thing to watch out for is we no longer have RABL's implicit checking for records being |
I did a hacky test with our spec suite to ensure that the responses were compatible. For each get/put/post/delete in our test suite I recorded the response (normalized by sorting the JSON keys, starting from the same seed) and compared the output JSON. I found one discrepancy (associations being Afaik, this is good to go |
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.
This looks good to me. Thanks John for the work and the thorough testing.
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.
👍
Great work John! Thanks for the effort on this one.
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.
Great job! 👏
@@ -0,0 +1,17 @@ | |||
json.cache! address do |
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.
I know we just want to reflect views as they are, I just want to take note that this is the only place where cache!
is used without I18n.locale
key. Probably stuff for another PR.
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.
Looks good to me. Thank you John!
We'll need a serious change log entry for this. Everyone that has extended or changed rabl templates will have to adapt. |
RABL was removed from the project on version 2.4.0 (See solidusio#2147 solidusio#2146). This updates the responder template to match with Jbuilder and updates the README file.
RABL was removed from the project on version 2.4.0 (See solidusio#2147 solidusio#2146). This updates the responder template to match with Jbuilder and updates the README file.
This rewrites all of our (previously RABL) API views in Jbuilder
TODO