-
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
Moved the adapter and adapter folder to active_model_serializers folder and changed the module namespace #1535
Moved the adapter and adapter folder to active_model_serializers folder and changed the module namespace #1535
Conversation
…er and changed the module namespace Changed the namespace in adapters and folder to active_model_serializers from active_model::serializer Changed namespace of adapters in serializers and other folders Moved adapter_for_test file to active_model_serializers folder and changed namespace of adapter inside the test file Require ActiveSupport's string/inflections We depend on string/inflections to define String#underscore. Refactor JsonApi adapter to avoid redundant computations. Update readme.md to link to v0.10.0.rc4 changed namespace of adapter folder testcases Changed all namespaces of adapter under active_moder_serializers Namespaced IncludeTree which is from serializer module, so needed to namespace it properly Fixed wrong namsepacing of fieldset namespace change in deserializer json_api Fixed the namespace for collection serializer when used inside adapter, changed namespace for adapter to new namespace which I had forgotten previously Modified logging test and adapter test cases to make the testcases pass Changed the yardoc links,as old links are not taking to documentation pages,proper links for 0.10,0.9 and 0.8 in rubydoc Rubocop errors are fixed by underscore naming unused variables Moved the require of adapter to serializable resource Remoeved adapter dependency inside serializer and added warning to Serializer::adapter method Fixed frament cache test which is calling Serializer.adapter Changed the name of lookup_adapter_from_config to configured_adapter Changed the docs which will show the new namespace of adapters Rubocop fix
…ve-model-serializers Conflicts: CHANGELOG.md lib/active_model/serializer/adapter/attributes.rb lib/active_model/serializer/adapter/cached_serializer.rb lib/active_model/serializer/adapter/fragment_cache.rb lib/active_model/serializer/adapter/json_api.rb lib/active_model/serializer/adapter/json_api/link.rb test/adapter/fragment_cache_test.rb test/adapter/json_api/links_test.rb test/adapter/json_api/resource_type_config_test.rb
@@ -70,7 +70,7 @@ at the first moment. | |||
## Renaming of class and modules | |||
|
|||
When moving some content to the new namespace we can find some names that does | |||
not make much sense like `ActiveModelSerializers::Serializer::Adapter::JsonApi`. | |||
not make much sense like `ActiveModelSerializers::Adapter::JsonApi`. |
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.
Should this actually change?
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.
😊 oops
@groyoh Thanks for the great review. I ended up doing some brakeman work on rubygems and didn't get to this tonight :( |
We should keep the old adapters in place with warnings, I think. just
|
end | ||
|
||
def process_resource(serializer, primary) | ||
resource_identifier = ActiveModel::Serializer::Adapter::JsonApi::ApiObjects::ResourceIdentifier.new(serializer).as_json |
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.
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.
No, just is more scope for me :) ref #1535 (comment) I'd rather put my energies elsewhere. I was really just rebasing the original pr
@bf4 sorry for the delay, I've been pretty busy the last few days. I'm merging this and I'll work on follow up PRs. |
…to-active-model-serializers Moved the adapter and adapter folder to active_model_serializers folder and changed the module namespace
- One test was renamed because it contained `__` - The ActiveModelSerializers::Deserialization module now call Adater instead of ActiveModelSerializers::Adapter. - The changelog was added for rails-api#1535
- One test was renamed because it contained `__` - The ActiveModelSerializers::Deserialization module now call Adater instead of ActiveModelSerializers::Adapter. - The changelog was added for rails-api#1535
- The removed classes and modules were added back with deprecation warning and deprecation test were added for them. - One test was renamed because it contained `__`. - Some tests were refactored. - The ActiveModelSerializers::Deserialization module is now called Adapter instead of ActiveModelSerializers::Adapter. - The changelog was added for rails-api#1535
- The removed classes and modules were added back with deprecation warning and deprecation test were added for them. - One test was renamed because it contained `__`. - Some tests were refactored. - The ActiveModelSerializers::Deserialization module is now called Adapter instead of ActiveModelSerializers::Adapter. - The changelog was added for rails-api#1535
Guys just a heads up! I have no idea what this PR is about. I have AMS master branch in a project Gemfile, last night it worked fine, this morning it started throwing BTW: Any idea when will 0.10 see the light? Or even a pre-release? It's been almost 6 months. |
The goal of this PR was to move Could you give more details about your error e.g. stacktrace, code, etc. and create an issue for it? Also please stick to |
Frank, sorry re broken master. I think it should have to do with the
|
Generally we've been advising to stay on master because it's usually stable and our release process is kind of strange right now. We're tagging this rc4 but it should probsbly be beta4 or something like that. I'd love to call it 0.10 and then release updates per semver, but we'd need to give up our defn of what's in '0.10'. Cc @groyoh B mobile phone
|
- The removed classes and modules were added back with deprecation warning and deprecation test were added for them. - One test was renamed because it contained `__`. - Some tests were refactored. - The ActiveModelSerializers::Deserialization module is now called Adapter instead of ActiveModelSerializers::Adapter. - The changelog was added for rails-api#1535
- The removed classes and modules were added back with deprecation warning and deprecation test were added for them. - One test was renamed because it contained `__`. - Some tests were refactored. - The ActiveModelSerializers::Deserialization module is now called Adapter instead of ActiveModelSerializers::Adapter. - The changelog was added for rails-api#1535
- The removed classes and modules were added back with deprecation warning and deprecation test were added for them. - One test was renamed because it contained `__`. - Some tests were refactored. - The ActiveModelSerializers::Deserialization module is now called Adapter instead of ActiveModelSerializers::Adapter. - The changelog was added for rails-api#1535
- The removed classes and modules were added back with deprecation warning and deprecation test were added for them. - One test was renamed because it contained `__`. - Some tests were refactored. - The ActiveModelSerializers::Deserialization module is now called Adapter instead of ActiveModelSerializers::Adapter. - The changelog was added for rails-api#1535
- The removed classes and modules were added back with deprecation warning and deprecation test were added for them. - One test was renamed because it contained `__`. - Some tests were refactored. - The ActiveModelSerializers::Deserialization module is now called Adapter instead of ActiveModelSerializers::Adapter. - The changelog was added for rails-api#1535
- The removed classes and modules were added back with deprecation warning and deprecation test were added for them. - One test was renamed because it contained `__`. - Some tests were refactored. - The ActiveModelSerializers::Deserialization module is now called Adapter instead of ActiveModelSerializers::Adapter. - The changelog was added for rails-api#1535
- The removed classes and modules were added back with deprecation warning and deprecation test were added for them. - One test was renamed because it contained `__`. - Some tests were refactored. - The ActiveModelSerializers::Deserialization module is now called Adapter instead of ActiveModelSerializers::Adapter. - The changelog was added for rails-api#1535
Thanks! and no worries about the broken master. I wasn't aware of |
- The removed classes and modules were added back with deprecation warning and deprecation test were added for them. - One test was renamed because it contained `__`. - Some tests were refactored. - The ActiveModelSerializers::Deserialization module is now called Adapter instead of ActiveModelSerializers::Adapter. - The changelog was added for #1535
This is a squashed commit of #1499 with master then merged in (rebasing got complicated).
Closes #1499 #1446
Work is per https://github.com/rails-api/active_model_serializers/blob/master/docs/rfcs/0000-namespace.md
Original Description
Changed the namespace in adapters and folder to active_model_serializers from active_model::serializer
Changed namespace of adapters in serializers and other folders
Moved adapter_for_test file to active_model_serializers folder and changed namespace of adapter inside the test file
Require ActiveSupport's string/inflections
We depend on string/inflections to define String#underscore.
Refactor JsonApi adapter to avoid redundant computations.
Update readme.md to link to v0.10.0.rc4
changed namespace of adapter folder testcases
Changed all namespaces of adapter under active_moder_serializers
Namespaced IncludeTree which is from serializer module, so needed to namespace it properly
Fixed wrong namsepacing of fieldset
namespace change in deserializer json_api
Fixed the namespace for collection serializer when used inside adapter, changed namespace for adapter to new namespace which I had forgotten previously
Modified logging test and adapter test cases to make the testcases pass
Changed the yardoc links,as old links are not taking to documentation pages,proper links for 0.10,0.9 and 0.8 in rubydoc
Rubocop errors are fixed by underscore naming unused variables
Moved the require of adapter to serializable resource
Remoeved adapter dependency inside serializer and added warning to Serializer::adapter method
Fixed frament cache test which is calling Serializer.adapter
Changed the name of lookup_adapter_from_config to configured_adapter
Changed the docs which will show the new namespace of adapters
Rubocop fix