-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Clear out master, move 0.10.x dev to the stable branch #2121
Conversation
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.
Noting some of the changes
@@ -0,0 +1,92 @@ | |||
## 0.08.x |
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.
gets its own changelog
@@ -0,0 +1,74 @@ | |||
## 0.09.x |
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.
gets its own changelog
@@ -0,0 +1,466 @@ | |||
## 0.10.x |
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.
gets its own changelog
@@ -10,641 +10,10 @@ Fixes: | |||
|
|||
Misc: | |||
|
|||
### [v0.10.6 (2017-05-01)](https://github.com/rails-api/active_model_serializers/compare/v0.10.5...v0.10.6) | |||
## [0.10.x](CHANGELOG-0-10.md) |
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.
just references other changelogs
- [Guides](docs) | ||
- [0.9 (0-9-stable) Documentation](https://github.com/rails-api/active_model_serializers/tree/0-9-stable) | ||
- [0.8 (0-8-stable) Documentation](https://github.com/rails-api/active_model_serializers/tree/0-8-stable) | ||
See if your issue can be resolved by information in the [documentation](README.md). |
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.
these links weren't up to date
@@ -43,7 +37,9 @@ for discussion or add your comments to existing ones. | |||
We also gladly welcome pull requests. When preparing to work on pull request, | |||
please adhere to these standards: | |||
|
|||
- Base work on the master branch unless fixing an issue with | |||
- Base work on the relevant branch: | |||
[0.10-stable](https://github.com/rails-api/active_model_serializers/tree/0-10-stable) |
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.
0-10 is no longer master
@@ -52,10 +48,10 @@ please adhere to these standards: | |||
- Note any specific areas that should be reviewed. | |||
- Include tests. | |||
- The test suite must pass on [supported Ruby versions](.travis.yml) | |||
- Include updates to the [documentation](https://github.com/rails-api/active_model_serializers/tree/master/docs) | |||
- Include updates to the [documentation](docs) |
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 won't work on master.. maybe should link to 0-10? or no link?
@@ -86,10 +20,11 @@ Thanks! | |||
## Documentation | |||
|
|||
If you're reading this at https://github.com/rails-api/active_model_serializers you are | |||
reading documentation for our `master`, which may include features that have not | |||
been released yet. Please see below for the documentation relevant to you. | |||
reading documentation for our `master`, which is not yet released. |
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.
0-10 is no longer master
|
||
- [0.10 (master) Documentation](https://github.com/rails-api/active_model_serializers/tree/master) | ||
- [0.10 (0-10-stable) Documentation](https://github.com/rails-api/active_model_serializers/tree/0-10-stable) |
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.
0-10 is no longer master
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'active_model_serializers' | ||
spec.version = ActiveModel::Serializer::VERSION | ||
spec.version = "1.0.0-dev" |
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.
just picked something so tests can run
What about Adapters? I'm in the process of migrating from 0.8 to 0.10, and was planing to write a few Adapters to fit my needs. Right now (0.8) I'm basically using model Serializers to describe a "neutral" hash of the model and I use specific serializers to convert that neutral representation to GeoJSON, CSV and JSON:API. Will the Serializer/Adapter model be compatible with the new work beign done? From what I read here, my approach of having a specific serializer for a needed format (i.e. GeoJSON) will be prefered. |
@mauriciopasquier At this time, it appears that adapters may be a special case for serializers. I haven't fully fleshed this out, yet, but basically you'd have your UserSerializer and your DocumentSerializer and combine the two to serialize the user into a JSONAPI response document. I'm starting from a place with no magic so that the fundamentals of how the combine the parts are less hard to work with. I imagine something like DocumentSeriarlizer.new(UserSerializer.new(user)).as_json. |
@bf4 So I guess I'll stay with that approach. What I'm doing exactly in 0.8 is:
Of course this implementation makes one serializer depends on the other, but it works for my case. Will 1.0.0 provide this Thanks for answering :) |
probably... like I said, I'm building and extracting this out of our code, while talking to stakeholders in Rails and API-gems... |
I have come to re-check some details in documentation and spotted the ideas at the top planned for AMS. AMS is instrumental to our project, we use it heavily to keep sane view on serialization and keep the team producing clean code. Some of the ideas are related to removing functionality that works perfectly currently therefore it is worry-some. I came to this PR to see background behind the decisions that I have not found. Is there other source where I can find rationals behind the decisions? Especially for removing that what works now?
This snippet looks backwards from what AMS does currently. However, perhaps it means that below will keep working? Can you please shed more light @bf4? class Profile:UsersShowSerializer < ActiveModel::Serializer
attributes ...
end
class User::UsersShowSerializer < ActiveModel::Serializer
attribute :profile, :serializer => Profile::UsersShowSerializer
...
end
class UsersController < ApplicationController
def show
render json: user, status: :ok
end
end |
Status:
Changes to 0.10.x maintenance:
Changes in this PR:
What's happening to AMS:
Steps:
ams
in our new api I'm building, so am dogfooding it)