active_model_serializers 0.10.0 → 0.10.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +227 -2
- data/README.md +171 -33
- data/lib/action_controller/serialization.rb +23 -3
- 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 +4 -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 +10 -5
- data/lib/active_model/serializer/association.rb +64 -10
- data/lib/active_model/serializer/attribute.rb +2 -0
- data/lib/active_model/serializer/belongs_to_reflection.rb +6 -3
- data/lib/active_model/serializer/collection_serializer.rb +39 -13
- data/lib/active_model/serializer/{caching.rb → concerns/caching.rb} +89 -117
- data/lib/active_model/serializer/error_serializer.rb +13 -7
- data/lib/active_model/serializer/errors_serializer.rb +27 -20
- 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 +5 -3
- data/lib/active_model/serializer/has_one_reflection.rb +3 -4
- data/lib/active_model/serializer/lazy_association.rb +99 -0
- data/lib/active_model/serializer/link.rb +23 -0
- data/lib/active_model/serializer/lint.rb +136 -130
- data/lib/active_model/serializer/null.rb +2 -0
- data/lib/active_model/serializer/reflection.rb +130 -65
- data/lib/active_model/serializer/version.rb +3 -1
- data/lib/active_model/serializer.rb +319 -86
- data/lib/active_model_serializers/adapter/attributes.rb +17 -57
- data/lib/active_model_serializers/adapter/base.rb +41 -39
- data/lib/active_model_serializers/adapter/json.rb +2 -0
- data/lib/active_model_serializers/adapter/json_api/deserialization.rb +4 -2
- 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 +3 -1
- data/lib/active_model_serializers/adapter/json_api/meta.rb +2 -0
- data/lib/active_model_serializers/adapter/json_api/pagination_links.rb +49 -21
- data/lib/active_model_serializers/adapter/json_api/relationship.rb +77 -23
- data/lib/active_model_serializers/adapter/json_api/resource_identifier.rb +41 -10
- data/lib/active_model_serializers/adapter/json_api.rb +84 -65
- data/lib/active_model_serializers/adapter/null.rb +2 -0
- data/lib/active_model_serializers/adapter.rb +9 -1
- data/lib/active_model_serializers/callbacks.rb +2 -0
- data/lib/active_model_serializers/deprecate.rb +3 -2
- data/lib/active_model_serializers/deserialization.rb +4 -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 +82 -0
- data/lib/active_model_serializers/model/caching.rb +25 -0
- data/lib/active_model_serializers/model.rb +111 -28
- data/lib/active_model_serializers/railtie.rb +7 -1
- data/lib/active_model_serializers/register_jsonapi_renderer.rb +46 -31
- data/lib/active_model_serializers/serializable_resource.rb +10 -7
- data/lib/active_model_serializers/serialization_context.rb +12 -3
- data/lib/active_model_serializers/test/schema.rb +4 -2
- 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 +35 -10
- data/lib/generators/rails/resource_override.rb +3 -1
- data/lib/generators/rails/serializer_generator.rb +6 -4
- data/lib/grape/active_model_serializers.rb +9 -5
- data/lib/grape/formatters/active_model_serializers.rb +21 -2
- data/lib/grape/helpers/active_model_serializers.rb +3 -0
- data/lib/tasks/rubocop.rake +55 -0
- metadata +110 -276
- data/.github/ISSUE_TEMPLATE.md +0 -29
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -15
- data/.gitignore +0 -35
- data/.rubocop.yml +0 -104
- data/.rubocop_todo.yml +0 -167
- data/.simplecov +0 -110
- data/.travis.yml +0 -43
- data/CONTRIBUTING.md +0 -105
- data/Gemfile +0 -53
- data/Rakefile +0 -103
- data/active_model_serializers.gemspec +0 -66
- data/appveyor.yml +0 -24
- data/bin/bench +0 -171
- data/bin/bench_regression +0 -316
- data/bin/serve_benchmark +0 -39
- data/docs/ARCHITECTURE.md +0 -126
- data/docs/README.md +0 -40
- data/docs/STYLE.md +0 -58
- data/docs/general/adapters.md +0 -245
- data/docs/general/caching.md +0 -52
- data/docs/general/configuration_options.md +0 -100
- data/docs/general/deserialization.md +0 -100
- 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 -14
- data/docs/general/rendering.md +0 -255
- data/docs/general/serializers.md +0 -372
- data/docs/how-open-source-maintained.jpg +0 -0
- data/docs/howto/add_pagination_links.md +0 -139
- data/docs/howto/add_root_key.md +0 -51
- data/docs/howto/outside_controller_use.md +0 -58
- data/docs/howto/passing_arbitrary_options.md +0 -27
- data/docs/howto/serialize_poro.md +0 -32
- data/docs/howto/test.md +0 -152
- data/docs/integrations/ember-and-json-api.md +0 -112
- 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/lib/active_model/serializer/associations.rb +0 -100
- data/lib/active_model/serializer/attributes.rb +0 -82
- data/lib/active_model/serializer/collection_reflection.rb +0 -7
- data/lib/active_model/serializer/configuration.rb +0 -35
- data/lib/active_model/serializer/include_tree.rb +0 -111
- data/lib/active_model/serializer/links.rb +0 -35
- data/lib/active_model/serializer/meta.rb +0 -29
- data/lib/active_model/serializer/singular_reflection.rb +0 -7
- data/lib/active_model/serializer/type.rb +0 -25
- data/lib/active_model_serializers/key_transform.rb +0 -70
- data/test/action_controller/adapter_selector_test.rb +0 -53
- data/test/action_controller/explicit_serializer_test.rb +0 -134
- data/test/action_controller/json/include_test.rb +0 -167
- data/test/action_controller/json_api/deserialization_test.rb +0 -112
- data/test/action_controller/json_api/errors_test.rb +0 -41
- data/test/action_controller/json_api/linked_test.rb +0 -197
- data/test/action_controller/json_api/pagination_test.rb +0 -116
- data/test/action_controller/json_api/transform_test.rb +0 -181
- data/test/action_controller/serialization_scope_name_test.rb +0 -229
- data/test/action_controller/serialization_test.rb +0 -469
- data/test/active_model_serializers/adapter_for_test.rb +0 -208
- data/test/active_model_serializers/json_pointer_test.rb +0 -20
- data/test/active_model_serializers/key_transform_test.rb +0 -263
- data/test/active_model_serializers/logging_test.rb +0 -77
- data/test/active_model_serializers/model_test.rb +0 -9
- data/test/active_model_serializers/railtie_test_isolated.rb +0 -63
- data/test/active_model_serializers/serialization_context_test_isolated.rb +0 -58
- data/test/active_model_serializers/test/schema_test.rb +0 -130
- data/test/active_model_serializers/test/serializer_test.rb +0 -62
- data/test/active_record_test.rb +0 -9
- 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 -90
- data/test/adapter/json/has_many_test.rb +0 -45
- 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 -95
- data/test/adapter/json_api/errors_test.rb +0 -78
- data/test/adapter/json_api/fields_test.rb +0 -87
- 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 -144
- data/test/adapter/json_api/has_one_test.rb +0 -80
- data/test/adapter/json_api/json_api_test.rb +0 -35
- data/test/adapter/json_api/linked_test.rb +0 -392
- data/test/adapter/json_api/links_test.rb +0 -93
- data/test/adapter/json_api/pagination_links_test.rb +0 -166
- data/test/adapter/json_api/parse_test.rb +0 -137
- data/test/adapter/json_api/relationship_test.rb +0 -161
- data/test/adapter/json_api/relationships_test.rb +0 -199
- data/test/adapter/json_api/resource_identifier_test.rb +0 -85
- 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 -502
- data/test/adapter/json_api/type_test.rb +0 -61
- data/test/adapter/json_test.rb +0 -45
- data/test/adapter/null_test.rb +0 -23
- 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_caching.rb +0 -119
- data/test/benchmark/bm_transform.rb +0 -34
- data/test/benchmark/config.ru +0 -3
- data/test/benchmark/controllers.rb +0 -84
- data/test/benchmark/fixtures.rb +0 -219
- data/test/cache_test.rb +0 -485
- data/test/collection_serializer_test.rb +0 -110
- data/test/fixtures/active_record.rb +0 -78
- data/test/fixtures/poro.rb +0 -282
- data/test/generators/scaffold_controller_generator_test.rb +0 -24
- data/test/generators/serializer_generator_test.rb +0 -57
- data/test/grape_test.rb +0 -82
- data/test/include_tree/from_include_args_test.rb +0 -26
- data/test/include_tree/from_string_test.rb +0 -94
- data/test/include_tree/include_args_to_hash_test.rb +0 -64
- data/test/lint_test.rb +0 -49
- data/test/logger_test.rb +0 -18
- data/test/poro_test.rb +0 -9
- data/test/serializable_resource_test.rb +0 -83
- data/test/serializers/association_macros_test.rb +0 -36
- data/test/serializers/associations_test.rb +0 -295
- data/test/serializers/attribute_test.rb +0 -151
- 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 -196
- data/test/serializers/options_test.rb +0 -21
- data/test/serializers/read_attribute_for_serialization_test.rb +0 -79
- data/test/serializers/root_test.rb +0 -21
- data/test/serializers/serialization_test.rb +0 -55
- data/test/serializers/serializer_for_test.rb +0 -134
- data/test/support/custom_schemas/active_model_serializers/test/schema_test/my/index.json +0 -6
- data/test/support/isolated_unit.rb +0 -79
- data/test/support/rails5_shims.rb +0 -47
- data/test/support/rails_app.rb +0 -45
- 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 -53
- data/test/test_helper.rb +0 -57
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.11
|
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: 2020-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -16,56 +16,134 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '4.
|
19
|
+
version: '4.1'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '6.1'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: '4.
|
29
|
+
version: '4.1'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '6.1'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: actionpack
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
37
|
- - ">="
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version: '4.
|
39
|
+
version: '4.1'
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '6.1'
|
34
43
|
type: :runtime
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
37
46
|
requirements:
|
38
47
|
- - ">="
|
39
48
|
- !ruby/object:Gem::Version
|
40
|
-
version: '4.
|
49
|
+
version: '4.1'
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '6.1'
|
41
53
|
- !ruby/object:Gem::Dependency
|
42
54
|
name: railties
|
43
55
|
requirement: !ruby/object:Gem::Requirement
|
44
56
|
requirements:
|
45
57
|
- - ">="
|
46
58
|
- !ruby/object:Gem::Version
|
47
|
-
version: '4.
|
59
|
+
version: '4.1'
|
60
|
+
- - "<"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '6.1'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '4.1'
|
70
|
+
- - "<"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '6.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'
|
93
|
+
- !ruby/object:Gem::Dependency
|
94
|
+
name: jsonapi-renderer
|
95
|
+
requirement: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: 0.1.1.beta1
|
100
|
+
- - "<"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0.3'
|
48
103
|
type: :runtime
|
49
104
|
prerelease: false
|
50
105
|
version_requirements: !ruby/object:Gem::Requirement
|
51
106
|
requirements:
|
52
107
|
- - ">="
|
53
108
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
109
|
+
version: 0.1.1.beta1
|
110
|
+
- - "<"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0.3'
|
113
|
+
- !ruby/object:Gem::Dependency
|
114
|
+
name: case_transform
|
115
|
+
requirement: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0.2'
|
120
|
+
type: :runtime
|
121
|
+
prerelease: false
|
122
|
+
version_requirements: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0.2'
|
55
127
|
- !ruby/object:Gem::Dependency
|
56
128
|
name: activerecord
|
57
129
|
requirement: !ruby/object:Gem::Requirement
|
58
130
|
requirements:
|
59
131
|
- - ">="
|
60
132
|
- !ruby/object:Gem::Version
|
61
|
-
version: '4.
|
133
|
+
version: '4.1'
|
134
|
+
- - "<"
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '6.1'
|
62
137
|
type: :development
|
63
138
|
prerelease: false
|
64
139
|
version_requirements: !ruby/object:Gem::Requirement
|
65
140
|
requirements:
|
66
141
|
- - ">="
|
67
142
|
- !ruby/object:Gem::Version
|
68
|
-
version: '4.
|
143
|
+
version: '4.1'
|
144
|
+
- - "<"
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '6.1'
|
69
147
|
- !ruby/object:Gem::Dependency
|
70
148
|
name: kaminari
|
71
149
|
requirement: !ruby/object:Gem::Requirement
|
@@ -104,28 +182,28 @@ dependencies:
|
|
104
182
|
name: bundler
|
105
183
|
requirement: !ruby/object:Gem::Requirement
|
106
184
|
requirements:
|
107
|
-
- - "
|
185
|
+
- - ">="
|
108
186
|
- !ruby/object:Gem::Version
|
109
|
-
version: '
|
187
|
+
version: '0'
|
110
188
|
type: :development
|
111
189
|
prerelease: false
|
112
190
|
version_requirements: !ruby/object:Gem::Requirement
|
113
191
|
requirements:
|
114
|
-
- - "
|
192
|
+
- - ">="
|
115
193
|
- !ruby/object:Gem::Version
|
116
|
-
version: '
|
194
|
+
version: '0'
|
117
195
|
- !ruby/object:Gem::Dependency
|
118
196
|
name: simplecov
|
119
197
|
requirement: !ruby/object:Gem::Requirement
|
120
198
|
requirements:
|
121
|
-
- - "
|
199
|
+
- - ">="
|
122
200
|
- !ruby/object:Gem::Version
|
123
201
|
version: '0.11'
|
124
202
|
type: :development
|
125
203
|
prerelease: false
|
126
204
|
version_requirements: !ruby/object:Gem::Requirement
|
127
205
|
requirements:
|
128
|
-
- - "
|
206
|
+
- - ">="
|
129
207
|
- !ruby/object:Gem::Version
|
130
208
|
version: '0.11'
|
131
209
|
- !ruby/object:Gem::Dependency
|
@@ -151,7 +229,7 @@ dependencies:
|
|
151
229
|
version: '0.13'
|
152
230
|
- - "<"
|
153
231
|
- !ruby/object:Gem::Version
|
154
|
-
version:
|
232
|
+
version: 0.19.1
|
155
233
|
type: :development
|
156
234
|
prerelease: false
|
157
235
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -161,7 +239,7 @@ dependencies:
|
|
161
239
|
version: '0.13'
|
162
240
|
- - "<"
|
163
241
|
- !ruby/object:Gem::Version
|
164
|
-
version:
|
242
|
+
version: 0.19.1
|
165
243
|
- !ruby/object:Gem::Dependency
|
166
244
|
name: json_schema
|
167
245
|
requirement: !ruby/object:Gem::Requirement
|
@@ -185,7 +263,7 @@ dependencies:
|
|
185
263
|
version: '10.0'
|
186
264
|
- - "<"
|
187
265
|
- !ruby/object:Gem::Version
|
188
|
-
version: '
|
266
|
+
version: '13.0'
|
189
267
|
type: :development
|
190
268
|
prerelease: false
|
191
269
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -195,7 +273,7 @@ dependencies:
|
|
195
273
|
version: '10.0'
|
196
274
|
- - "<"
|
197
275
|
- !ruby/object:Gem::Version
|
198
|
-
version: '
|
276
|
+
version: '13.0'
|
199
277
|
description: ActiveModel::Serializers allows you to generate your JSON in an object-oriented
|
200
278
|
and convention-driven manner.
|
201
279
|
email:
|
@@ -204,51 +282,9 @@ executables: []
|
|
204
282
|
extensions: []
|
205
283
|
extra_rdoc_files: []
|
206
284
|
files:
|
207
|
-
- ".github/ISSUE_TEMPLATE.md"
|
208
|
-
- ".github/PULL_REQUEST_TEMPLATE.md"
|
209
|
-
- ".gitignore"
|
210
|
-
- ".rubocop.yml"
|
211
|
-
- ".rubocop_todo.yml"
|
212
|
-
- ".simplecov"
|
213
|
-
- ".travis.yml"
|
214
285
|
- CHANGELOG.md
|
215
|
-
- CONTRIBUTING.md
|
216
|
-
- Gemfile
|
217
286
|
- MIT-LICENSE
|
218
287
|
- README.md
|
219
|
-
- Rakefile
|
220
|
-
- active_model_serializers.gemspec
|
221
|
-
- appveyor.yml
|
222
|
-
- bin/bench
|
223
|
-
- bin/bench_regression
|
224
|
-
- bin/serve_benchmark
|
225
|
-
- docs/ARCHITECTURE.md
|
226
|
-
- docs/README.md
|
227
|
-
- docs/STYLE.md
|
228
|
-
- docs/general/adapters.md
|
229
|
-
- docs/general/caching.md
|
230
|
-
- docs/general/configuration_options.md
|
231
|
-
- docs/general/deserialization.md
|
232
|
-
- docs/general/getting_started.md
|
233
|
-
- docs/general/instrumentation.md
|
234
|
-
- docs/general/key_transforms.md
|
235
|
-
- docs/general/logging.md
|
236
|
-
- docs/general/rendering.md
|
237
|
-
- docs/general/serializers.md
|
238
|
-
- docs/how-open-source-maintained.jpg
|
239
|
-
- docs/howto/add_pagination_links.md
|
240
|
-
- docs/howto/add_root_key.md
|
241
|
-
- docs/howto/outside_controller_use.md
|
242
|
-
- docs/howto/passing_arbitrary_options.md
|
243
|
-
- docs/howto/serialize_poro.md
|
244
|
-
- docs/howto/test.md
|
245
|
-
- docs/integrations/ember-and-json-api.md
|
246
|
-
- docs/integrations/grape.md
|
247
|
-
- docs/jsonapi/errors.md
|
248
|
-
- docs/jsonapi/schema.md
|
249
|
-
- docs/jsonapi/schema/schema.json
|
250
|
-
- docs/rfcs/0000-namespace.md
|
251
|
-
- docs/rfcs/template.md
|
252
288
|
- lib/action_controller/serialization.rb
|
253
289
|
- lib/active_model/serializable_resource.rb
|
254
290
|
- lib/active_model/serializer.rb
|
@@ -260,28 +296,21 @@ files:
|
|
260
296
|
- lib/active_model/serializer/adapter/null.rb
|
261
297
|
- lib/active_model/serializer/array_serializer.rb
|
262
298
|
- lib/active_model/serializer/association.rb
|
263
|
-
- lib/active_model/serializer/associations.rb
|
264
299
|
- lib/active_model/serializer/attribute.rb
|
265
|
-
- lib/active_model/serializer/attributes.rb
|
266
300
|
- lib/active_model/serializer/belongs_to_reflection.rb
|
267
|
-
- lib/active_model/serializer/caching.rb
|
268
|
-
- lib/active_model/serializer/collection_reflection.rb
|
269
301
|
- lib/active_model/serializer/collection_serializer.rb
|
270
|
-
- lib/active_model/serializer/
|
302
|
+
- lib/active_model/serializer/concerns/caching.rb
|
271
303
|
- lib/active_model/serializer/error_serializer.rb
|
272
304
|
- lib/active_model/serializer/errors_serializer.rb
|
273
305
|
- lib/active_model/serializer/field.rb
|
274
306
|
- lib/active_model/serializer/fieldset.rb
|
275
307
|
- lib/active_model/serializer/has_many_reflection.rb
|
276
308
|
- lib/active_model/serializer/has_one_reflection.rb
|
277
|
-
- lib/active_model/serializer/
|
278
|
-
- lib/active_model/serializer/
|
309
|
+
- lib/active_model/serializer/lazy_association.rb
|
310
|
+
- lib/active_model/serializer/link.rb
|
279
311
|
- lib/active_model/serializer/lint.rb
|
280
|
-
- lib/active_model/serializer/meta.rb
|
281
312
|
- lib/active_model/serializer/null.rb
|
282
313
|
- lib/active_model/serializer/reflection.rb
|
283
|
-
- lib/active_model/serializer/singular_reflection.rb
|
284
|
-
- lib/active_model/serializer/type.rb
|
285
314
|
- lib/active_model/serializer/version.rb
|
286
315
|
- lib/active_model_serializers.rb
|
287
316
|
- lib/active_model_serializers/adapter.rb
|
@@ -302,9 +331,10 @@ files:
|
|
302
331
|
- lib/active_model_serializers/deprecate.rb
|
303
332
|
- lib/active_model_serializers/deserialization.rb
|
304
333
|
- lib/active_model_serializers/json_pointer.rb
|
305
|
-
- lib/active_model_serializers/key_transform.rb
|
306
334
|
- lib/active_model_serializers/logging.rb
|
335
|
+
- lib/active_model_serializers/lookup_chain.rb
|
307
336
|
- lib/active_model_serializers/model.rb
|
337
|
+
- lib/active_model_serializers/model/caching.rb
|
308
338
|
- lib/active_model_serializers/railtie.rb
|
309
339
|
- lib/active_model_serializers/register_jsonapi_renderer.rb
|
310
340
|
- lib/active_model_serializers/serializable_resource.rb
|
@@ -319,110 +349,12 @@ files:
|
|
319
349
|
- lib/grape/active_model_serializers.rb
|
320
350
|
- lib/grape/formatters/active_model_serializers.rb
|
321
351
|
- lib/grape/helpers/active_model_serializers.rb
|
322
|
-
-
|
323
|
-
- test/action_controller/explicit_serializer_test.rb
|
324
|
-
- test/action_controller/json/include_test.rb
|
325
|
-
- test/action_controller/json_api/deserialization_test.rb
|
326
|
-
- test/action_controller/json_api/errors_test.rb
|
327
|
-
- test/action_controller/json_api/linked_test.rb
|
328
|
-
- test/action_controller/json_api/pagination_test.rb
|
329
|
-
- test/action_controller/json_api/transform_test.rb
|
330
|
-
- test/action_controller/serialization_scope_name_test.rb
|
331
|
-
- test/action_controller/serialization_test.rb
|
332
|
-
- test/active_model_serializers/adapter_for_test.rb
|
333
|
-
- test/active_model_serializers/json_pointer_test.rb
|
334
|
-
- test/active_model_serializers/key_transform_test.rb
|
335
|
-
- test/active_model_serializers/logging_test.rb
|
336
|
-
- test/active_model_serializers/model_test.rb
|
337
|
-
- test/active_model_serializers/railtie_test_isolated.rb
|
338
|
-
- test/active_model_serializers/serialization_context_test_isolated.rb
|
339
|
-
- test/active_model_serializers/test/schema_test.rb
|
340
|
-
- test/active_model_serializers/test/serializer_test.rb
|
341
|
-
- test/active_record_test.rb
|
342
|
-
- test/adapter/deprecation_test.rb
|
343
|
-
- test/adapter/json/belongs_to_test.rb
|
344
|
-
- test/adapter/json/collection_test.rb
|
345
|
-
- test/adapter/json/has_many_test.rb
|
346
|
-
- test/adapter/json/transform_test.rb
|
347
|
-
- test/adapter/json_api/belongs_to_test.rb
|
348
|
-
- test/adapter/json_api/collection_test.rb
|
349
|
-
- test/adapter/json_api/errors_test.rb
|
350
|
-
- test/adapter/json_api/fields_test.rb
|
351
|
-
- test/adapter/json_api/has_many_embed_ids_test.rb
|
352
|
-
- test/adapter/json_api/has_many_explicit_serializer_test.rb
|
353
|
-
- test/adapter/json_api/has_many_test.rb
|
354
|
-
- test/adapter/json_api/has_one_test.rb
|
355
|
-
- test/adapter/json_api/json_api_test.rb
|
356
|
-
- test/adapter/json_api/linked_test.rb
|
357
|
-
- test/adapter/json_api/links_test.rb
|
358
|
-
- test/adapter/json_api/pagination_links_test.rb
|
359
|
-
- test/adapter/json_api/parse_test.rb
|
360
|
-
- test/adapter/json_api/relationship_test.rb
|
361
|
-
- test/adapter/json_api/relationships_test.rb
|
362
|
-
- test/adapter/json_api/resource_identifier_test.rb
|
363
|
-
- test/adapter/json_api/resource_meta_test.rb
|
364
|
-
- test/adapter/json_api/toplevel_jsonapi_test.rb
|
365
|
-
- test/adapter/json_api/transform_test.rb
|
366
|
-
- test/adapter/json_api/type_test.rb
|
367
|
-
- test/adapter/json_test.rb
|
368
|
-
- test/adapter/null_test.rb
|
369
|
-
- test/adapter/polymorphic_test.rb
|
370
|
-
- test/adapter_test.rb
|
371
|
-
- test/array_serializer_test.rb
|
372
|
-
- test/benchmark/app.rb
|
373
|
-
- test/benchmark/benchmarking_support.rb
|
374
|
-
- test/benchmark/bm_caching.rb
|
375
|
-
- test/benchmark/bm_transform.rb
|
376
|
-
- test/benchmark/config.ru
|
377
|
-
- test/benchmark/controllers.rb
|
378
|
-
- test/benchmark/fixtures.rb
|
379
|
-
- test/cache_test.rb
|
380
|
-
- test/collection_serializer_test.rb
|
381
|
-
- test/fixtures/active_record.rb
|
382
|
-
- test/fixtures/poro.rb
|
383
|
-
- test/generators/scaffold_controller_generator_test.rb
|
384
|
-
- test/generators/serializer_generator_test.rb
|
385
|
-
- test/grape_test.rb
|
386
|
-
- test/include_tree/from_include_args_test.rb
|
387
|
-
- test/include_tree/from_string_test.rb
|
388
|
-
- test/include_tree/include_args_to_hash_test.rb
|
389
|
-
- test/lint_test.rb
|
390
|
-
- test/logger_test.rb
|
391
|
-
- test/poro_test.rb
|
392
|
-
- test/serializable_resource_test.rb
|
393
|
-
- test/serializers/association_macros_test.rb
|
394
|
-
- test/serializers/associations_test.rb
|
395
|
-
- test/serializers/attribute_test.rb
|
396
|
-
- test/serializers/attributes_test.rb
|
397
|
-
- test/serializers/caching_configuration_test_isolated.rb
|
398
|
-
- test/serializers/configuration_test.rb
|
399
|
-
- test/serializers/fieldset_test.rb
|
400
|
-
- test/serializers/meta_test.rb
|
401
|
-
- test/serializers/options_test.rb
|
402
|
-
- test/serializers/read_attribute_for_serialization_test.rb
|
403
|
-
- test/serializers/root_test.rb
|
404
|
-
- test/serializers/serialization_test.rb
|
405
|
-
- test/serializers/serializer_for_test.rb
|
406
|
-
- test/support/custom_schemas/active_model_serializers/test/schema_test/my/index.json
|
407
|
-
- test/support/isolated_unit.rb
|
408
|
-
- test/support/rails5_shims.rb
|
409
|
-
- test/support/rails_app.rb
|
410
|
-
- test/support/schemas/active_model_serializers/test/schema_test/my/index.json
|
411
|
-
- test/support/schemas/active_model_serializers/test/schema_test/my/show.json
|
412
|
-
- test/support/schemas/custom/show.json
|
413
|
-
- test/support/schemas/hyper_schema.json
|
414
|
-
- test/support/schemas/render_using_json_api.json
|
415
|
-
- test/support/schemas/simple_json_pointers.json
|
416
|
-
- test/support/serialization_testing.rb
|
417
|
-
- test/test_helper.rb
|
352
|
+
- lib/tasks/rubocop.rake
|
418
353
|
homepage: https://github.com/rails-api/active_model_serializers
|
419
354
|
licenses:
|
420
355
|
- MIT
|
421
356
|
metadata: {}
|
422
|
-
post_install_message:
|
423
|
-
NOTE: The default key case for the JsonApi adapter has changed to dashed.
|
424
|
-
See https://github.com/rails-api/active_model_serializers/blob/master/docs/general/key_transforms.md
|
425
|
-
for more information on configuring this behavior.
|
357
|
+
post_install_message:
|
426
358
|
rdoc_options: []
|
427
359
|
require_paths:
|
428
360
|
- lib
|
@@ -430,113 +362,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
430
362
|
requirements:
|
431
363
|
- - ">="
|
432
364
|
- !ruby/object:Gem::Version
|
433
|
-
version: 2.
|
365
|
+
version: '2.1'
|
434
366
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
435
367
|
requirements:
|
436
368
|
- - ">="
|
437
369
|
- !ruby/object:Gem::Version
|
438
370
|
version: '0'
|
439
371
|
requirements: []
|
440
|
-
|
441
|
-
|
442
|
-
signing_key:
|
372
|
+
rubygems_version: 3.1.4
|
373
|
+
signing_key:
|
443
374
|
specification_version: 4
|
444
375
|
summary: Conventions-based JSON generation for Rails.
|
445
|
-
test_files:
|
446
|
-
- test/action_controller/adapter_selector_test.rb
|
447
|
-
- test/action_controller/explicit_serializer_test.rb
|
448
|
-
- test/action_controller/json/include_test.rb
|
449
|
-
- test/action_controller/json_api/deserialization_test.rb
|
450
|
-
- test/action_controller/json_api/errors_test.rb
|
451
|
-
- test/action_controller/json_api/linked_test.rb
|
452
|
-
- test/action_controller/json_api/pagination_test.rb
|
453
|
-
- test/action_controller/json_api/transform_test.rb
|
454
|
-
- test/action_controller/serialization_scope_name_test.rb
|
455
|
-
- test/action_controller/serialization_test.rb
|
456
|
-
- test/active_model_serializers/adapter_for_test.rb
|
457
|
-
- test/active_model_serializers/json_pointer_test.rb
|
458
|
-
- test/active_model_serializers/key_transform_test.rb
|
459
|
-
- test/active_model_serializers/logging_test.rb
|
460
|
-
- test/active_model_serializers/model_test.rb
|
461
|
-
- test/active_model_serializers/railtie_test_isolated.rb
|
462
|
-
- test/active_model_serializers/serialization_context_test_isolated.rb
|
463
|
-
- test/active_model_serializers/test/schema_test.rb
|
464
|
-
- test/active_model_serializers/test/serializer_test.rb
|
465
|
-
- test/active_record_test.rb
|
466
|
-
- test/adapter/deprecation_test.rb
|
467
|
-
- test/adapter/json/belongs_to_test.rb
|
468
|
-
- test/adapter/json/collection_test.rb
|
469
|
-
- test/adapter/json/has_many_test.rb
|
470
|
-
- test/adapter/json/transform_test.rb
|
471
|
-
- test/adapter/json_api/belongs_to_test.rb
|
472
|
-
- test/adapter/json_api/collection_test.rb
|
473
|
-
- test/adapter/json_api/errors_test.rb
|
474
|
-
- test/adapter/json_api/fields_test.rb
|
475
|
-
- test/adapter/json_api/has_many_embed_ids_test.rb
|
476
|
-
- test/adapter/json_api/has_many_explicit_serializer_test.rb
|
477
|
-
- test/adapter/json_api/has_many_test.rb
|
478
|
-
- test/adapter/json_api/has_one_test.rb
|
479
|
-
- test/adapter/json_api/json_api_test.rb
|
480
|
-
- test/adapter/json_api/linked_test.rb
|
481
|
-
- test/adapter/json_api/links_test.rb
|
482
|
-
- test/adapter/json_api/pagination_links_test.rb
|
483
|
-
- test/adapter/json_api/parse_test.rb
|
484
|
-
- test/adapter/json_api/relationship_test.rb
|
485
|
-
- test/adapter/json_api/relationships_test.rb
|
486
|
-
- test/adapter/json_api/resource_identifier_test.rb
|
487
|
-
- test/adapter/json_api/resource_meta_test.rb
|
488
|
-
- test/adapter/json_api/toplevel_jsonapi_test.rb
|
489
|
-
- test/adapter/json_api/transform_test.rb
|
490
|
-
- test/adapter/json_api/type_test.rb
|
491
|
-
- test/adapter/json_test.rb
|
492
|
-
- test/adapter/null_test.rb
|
493
|
-
- test/adapter/polymorphic_test.rb
|
494
|
-
- test/adapter_test.rb
|
495
|
-
- test/array_serializer_test.rb
|
496
|
-
- test/benchmark/app.rb
|
497
|
-
- test/benchmark/benchmarking_support.rb
|
498
|
-
- test/benchmark/bm_caching.rb
|
499
|
-
- test/benchmark/bm_transform.rb
|
500
|
-
- test/benchmark/config.ru
|
501
|
-
- test/benchmark/controllers.rb
|
502
|
-
- test/benchmark/fixtures.rb
|
503
|
-
- test/cache_test.rb
|
504
|
-
- test/collection_serializer_test.rb
|
505
|
-
- test/fixtures/active_record.rb
|
506
|
-
- test/fixtures/poro.rb
|
507
|
-
- test/generators/scaffold_controller_generator_test.rb
|
508
|
-
- test/generators/serializer_generator_test.rb
|
509
|
-
- test/grape_test.rb
|
510
|
-
- test/include_tree/from_include_args_test.rb
|
511
|
-
- test/include_tree/from_string_test.rb
|
512
|
-
- test/include_tree/include_args_to_hash_test.rb
|
513
|
-
- test/lint_test.rb
|
514
|
-
- test/logger_test.rb
|
515
|
-
- test/poro_test.rb
|
516
|
-
- test/serializable_resource_test.rb
|
517
|
-
- test/serializers/association_macros_test.rb
|
518
|
-
- test/serializers/associations_test.rb
|
519
|
-
- test/serializers/attribute_test.rb
|
520
|
-
- test/serializers/attributes_test.rb
|
521
|
-
- test/serializers/caching_configuration_test_isolated.rb
|
522
|
-
- test/serializers/configuration_test.rb
|
523
|
-
- test/serializers/fieldset_test.rb
|
524
|
-
- test/serializers/meta_test.rb
|
525
|
-
- test/serializers/options_test.rb
|
526
|
-
- test/serializers/read_attribute_for_serialization_test.rb
|
527
|
-
- test/serializers/root_test.rb
|
528
|
-
- test/serializers/serialization_test.rb
|
529
|
-
- test/serializers/serializer_for_test.rb
|
530
|
-
- test/support/custom_schemas/active_model_serializers/test/schema_test/my/index.json
|
531
|
-
- test/support/isolated_unit.rb
|
532
|
-
- test/support/rails5_shims.rb
|
533
|
-
- test/support/rails_app.rb
|
534
|
-
- test/support/schemas/active_model_serializers/test/schema_test/my/index.json
|
535
|
-
- test/support/schemas/active_model_serializers/test/schema_test/my/show.json
|
536
|
-
- test/support/schemas/custom/show.json
|
537
|
-
- test/support/schemas/hyper_schema.json
|
538
|
-
- test/support/schemas/render_using_json_api.json
|
539
|
-
- test/support/schemas/simple_json_pointers.json
|
540
|
-
- test/support/serialization_testing.rb
|
541
|
-
- test/test_helper.rb
|
542
|
-
has_rdoc:
|
376
|
+
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
|