-
Notifications
You must be signed in to change notification settings - Fork 68
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
API Versioning: Supporting Active Model Serializers namespacing #49
Conversation
Do fix the build to start, squash your commits, describe how this is problematic and describe a path for an existing user in UPGRADING. |
@dblock The build seems to fail for external reason of my PR: dependencies are outdated.
I can do the following:
Which sound better to you? What's the policy here? Since it's a development dependency I think it should be kept up to date, especially because Guard officially announced to not support Ruby 2.1 anymore: https://github.com/guard/guard#readme |
16f4870
to
cbd95ed
Compare
Adding failing specs for issue ruby-grape#48 Proposition of implementation for ruby-grape#48 Readme update Travis fix
cbd95ed
to
c2bdab8
Compare
Okay, anything legacy:
... won't pass build. |
I took care of this in #50, you can rebase against master. |
Adding failing specs for issue ruby-grape#48 Proposition of implementation for ruby-grape#48 Readme update Rollback travis
Okay, this seems to be okay now. |
@@ -5,6 +5,8 @@ Use [active_model_serializers](https://github.com/rails-api/active_model_seriali | |||
[![Build Status](https://api.travis-ci.org/jrhe/grape-active_model_serializers.png)](http://travis-ci.org/jrhe/grape-active_model_serializers) [![Dependency Status](https://gemnasium.com/jrhe/grape-active_model_serializers.png)](https://gemnasium.com/jrhe/grape-active_model_serializers) [![Code Climate](https://codeclimate.com/github/jrhe/grape-active_model_serializers.png)](https://codeclimate.com/github/jrhe/grape-active_model_serializers) | |||
|
|||
## Breaking Changes |
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.
Lets move this into an UPGRADING document like https://github.com/ruby-grape/grape/blob/master/UPGRADING.md?
I'll merge this and move the CHANGELOGs and other UPGRADING things around after. Thanks! |
@@ -15,8 +15,12 @@ def call(resource, env) | |||
def fetch_serializer(resource, env) | |||
endpoint = env['api.endpoint'] | |||
options = build_options_from_endpoint(endpoint) | |||
ams_options = {}.tap do |ns| |
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 is almost too much Ruby IMO :)
ams_options = {}
ams_options[:namespace] = options[:version].try(:classify) if options.try(:[], :version)
Adding failling spec for issue #48