active_model_serializers 0.10.6 → 0.10.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +114 -1
- data/README.md +21 -24
- data/lib/action_controller/serialization.rb +11 -1
- data/lib/active_model/serializable_resource.rb +2 -0
- data/lib/active_model/serializer/adapter/attributes.rb +2 -0
- data/lib/active_model/serializer/adapter/base.rb +2 -0
- data/lib/active_model/serializer/adapter/json.rb +2 -0
- data/lib/active_model/serializer/adapter/json_api.rb +2 -0
- data/lib/active_model/serializer/adapter/null.rb +2 -0
- data/lib/active_model/serializer/adapter.rb +2 -0
- data/lib/active_model/serializer/array_serializer.rb +2 -0
- data/lib/active_model/serializer/association.rb +2 -0
- data/lib/active_model/serializer/attribute.rb +2 -0
- data/lib/active_model/serializer/belongs_to_reflection.rb +2 -0
- data/lib/active_model/serializer/collection_serializer.rb +17 -5
- data/lib/active_model/serializer/concerns/caching.rb +7 -2
- data/lib/active_model/serializer/error_serializer.rb +2 -0
- data/lib/active_model/serializer/errors_serializer.rb +2 -0
- data/lib/active_model/serializer/field.rb +2 -0
- data/lib/active_model/serializer/fieldset.rb +3 -1
- data/lib/active_model/serializer/has_many_reflection.rb +2 -0
- data/lib/active_model/serializer/has_one_reflection.rb +2 -0
- data/lib/active_model/serializer/lazy_association.rb +6 -2
- data/lib/active_model/serializer/link.rb +23 -0
- data/lib/active_model/serializer/lint.rb +2 -0
- data/lib/active_model/serializer/null.rb +2 -0
- data/lib/active_model/serializer/reflection.rb +10 -5
- data/lib/active_model/serializer/version.rb +3 -1
- data/lib/active_model/serializer.rb +37 -19
- data/lib/active_model_serializers/adapter/attributes.rb +23 -0
- data/lib/active_model_serializers/adapter/base.rb +2 -0
- data/lib/active_model_serializers/adapter/json.rb +2 -0
- data/lib/active_model_serializers/adapter/json_api/deserialization.rb +3 -1
- data/lib/active_model_serializers/adapter/json_api/error.rb +2 -0
- data/lib/active_model_serializers/adapter/json_api/jsonapi.rb +2 -0
- data/lib/active_model_serializers/adapter/json_api/link.rb +2 -0
- data/lib/active_model_serializers/adapter/json_api/meta.rb +2 -0
- data/lib/active_model_serializers/adapter/json_api/pagination_links.rb +45 -20
- data/lib/active_model_serializers/adapter/json_api/relationship.rb +18 -4
- data/lib/active_model_serializers/adapter/json_api/resource_identifier.rb +33 -25
- data/lib/active_model_serializers/adapter/json_api.rb +14 -9
- data/lib/active_model_serializers/adapter/null.rb +2 -0
- data/lib/active_model_serializers/adapter.rb +3 -1
- data/lib/active_model_serializers/callbacks.rb +2 -0
- data/lib/active_model_serializers/deprecate.rb +2 -0
- data/lib/active_model_serializers/deserialization.rb +2 -0
- data/lib/active_model_serializers/json_pointer.rb +2 -0
- data/lib/active_model_serializers/logging.rb +2 -0
- data/lib/active_model_serializers/lookup_chain.rb +2 -0
- data/lib/active_model_serializers/model/caching.rb +26 -0
- data/lib/active_model_serializers/model.rb +2 -0
- data/lib/active_model_serializers/railtie.rb +4 -0
- data/lib/active_model_serializers/register_jsonapi_renderer.rb +2 -0
- data/lib/active_model_serializers/serializable_resource.rb +4 -2
- data/lib/active_model_serializers/serialization_context.rb +2 -0
- data/lib/active_model_serializers/test/schema.rb +2 -0
- data/lib/active_model_serializers/test/serializer.rb +2 -0
- data/lib/active_model_serializers/test.rb +2 -0
- data/lib/active_model_serializers.rb +21 -11
- data/lib/generators/rails/resource_override.rb +2 -0
- data/lib/generators/rails/serializer_generator.rb +2 -0
- data/lib/grape/active_model_serializers.rb +2 -0
- data/lib/grape/formatters/active_model_serializers.rb +2 -0
- data/lib/grape/helpers/active_model_serializers.rb +2 -0
- data/lib/tasks/rubocop.rake +2 -0
- metadata +43 -298
- data/.github/ISSUE_TEMPLATE.md +0 -29
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -15
- data/.gitignore +0 -35
- data/.rubocop.yml +0 -105
- data/.simplecov +0 -110
- data/.travis.yml +0 -55
- data/CODE_OF_CONDUCT.md +0 -74
- data/CONTRIBUTING.md +0 -105
- data/Gemfile +0 -56
- data/Rakefile +0 -74
- data/active_model_serializers.gemspec +0 -63
- data/appveyor.yml +0 -30
- data/bin/bench +0 -171
- data/bin/bench_regression +0 -316
- data/bin/rubocop +0 -38
- data/bin/serve_benchmark +0 -39
- data/docs/README.md +0 -41
- data/docs/STYLE.md +0 -58
- data/docs/general/adapters.md +0 -263
- data/docs/general/caching.md +0 -58
- data/docs/general/configuration_options.md +0 -169
- data/docs/general/deserialization.md +0 -100
- data/docs/general/fields.md +0 -31
- data/docs/general/getting_started.md +0 -133
- data/docs/general/instrumentation.md +0 -40
- data/docs/general/key_transforms.md +0 -40
- data/docs/general/logging.md +0 -21
- data/docs/general/rendering.md +0 -293
- data/docs/general/serializers.md +0 -480
- data/docs/how-open-source-maintained.jpg +0 -0
- data/docs/howto/add_pagination_links.md +0 -138
- data/docs/howto/add_relationship_links.md +0 -140
- data/docs/howto/add_root_key.md +0 -55
- data/docs/howto/grape_integration.md +0 -42
- data/docs/howto/outside_controller_use.md +0 -66
- data/docs/howto/passing_arbitrary_options.md +0 -27
- data/docs/howto/serialize_poro.md +0 -73
- data/docs/howto/test.md +0 -154
- data/docs/howto/upgrade_from_0_8_to_0_10.md +0 -265
- data/docs/integrations/ember-and-json-api.md +0 -147
- data/docs/integrations/grape.md +0 -19
- data/docs/jsonapi/errors.md +0 -56
- data/docs/jsonapi/schema/schema.json +0 -366
- data/docs/jsonapi/schema.md +0 -151
- data/docs/rfcs/0000-namespace.md +0 -106
- data/docs/rfcs/template.md +0 -15
- data/test/action_controller/adapter_selector_test.rb +0 -62
- data/test/action_controller/explicit_serializer_test.rb +0 -135
- data/test/action_controller/json/include_test.rb +0 -246
- data/test/action_controller/json_api/deserialization_test.rb +0 -112
- data/test/action_controller/json_api/errors_test.rb +0 -40
- data/test/action_controller/json_api/fields_test.rb +0 -66
- data/test/action_controller/json_api/linked_test.rb +0 -202
- data/test/action_controller/json_api/pagination_test.rb +0 -116
- data/test/action_controller/json_api/transform_test.rb +0 -189
- data/test/action_controller/lookup_proc_test.rb +0 -49
- data/test/action_controller/namespace_lookup_test.rb +0 -232
- data/test/action_controller/serialization_scope_name_test.rb +0 -235
- data/test/action_controller/serialization_test.rb +0 -472
- data/test/active_model_serializers/adapter_for_test.rb +0 -208
- data/test/active_model_serializers/json_pointer_test.rb +0 -22
- data/test/active_model_serializers/logging_test.rb +0 -77
- data/test/active_model_serializers/model_test.rb +0 -142
- data/test/active_model_serializers/railtie_test_isolated.rb +0 -68
- data/test/active_model_serializers/register_jsonapi_renderer_test_isolated.rb +0 -161
- data/test/active_model_serializers/serialization_context_test_isolated.rb +0 -71
- data/test/active_model_serializers/test/schema_test.rb +0 -131
- data/test/active_model_serializers/test/serializer_test.rb +0 -62
- data/test/active_record_test.rb +0 -9
- data/test/adapter/attributes_test.rb +0 -40
- data/test/adapter/deprecation_test.rb +0 -100
- data/test/adapter/json/belongs_to_test.rb +0 -45
- data/test/adapter/json/collection_test.rb +0 -104
- data/test/adapter/json/has_many_test.rb +0 -53
- data/test/adapter/json/transform_test.rb +0 -93
- data/test/adapter/json_api/belongs_to_test.rb +0 -155
- data/test/adapter/json_api/collection_test.rb +0 -96
- data/test/adapter/json_api/errors_test.rb +0 -76
- data/test/adapter/json_api/fields_test.rb +0 -96
- data/test/adapter/json_api/has_many_embed_ids_test.rb +0 -43
- data/test/adapter/json_api/has_many_explicit_serializer_test.rb +0 -96
- data/test/adapter/json_api/has_many_test.rb +0 -173
- data/test/adapter/json_api/has_one_test.rb +0 -80
- data/test/adapter/json_api/include_data_if_sideloaded_test.rb +0 -183
- data/test/adapter/json_api/json_api_test.rb +0 -33
- data/test/adapter/json_api/linked_test.rb +0 -413
- data/test/adapter/json_api/links_test.rb +0 -95
- data/test/adapter/json_api/pagination_links_test.rb +0 -193
- data/test/adapter/json_api/parse_test.rb +0 -137
- data/test/adapter/json_api/relationship_test.rb +0 -397
- data/test/adapter/json_api/resource_identifier_test.rb +0 -110
- data/test/adapter/json_api/resource_meta_test.rb +0 -100
- data/test/adapter/json_api/toplevel_jsonapi_test.rb +0 -82
- data/test/adapter/json_api/transform_test.rb +0 -512
- data/test/adapter/json_api/type_test.rb +0 -61
- data/test/adapter/json_test.rb +0 -46
- data/test/adapter/null_test.rb +0 -22
- data/test/adapter/polymorphic_test.rb +0 -171
- data/test/adapter_test.rb +0 -67
- data/test/array_serializer_test.rb +0 -22
- data/test/benchmark/app.rb +0 -65
- data/test/benchmark/benchmarking_support.rb +0 -67
- data/test/benchmark/bm_active_record.rb +0 -81
- data/test/benchmark/bm_adapter.rb +0 -38
- data/test/benchmark/bm_caching.rb +0 -119
- data/test/benchmark/bm_lookup_chain.rb +0 -83
- data/test/benchmark/bm_transform.rb +0 -45
- data/test/benchmark/config.ru +0 -3
- data/test/benchmark/controllers.rb +0 -83
- data/test/benchmark/fixtures.rb +0 -219
- data/test/cache_test.rb +0 -651
- data/test/collection_serializer_test.rb +0 -123
- data/test/fixtures/active_record.rb +0 -113
- data/test/fixtures/poro.rb +0 -225
- data/test/generators/scaffold_controller_generator_test.rb +0 -24
- data/test/generators/serializer_generator_test.rb +0 -75
- data/test/grape_test.rb +0 -196
- data/test/lint_test.rb +0 -49
- data/test/logger_test.rb +0 -20
- data/test/poro_test.rb +0 -9
- data/test/serializable_resource_test.rb +0 -79
- data/test/serializers/association_macros_test.rb +0 -37
- data/test/serializers/associations_test.rb +0 -424
- data/test/serializers/attribute_test.rb +0 -153
- data/test/serializers/attributes_test.rb +0 -52
- data/test/serializers/caching_configuration_test_isolated.rb +0 -170
- data/test/serializers/configuration_test.rb +0 -32
- data/test/serializers/fieldset_test.rb +0 -14
- data/test/serializers/meta_test.rb +0 -202
- data/test/serializers/options_test.rb +0 -32
- data/test/serializers/read_attribute_for_serialization_test.rb +0 -79
- data/test/serializers/reflection_test.rb +0 -427
- data/test/serializers/root_test.rb +0 -21
- data/test/serializers/serialization_test.rb +0 -55
- data/test/serializers/serializer_for_test.rb +0 -136
- data/test/serializers/serializer_for_with_namespace_test.rb +0 -88
- data/test/support/custom_schemas/active_model_serializers/test/schema_test/my/index.json +0 -6
- data/test/support/isolated_unit.rb +0 -82
- data/test/support/rails5_shims.rb +0 -53
- data/test/support/rails_app.rb +0 -38
- data/test/support/schemas/active_model_serializers/test/schema_test/my/index.json +0 -6
- data/test/support/schemas/active_model_serializers/test/schema_test/my/show.json +0 -6
- data/test/support/schemas/custom/show.json +0 -7
- data/test/support/schemas/hyper_schema.json +0 -93
- data/test/support/schemas/render_using_json_api.json +0 -43
- data/test/support/schemas/simple_json_pointers.json +0 -10
- data/test/support/serialization_testing.rb +0 -71
- data/test/test_helper.rb +0 -70
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'active_model'
|
2
4
|
require 'active_support'
|
3
5
|
require 'active_support/core_ext/object/with_options'
|
@@ -5,16 +7,19 @@ require 'active_support/core_ext/string/inflections'
|
|
5
7
|
require 'active_support/json'
|
6
8
|
module ActiveModelSerializers
|
7
9
|
extend ActiveSupport::Autoload
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
10
|
+
eager_autoload do
|
11
|
+
autoload :Model
|
12
|
+
autoload :Callbacks
|
13
|
+
autoload :SerializableResource
|
14
|
+
autoload :SerializationContext
|
15
|
+
autoload :Logging
|
16
|
+
autoload :Test
|
17
|
+
autoload :Adapter
|
18
|
+
autoload :JsonPointer
|
19
|
+
autoload :Deprecate
|
20
|
+
autoload :LookupChain
|
21
|
+
autoload :Deserialization
|
22
|
+
end
|
18
23
|
|
19
24
|
class << self; attr_accessor :logger; end
|
20
25
|
self.logger = ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new(STDOUT))
|
@@ -46,8 +51,13 @@ module ActiveModelSerializers
|
|
46
51
|
$VERBOSE = original_verbose
|
47
52
|
end
|
48
53
|
|
54
|
+
def self.eager_load!
|
55
|
+
super
|
56
|
+
ActiveModel::Serializer.eager_load!
|
57
|
+
end
|
58
|
+
|
49
59
|
require 'active_model/serializer/version'
|
50
60
|
require 'active_model/serializer'
|
51
61
|
require 'active_model/serializable_resource'
|
52
|
-
require 'active_model_serializers/railtie' if defined?(::Rails)
|
62
|
+
require 'active_model_serializers/railtie' if defined?(::Rails::Railtie)
|
53
63
|
end
|
data/lib/tasks/rubocop.rake
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_model_serializers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Klabnik
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '4.1'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '7.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '4.1'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '7.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: actionpack
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: '4.1'
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '7.1'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: '4.1'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '
|
52
|
+
version: '7.1'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: railties
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,7 +59,7 @@ dependencies:
|
|
59
59
|
version: '4.1'
|
60
60
|
- - "<"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
62
|
+
version: '7.1'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -69,7 +69,27 @@ dependencies:
|
|
69
69
|
version: '4.1'
|
70
70
|
- - "<"
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: '
|
72
|
+
version: '7.1'
|
73
|
+
- !ruby/object:Gem::Dependency
|
74
|
+
name: minitest
|
75
|
+
requirement: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - "~>"
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '5.0'
|
80
|
+
- - "<"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '5.11'
|
83
|
+
type: :development
|
84
|
+
prerelease: false
|
85
|
+
version_requirements: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '5.0'
|
90
|
+
- - "<"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '5.11'
|
73
93
|
- !ruby/object:Gem::Dependency
|
74
94
|
name: jsonapi-renderer
|
75
95
|
requirement: !ruby/object:Gem::Requirement
|
@@ -79,7 +99,7 @@ dependencies:
|
|
79
99
|
version: 0.1.1.beta1
|
80
100
|
- - "<"
|
81
101
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0.
|
102
|
+
version: '0.3'
|
83
103
|
type: :runtime
|
84
104
|
prerelease: false
|
85
105
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -89,7 +109,7 @@ dependencies:
|
|
89
109
|
version: 0.1.1.beta1
|
90
110
|
- - "<"
|
91
111
|
- !ruby/object:Gem::Version
|
92
|
-
version: '0.
|
112
|
+
version: '0.3'
|
93
113
|
- !ruby/object:Gem::Dependency
|
94
114
|
name: case_transform
|
95
115
|
requirement: !ruby/object:Gem::Requirement
|
@@ -113,7 +133,7 @@ dependencies:
|
|
113
133
|
version: '4.1'
|
114
134
|
- - "<"
|
115
135
|
- !ruby/object:Gem::Version
|
116
|
-
version: '
|
136
|
+
version: '7.1'
|
117
137
|
type: :development
|
118
138
|
prerelease: false
|
119
139
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -123,7 +143,7 @@ dependencies:
|
|
123
143
|
version: '4.1'
|
124
144
|
- - "<"
|
125
145
|
- !ruby/object:Gem::Version
|
126
|
-
version: '
|
146
|
+
version: '7.1'
|
127
147
|
- !ruby/object:Gem::Dependency
|
128
148
|
name: kaminari
|
129
149
|
requirement: !ruby/object:Gem::Requirement
|
@@ -162,30 +182,16 @@ dependencies:
|
|
162
182
|
name: bundler
|
163
183
|
requirement: !ruby/object:Gem::Requirement
|
164
184
|
requirements:
|
165
|
-
- - "
|
166
|
-
- !ruby/object:Gem::Version
|
167
|
-
version: '1.6'
|
168
|
-
type: :development
|
169
|
-
prerelease: false
|
170
|
-
version_requirements: !ruby/object:Gem::Requirement
|
171
|
-
requirements:
|
172
|
-
- - "~>"
|
173
|
-
- !ruby/object:Gem::Version
|
174
|
-
version: '1.6'
|
175
|
-
- !ruby/object:Gem::Dependency
|
176
|
-
name: simplecov
|
177
|
-
requirement: !ruby/object:Gem::Requirement
|
178
|
-
requirements:
|
179
|
-
- - "~>"
|
185
|
+
- - ">="
|
180
186
|
- !ruby/object:Gem::Version
|
181
|
-
version: '0
|
187
|
+
version: '0'
|
182
188
|
type: :development
|
183
189
|
prerelease: false
|
184
190
|
version_requirements: !ruby/object:Gem::Requirement
|
185
191
|
requirements:
|
186
|
-
- - "
|
192
|
+
- - ">="
|
187
193
|
- !ruby/object:Gem::Version
|
188
|
-
version: '0
|
194
|
+
version: '0'
|
189
195
|
- !ruby/object:Gem::Dependency
|
190
196
|
name: timecop
|
191
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -207,9 +213,6 @@ dependencies:
|
|
207
213
|
- - ">="
|
208
214
|
- !ruby/object:Gem::Version
|
209
215
|
version: '0.13'
|
210
|
-
- - "<"
|
211
|
-
- !ruby/object:Gem::Version
|
212
|
-
version: 0.19.1
|
213
216
|
type: :development
|
214
217
|
prerelease: false
|
215
218
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -217,9 +220,6 @@ dependencies:
|
|
217
220
|
- - ">="
|
218
221
|
- !ruby/object:Gem::Version
|
219
222
|
version: '0.13'
|
220
|
-
- - "<"
|
221
|
-
- !ruby/object:Gem::Version
|
222
|
-
version: 0.19.1
|
223
223
|
- !ruby/object:Gem::Dependency
|
224
224
|
name: json_schema
|
225
225
|
requirement: !ruby/object:Gem::Requirement
|
@@ -241,9 +241,6 @@ dependencies:
|
|
241
241
|
- - ">="
|
242
242
|
- !ruby/object:Gem::Version
|
243
243
|
version: '10.0'
|
244
|
-
- - "<"
|
245
|
-
- !ruby/object:Gem::Version
|
246
|
-
version: '12.0'
|
247
244
|
type: :development
|
248
245
|
prerelease: false
|
249
246
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -251,9 +248,6 @@ dependencies:
|
|
251
248
|
- - ">="
|
252
249
|
- !ruby/object:Gem::Version
|
253
250
|
version: '10.0'
|
254
|
-
- - "<"
|
255
|
-
- !ruby/object:Gem::Version
|
256
|
-
version: '12.0'
|
257
251
|
description: ActiveModel::Serializers allows you to generate your JSON in an object-oriented
|
258
252
|
and convention-driven manner.
|
259
253
|
email:
|
@@ -262,55 +256,9 @@ executables: []
|
|
262
256
|
extensions: []
|
263
257
|
extra_rdoc_files: []
|
264
258
|
files:
|
265
|
-
- ".github/ISSUE_TEMPLATE.md"
|
266
|
-
- ".github/PULL_REQUEST_TEMPLATE.md"
|
267
|
-
- ".gitignore"
|
268
|
-
- ".rubocop.yml"
|
269
|
-
- ".simplecov"
|
270
|
-
- ".travis.yml"
|
271
259
|
- CHANGELOG.md
|
272
|
-
- CODE_OF_CONDUCT.md
|
273
|
-
- CONTRIBUTING.md
|
274
|
-
- Gemfile
|
275
260
|
- MIT-LICENSE
|
276
261
|
- README.md
|
277
|
-
- Rakefile
|
278
|
-
- active_model_serializers.gemspec
|
279
|
-
- appveyor.yml
|
280
|
-
- bin/bench
|
281
|
-
- bin/bench_regression
|
282
|
-
- bin/rubocop
|
283
|
-
- bin/serve_benchmark
|
284
|
-
- docs/README.md
|
285
|
-
- docs/STYLE.md
|
286
|
-
- docs/general/adapters.md
|
287
|
-
- docs/general/caching.md
|
288
|
-
- docs/general/configuration_options.md
|
289
|
-
- docs/general/deserialization.md
|
290
|
-
- docs/general/fields.md
|
291
|
-
- docs/general/getting_started.md
|
292
|
-
- docs/general/instrumentation.md
|
293
|
-
- docs/general/key_transforms.md
|
294
|
-
- docs/general/logging.md
|
295
|
-
- docs/general/rendering.md
|
296
|
-
- docs/general/serializers.md
|
297
|
-
- docs/how-open-source-maintained.jpg
|
298
|
-
- docs/howto/add_pagination_links.md
|
299
|
-
- docs/howto/add_relationship_links.md
|
300
|
-
- docs/howto/add_root_key.md
|
301
|
-
- docs/howto/grape_integration.md
|
302
|
-
- docs/howto/outside_controller_use.md
|
303
|
-
- docs/howto/passing_arbitrary_options.md
|
304
|
-
- docs/howto/serialize_poro.md
|
305
|
-
- docs/howto/test.md
|
306
|
-
- docs/howto/upgrade_from_0_8_to_0_10.md
|
307
|
-
- docs/integrations/ember-and-json-api.md
|
308
|
-
- docs/integrations/grape.md
|
309
|
-
- docs/jsonapi/errors.md
|
310
|
-
- docs/jsonapi/schema.md
|
311
|
-
- docs/jsonapi/schema/schema.json
|
312
|
-
- docs/rfcs/0000-namespace.md
|
313
|
-
- docs/rfcs/template.md
|
314
262
|
- lib/action_controller/serialization.rb
|
315
263
|
- lib/active_model/serializable_resource.rb
|
316
264
|
- lib/active_model/serializer.rb
|
@@ -333,6 +281,7 @@ files:
|
|
333
281
|
- lib/active_model/serializer/has_many_reflection.rb
|
334
282
|
- lib/active_model/serializer/has_one_reflection.rb
|
335
283
|
- lib/active_model/serializer/lazy_association.rb
|
284
|
+
- lib/active_model/serializer/link.rb
|
336
285
|
- lib/active_model/serializer/lint.rb
|
337
286
|
- lib/active_model/serializer/null.rb
|
338
287
|
- lib/active_model/serializer/reflection.rb
|
@@ -359,6 +308,7 @@ files:
|
|
359
308
|
- lib/active_model_serializers/logging.rb
|
360
309
|
- lib/active_model_serializers/lookup_chain.rb
|
361
310
|
- lib/active_model_serializers/model.rb
|
311
|
+
- lib/active_model_serializers/model/caching.rb
|
362
312
|
- lib/active_model_serializers/railtie.rb
|
363
313
|
- lib/active_model_serializers/register_jsonapi_renderer.rb
|
364
314
|
- lib/active_model_serializers/serializable_resource.rb
|
@@ -374,113 +324,11 @@ files:
|
|
374
324
|
- lib/grape/formatters/active_model_serializers.rb
|
375
325
|
- lib/grape/helpers/active_model_serializers.rb
|
376
326
|
- lib/tasks/rubocop.rake
|
377
|
-
- test/action_controller/adapter_selector_test.rb
|
378
|
-
- test/action_controller/explicit_serializer_test.rb
|
379
|
-
- test/action_controller/json/include_test.rb
|
380
|
-
- test/action_controller/json_api/deserialization_test.rb
|
381
|
-
- test/action_controller/json_api/errors_test.rb
|
382
|
-
- test/action_controller/json_api/fields_test.rb
|
383
|
-
- test/action_controller/json_api/linked_test.rb
|
384
|
-
- test/action_controller/json_api/pagination_test.rb
|
385
|
-
- test/action_controller/json_api/transform_test.rb
|
386
|
-
- test/action_controller/lookup_proc_test.rb
|
387
|
-
- test/action_controller/namespace_lookup_test.rb
|
388
|
-
- test/action_controller/serialization_scope_name_test.rb
|
389
|
-
- test/action_controller/serialization_test.rb
|
390
|
-
- test/active_model_serializers/adapter_for_test.rb
|
391
|
-
- test/active_model_serializers/json_pointer_test.rb
|
392
|
-
- test/active_model_serializers/logging_test.rb
|
393
|
-
- test/active_model_serializers/model_test.rb
|
394
|
-
- test/active_model_serializers/railtie_test_isolated.rb
|
395
|
-
- test/active_model_serializers/register_jsonapi_renderer_test_isolated.rb
|
396
|
-
- test/active_model_serializers/serialization_context_test_isolated.rb
|
397
|
-
- test/active_model_serializers/test/schema_test.rb
|
398
|
-
- test/active_model_serializers/test/serializer_test.rb
|
399
|
-
- test/active_record_test.rb
|
400
|
-
- test/adapter/attributes_test.rb
|
401
|
-
- test/adapter/deprecation_test.rb
|
402
|
-
- test/adapter/json/belongs_to_test.rb
|
403
|
-
- test/adapter/json/collection_test.rb
|
404
|
-
- test/adapter/json/has_many_test.rb
|
405
|
-
- test/adapter/json/transform_test.rb
|
406
|
-
- test/adapter/json_api/belongs_to_test.rb
|
407
|
-
- test/adapter/json_api/collection_test.rb
|
408
|
-
- test/adapter/json_api/errors_test.rb
|
409
|
-
- test/adapter/json_api/fields_test.rb
|
410
|
-
- test/adapter/json_api/has_many_embed_ids_test.rb
|
411
|
-
- test/adapter/json_api/has_many_explicit_serializer_test.rb
|
412
|
-
- test/adapter/json_api/has_many_test.rb
|
413
|
-
- test/adapter/json_api/has_one_test.rb
|
414
|
-
- test/adapter/json_api/include_data_if_sideloaded_test.rb
|
415
|
-
- test/adapter/json_api/json_api_test.rb
|
416
|
-
- test/adapter/json_api/linked_test.rb
|
417
|
-
- test/adapter/json_api/links_test.rb
|
418
|
-
- test/adapter/json_api/pagination_links_test.rb
|
419
|
-
- test/adapter/json_api/parse_test.rb
|
420
|
-
- test/adapter/json_api/relationship_test.rb
|
421
|
-
- test/adapter/json_api/resource_identifier_test.rb
|
422
|
-
- test/adapter/json_api/resource_meta_test.rb
|
423
|
-
- test/adapter/json_api/toplevel_jsonapi_test.rb
|
424
|
-
- test/adapter/json_api/transform_test.rb
|
425
|
-
- test/adapter/json_api/type_test.rb
|
426
|
-
- test/adapter/json_test.rb
|
427
|
-
- test/adapter/null_test.rb
|
428
|
-
- test/adapter/polymorphic_test.rb
|
429
|
-
- test/adapter_test.rb
|
430
|
-
- test/array_serializer_test.rb
|
431
|
-
- test/benchmark/app.rb
|
432
|
-
- test/benchmark/benchmarking_support.rb
|
433
|
-
- test/benchmark/bm_active_record.rb
|
434
|
-
- test/benchmark/bm_adapter.rb
|
435
|
-
- test/benchmark/bm_caching.rb
|
436
|
-
- test/benchmark/bm_lookup_chain.rb
|
437
|
-
- test/benchmark/bm_transform.rb
|
438
|
-
- test/benchmark/config.ru
|
439
|
-
- test/benchmark/controllers.rb
|
440
|
-
- test/benchmark/fixtures.rb
|
441
|
-
- test/cache_test.rb
|
442
|
-
- test/collection_serializer_test.rb
|
443
|
-
- test/fixtures/active_record.rb
|
444
|
-
- test/fixtures/poro.rb
|
445
|
-
- test/generators/scaffold_controller_generator_test.rb
|
446
|
-
- test/generators/serializer_generator_test.rb
|
447
|
-
- test/grape_test.rb
|
448
|
-
- test/lint_test.rb
|
449
|
-
- test/logger_test.rb
|
450
|
-
- test/poro_test.rb
|
451
|
-
- test/serializable_resource_test.rb
|
452
|
-
- test/serializers/association_macros_test.rb
|
453
|
-
- test/serializers/associations_test.rb
|
454
|
-
- test/serializers/attribute_test.rb
|
455
|
-
- test/serializers/attributes_test.rb
|
456
|
-
- test/serializers/caching_configuration_test_isolated.rb
|
457
|
-
- test/serializers/configuration_test.rb
|
458
|
-
- test/serializers/fieldset_test.rb
|
459
|
-
- test/serializers/meta_test.rb
|
460
|
-
- test/serializers/options_test.rb
|
461
|
-
- test/serializers/read_attribute_for_serialization_test.rb
|
462
|
-
- test/serializers/reflection_test.rb
|
463
|
-
- test/serializers/root_test.rb
|
464
|
-
- test/serializers/serialization_test.rb
|
465
|
-
- test/serializers/serializer_for_test.rb
|
466
|
-
- test/serializers/serializer_for_with_namespace_test.rb
|
467
|
-
- test/support/custom_schemas/active_model_serializers/test/schema_test/my/index.json
|
468
|
-
- test/support/isolated_unit.rb
|
469
|
-
- test/support/rails5_shims.rb
|
470
|
-
- test/support/rails_app.rb
|
471
|
-
- test/support/schemas/active_model_serializers/test/schema_test/my/index.json
|
472
|
-
- test/support/schemas/active_model_serializers/test/schema_test/my/show.json
|
473
|
-
- test/support/schemas/custom/show.json
|
474
|
-
- test/support/schemas/hyper_schema.json
|
475
|
-
- test/support/schemas/render_using_json_api.json
|
476
|
-
- test/support/schemas/simple_json_pointers.json
|
477
|
-
- test/support/serialization_testing.rb
|
478
|
-
- test/test_helper.rb
|
479
327
|
homepage: https://github.com/rails-api/active_model_serializers
|
480
328
|
licenses:
|
481
329
|
- MIT
|
482
330
|
metadata: {}
|
483
|
-
post_install_message:
|
331
|
+
post_install_message:
|
484
332
|
rdoc_options: []
|
485
333
|
require_paths:
|
486
334
|
- lib
|
@@ -495,111 +343,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
495
343
|
- !ruby/object:Gem::Version
|
496
344
|
version: '0'
|
497
345
|
requirements: []
|
498
|
-
|
499
|
-
|
500
|
-
signing_key:
|
346
|
+
rubygems_version: 3.1.4
|
347
|
+
signing_key:
|
501
348
|
specification_version: 4
|
502
349
|
summary: Conventions-based JSON generation for Rails.
|
503
|
-
test_files:
|
504
|
-
- test/action_controller/adapter_selector_test.rb
|
505
|
-
- test/action_controller/explicit_serializer_test.rb
|
506
|
-
- test/action_controller/json/include_test.rb
|
507
|
-
- test/action_controller/json_api/deserialization_test.rb
|
508
|
-
- test/action_controller/json_api/errors_test.rb
|
509
|
-
- test/action_controller/json_api/fields_test.rb
|
510
|
-
- test/action_controller/json_api/linked_test.rb
|
511
|
-
- test/action_controller/json_api/pagination_test.rb
|
512
|
-
- test/action_controller/json_api/transform_test.rb
|
513
|
-
- test/action_controller/lookup_proc_test.rb
|
514
|
-
- test/action_controller/namespace_lookup_test.rb
|
515
|
-
- test/action_controller/serialization_scope_name_test.rb
|
516
|
-
- test/action_controller/serialization_test.rb
|
517
|
-
- test/active_model_serializers/adapter_for_test.rb
|
518
|
-
- test/active_model_serializers/json_pointer_test.rb
|
519
|
-
- test/active_model_serializers/logging_test.rb
|
520
|
-
- test/active_model_serializers/model_test.rb
|
521
|
-
- test/active_model_serializers/railtie_test_isolated.rb
|
522
|
-
- test/active_model_serializers/register_jsonapi_renderer_test_isolated.rb
|
523
|
-
- test/active_model_serializers/serialization_context_test_isolated.rb
|
524
|
-
- test/active_model_serializers/test/schema_test.rb
|
525
|
-
- test/active_model_serializers/test/serializer_test.rb
|
526
|
-
- test/active_record_test.rb
|
527
|
-
- test/adapter/attributes_test.rb
|
528
|
-
- test/adapter/deprecation_test.rb
|
529
|
-
- test/adapter/json/belongs_to_test.rb
|
530
|
-
- test/adapter/json/collection_test.rb
|
531
|
-
- test/adapter/json/has_many_test.rb
|
532
|
-
- test/adapter/json/transform_test.rb
|
533
|
-
- test/adapter/json_api/belongs_to_test.rb
|
534
|
-
- test/adapter/json_api/collection_test.rb
|
535
|
-
- test/adapter/json_api/errors_test.rb
|
536
|
-
- test/adapter/json_api/fields_test.rb
|
537
|
-
- test/adapter/json_api/has_many_embed_ids_test.rb
|
538
|
-
- test/adapter/json_api/has_many_explicit_serializer_test.rb
|
539
|
-
- test/adapter/json_api/has_many_test.rb
|
540
|
-
- test/adapter/json_api/has_one_test.rb
|
541
|
-
- test/adapter/json_api/include_data_if_sideloaded_test.rb
|
542
|
-
- test/adapter/json_api/json_api_test.rb
|
543
|
-
- test/adapter/json_api/linked_test.rb
|
544
|
-
- test/adapter/json_api/links_test.rb
|
545
|
-
- test/adapter/json_api/pagination_links_test.rb
|
546
|
-
- test/adapter/json_api/parse_test.rb
|
547
|
-
- test/adapter/json_api/relationship_test.rb
|
548
|
-
- test/adapter/json_api/resource_identifier_test.rb
|
549
|
-
- test/adapter/json_api/resource_meta_test.rb
|
550
|
-
- test/adapter/json_api/toplevel_jsonapi_test.rb
|
551
|
-
- test/adapter/json_api/transform_test.rb
|
552
|
-
- test/adapter/json_api/type_test.rb
|
553
|
-
- test/adapter/json_test.rb
|
554
|
-
- test/adapter/null_test.rb
|
555
|
-
- test/adapter/polymorphic_test.rb
|
556
|
-
- test/adapter_test.rb
|
557
|
-
- test/array_serializer_test.rb
|
558
|
-
- test/benchmark/app.rb
|
559
|
-
- test/benchmark/benchmarking_support.rb
|
560
|
-
- test/benchmark/bm_active_record.rb
|
561
|
-
- test/benchmark/bm_adapter.rb
|
562
|
-
- test/benchmark/bm_caching.rb
|
563
|
-
- test/benchmark/bm_lookup_chain.rb
|
564
|
-
- test/benchmark/bm_transform.rb
|
565
|
-
- test/benchmark/config.ru
|
566
|
-
- test/benchmark/controllers.rb
|
567
|
-
- test/benchmark/fixtures.rb
|
568
|
-
- test/cache_test.rb
|
569
|
-
- test/collection_serializer_test.rb
|
570
|
-
- test/fixtures/active_record.rb
|
571
|
-
- test/fixtures/poro.rb
|
572
|
-
- test/generators/scaffold_controller_generator_test.rb
|
573
|
-
- test/generators/serializer_generator_test.rb
|
574
|
-
- test/grape_test.rb
|
575
|
-
- test/lint_test.rb
|
576
|
-
- test/logger_test.rb
|
577
|
-
- test/poro_test.rb
|
578
|
-
- test/serializable_resource_test.rb
|
579
|
-
- test/serializers/association_macros_test.rb
|
580
|
-
- test/serializers/associations_test.rb
|
581
|
-
- test/serializers/attribute_test.rb
|
582
|
-
- test/serializers/attributes_test.rb
|
583
|
-
- test/serializers/caching_configuration_test_isolated.rb
|
584
|
-
- test/serializers/configuration_test.rb
|
585
|
-
- test/serializers/fieldset_test.rb
|
586
|
-
- test/serializers/meta_test.rb
|
587
|
-
- test/serializers/options_test.rb
|
588
|
-
- test/serializers/read_attribute_for_serialization_test.rb
|
589
|
-
- test/serializers/reflection_test.rb
|
590
|
-
- test/serializers/root_test.rb
|
591
|
-
- test/serializers/serialization_test.rb
|
592
|
-
- test/serializers/serializer_for_test.rb
|
593
|
-
- test/serializers/serializer_for_with_namespace_test.rb
|
594
|
-
- test/support/custom_schemas/active_model_serializers/test/schema_test/my/index.json
|
595
|
-
- test/support/isolated_unit.rb
|
596
|
-
- test/support/rails5_shims.rb
|
597
|
-
- test/support/rails_app.rb
|
598
|
-
- test/support/schemas/active_model_serializers/test/schema_test/my/index.json
|
599
|
-
- test/support/schemas/active_model_serializers/test/schema_test/my/show.json
|
600
|
-
- test/support/schemas/custom/show.json
|
601
|
-
- test/support/schemas/hyper_schema.json
|
602
|
-
- test/support/schemas/render_using_json_api.json
|
603
|
-
- test/support/schemas/simple_json_pointers.json
|
604
|
-
- test/support/serialization_testing.rb
|
605
|
-
- test/test_helper.rb
|
350
|
+
test_files: []
|
data/.github/ISSUE_TEMPLATE.md
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
#### Expected behavior vs actual behavior
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
#### Steps to reproduce
|
6
|
-
*(e.g., detailed walkthrough, runnable script, example application)*
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
#### Environment
|
11
|
-
|
12
|
-
ActiveModelSerializers Version *(commit ref if not on tag)*:
|
13
|
-
|
14
|
-
Output of `ruby -e "puts RUBY_DESCRIPTION"`:
|
15
|
-
|
16
|
-
OS Type & Version:
|
17
|
-
|
18
|
-
Integrated application and version *(e.g., Rails, Grape, etc)*:
|
19
|
-
|
20
|
-
|
21
|
-
#### Backtrace
|
22
|
-
*(e.g., provide any applicable backtraces from your application)*
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
#### Additonal helpful information
|
27
|
-
*(e.g., Gemfile.lock, configurations, PR containing a failing test, git bisect results)*
|
28
|
-
|
29
|
-
|
data/.gitignore
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
*.gem
|
2
|
-
*.rbc
|
3
|
-
.bundle
|
4
|
-
.config
|
5
|
-
.yardoc
|
6
|
-
Gemfile.lock
|
7
|
-
Gemfile.local
|
8
|
-
InstalledFiles
|
9
|
-
_yardoc
|
10
|
-
coverage
|
11
|
-
doc/
|
12
|
-
lib/bundler/man
|
13
|
-
pkg
|
14
|
-
Vagrantfile
|
15
|
-
.vagrant
|
16
|
-
rdoc
|
17
|
-
spec/reports
|
18
|
-
test/tmp
|
19
|
-
test/version_tmp
|
20
|
-
tmp
|
21
|
-
*.swp
|
22
|
-
.ruby-version
|
23
|
-
.ruby-gemset
|
24
|
-
vendor/bundle
|
25
|
-
tags
|
26
|
-
|
27
|
-
# silly macs
|
28
|
-
.DS_Store
|
29
|
-
.DS_Store?
|
30
|
-
._*
|
31
|
-
.Spotlight-V100
|
32
|
-
.Trashes
|
33
|
-
Icon?
|
34
|
-
ehthumbs.db
|
35
|
-
Thumbs.db
|