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