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.
Files changed (215) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +227 -2
  3. data/README.md +171 -33
  4. data/lib/action_controller/serialization.rb +23 -3
  5. data/lib/active_model/serializable_resource.rb +2 -0
  6. data/lib/active_model/serializer/adapter/attributes.rb +2 -0
  7. data/lib/active_model/serializer/adapter/base.rb +4 -0
  8. data/lib/active_model/serializer/adapter/json.rb +2 -0
  9. data/lib/active_model/serializer/adapter/json_api.rb +2 -0
  10. data/lib/active_model/serializer/adapter/null.rb +2 -0
  11. data/lib/active_model/serializer/adapter.rb +2 -0
  12. data/lib/active_model/serializer/array_serializer.rb +10 -5
  13. data/lib/active_model/serializer/association.rb +64 -10
  14. data/lib/active_model/serializer/attribute.rb +2 -0
  15. data/lib/active_model/serializer/belongs_to_reflection.rb +6 -3
  16. data/lib/active_model/serializer/collection_serializer.rb +39 -13
  17. data/lib/active_model/serializer/{caching.rb → concerns/caching.rb} +89 -117
  18. data/lib/active_model/serializer/error_serializer.rb +13 -7
  19. data/lib/active_model/serializer/errors_serializer.rb +27 -20
  20. data/lib/active_model/serializer/field.rb +2 -0
  21. data/lib/active_model/serializer/fieldset.rb +3 -1
  22. data/lib/active_model/serializer/has_many_reflection.rb +5 -3
  23. data/lib/active_model/serializer/has_one_reflection.rb +3 -4
  24. data/lib/active_model/serializer/lazy_association.rb +99 -0
  25. data/lib/active_model/serializer/link.rb +23 -0
  26. data/lib/active_model/serializer/lint.rb +136 -130
  27. data/lib/active_model/serializer/null.rb +2 -0
  28. data/lib/active_model/serializer/reflection.rb +130 -65
  29. data/lib/active_model/serializer/version.rb +3 -1
  30. data/lib/active_model/serializer.rb +319 -86
  31. data/lib/active_model_serializers/adapter/attributes.rb +17 -57
  32. data/lib/active_model_serializers/adapter/base.rb +41 -39
  33. data/lib/active_model_serializers/adapter/json.rb +2 -0
  34. data/lib/active_model_serializers/adapter/json_api/deserialization.rb +4 -2
  35. data/lib/active_model_serializers/adapter/json_api/error.rb +2 -0
  36. data/lib/active_model_serializers/adapter/json_api/jsonapi.rb +2 -0
  37. data/lib/active_model_serializers/adapter/json_api/link.rb +3 -1
  38. data/lib/active_model_serializers/adapter/json_api/meta.rb +2 -0
  39. data/lib/active_model_serializers/adapter/json_api/pagination_links.rb +49 -21
  40. data/lib/active_model_serializers/adapter/json_api/relationship.rb +77 -23
  41. data/lib/active_model_serializers/adapter/json_api/resource_identifier.rb +41 -10
  42. data/lib/active_model_serializers/adapter/json_api.rb +84 -65
  43. data/lib/active_model_serializers/adapter/null.rb +2 -0
  44. data/lib/active_model_serializers/adapter.rb +9 -1
  45. data/lib/active_model_serializers/callbacks.rb +2 -0
  46. data/lib/active_model_serializers/deprecate.rb +3 -2
  47. data/lib/active_model_serializers/deserialization.rb +4 -0
  48. data/lib/active_model_serializers/json_pointer.rb +2 -0
  49. data/lib/active_model_serializers/logging.rb +2 -0
  50. data/lib/active_model_serializers/lookup_chain.rb +82 -0
  51. data/lib/active_model_serializers/model/caching.rb +25 -0
  52. data/lib/active_model_serializers/model.rb +111 -28
  53. data/lib/active_model_serializers/railtie.rb +7 -1
  54. data/lib/active_model_serializers/register_jsonapi_renderer.rb +46 -31
  55. data/lib/active_model_serializers/serializable_resource.rb +10 -7
  56. data/lib/active_model_serializers/serialization_context.rb +12 -3
  57. data/lib/active_model_serializers/test/schema.rb +4 -2
  58. data/lib/active_model_serializers/test/serializer.rb +2 -0
  59. data/lib/active_model_serializers/test.rb +2 -0
  60. data/lib/active_model_serializers.rb +35 -10
  61. data/lib/generators/rails/resource_override.rb +3 -1
  62. data/lib/generators/rails/serializer_generator.rb +6 -4
  63. data/lib/grape/active_model_serializers.rb +9 -5
  64. data/lib/grape/formatters/active_model_serializers.rb +21 -2
  65. data/lib/grape/helpers/active_model_serializers.rb +3 -0
  66. data/lib/tasks/rubocop.rake +55 -0
  67. metadata +110 -276
  68. data/.github/ISSUE_TEMPLATE.md +0 -29
  69. data/.github/PULL_REQUEST_TEMPLATE.md +0 -15
  70. data/.gitignore +0 -35
  71. data/.rubocop.yml +0 -104
  72. data/.rubocop_todo.yml +0 -167
  73. data/.simplecov +0 -110
  74. data/.travis.yml +0 -43
  75. data/CONTRIBUTING.md +0 -105
  76. data/Gemfile +0 -53
  77. data/Rakefile +0 -103
  78. data/active_model_serializers.gemspec +0 -66
  79. data/appveyor.yml +0 -24
  80. data/bin/bench +0 -171
  81. data/bin/bench_regression +0 -316
  82. data/bin/serve_benchmark +0 -39
  83. data/docs/ARCHITECTURE.md +0 -126
  84. data/docs/README.md +0 -40
  85. data/docs/STYLE.md +0 -58
  86. data/docs/general/adapters.md +0 -245
  87. data/docs/general/caching.md +0 -52
  88. data/docs/general/configuration_options.md +0 -100
  89. data/docs/general/deserialization.md +0 -100
  90. data/docs/general/getting_started.md +0 -133
  91. data/docs/general/instrumentation.md +0 -40
  92. data/docs/general/key_transforms.md +0 -40
  93. data/docs/general/logging.md +0 -14
  94. data/docs/general/rendering.md +0 -255
  95. data/docs/general/serializers.md +0 -372
  96. data/docs/how-open-source-maintained.jpg +0 -0
  97. data/docs/howto/add_pagination_links.md +0 -139
  98. data/docs/howto/add_root_key.md +0 -51
  99. data/docs/howto/outside_controller_use.md +0 -58
  100. data/docs/howto/passing_arbitrary_options.md +0 -27
  101. data/docs/howto/serialize_poro.md +0 -32
  102. data/docs/howto/test.md +0 -152
  103. data/docs/integrations/ember-and-json-api.md +0 -112
  104. data/docs/integrations/grape.md +0 -19
  105. data/docs/jsonapi/errors.md +0 -56
  106. data/docs/jsonapi/schema/schema.json +0 -366
  107. data/docs/jsonapi/schema.md +0 -151
  108. data/docs/rfcs/0000-namespace.md +0 -106
  109. data/docs/rfcs/template.md +0 -15
  110. data/lib/active_model/serializer/associations.rb +0 -100
  111. data/lib/active_model/serializer/attributes.rb +0 -82
  112. data/lib/active_model/serializer/collection_reflection.rb +0 -7
  113. data/lib/active_model/serializer/configuration.rb +0 -35
  114. data/lib/active_model/serializer/include_tree.rb +0 -111
  115. data/lib/active_model/serializer/links.rb +0 -35
  116. data/lib/active_model/serializer/meta.rb +0 -29
  117. data/lib/active_model/serializer/singular_reflection.rb +0 -7
  118. data/lib/active_model/serializer/type.rb +0 -25
  119. data/lib/active_model_serializers/key_transform.rb +0 -70
  120. data/test/action_controller/adapter_selector_test.rb +0 -53
  121. data/test/action_controller/explicit_serializer_test.rb +0 -134
  122. data/test/action_controller/json/include_test.rb +0 -167
  123. data/test/action_controller/json_api/deserialization_test.rb +0 -112
  124. data/test/action_controller/json_api/errors_test.rb +0 -41
  125. data/test/action_controller/json_api/linked_test.rb +0 -197
  126. data/test/action_controller/json_api/pagination_test.rb +0 -116
  127. data/test/action_controller/json_api/transform_test.rb +0 -181
  128. data/test/action_controller/serialization_scope_name_test.rb +0 -229
  129. data/test/action_controller/serialization_test.rb +0 -469
  130. data/test/active_model_serializers/adapter_for_test.rb +0 -208
  131. data/test/active_model_serializers/json_pointer_test.rb +0 -20
  132. data/test/active_model_serializers/key_transform_test.rb +0 -263
  133. data/test/active_model_serializers/logging_test.rb +0 -77
  134. data/test/active_model_serializers/model_test.rb +0 -9
  135. data/test/active_model_serializers/railtie_test_isolated.rb +0 -63
  136. data/test/active_model_serializers/serialization_context_test_isolated.rb +0 -58
  137. data/test/active_model_serializers/test/schema_test.rb +0 -130
  138. data/test/active_model_serializers/test/serializer_test.rb +0 -62
  139. data/test/active_record_test.rb +0 -9
  140. data/test/adapter/deprecation_test.rb +0 -100
  141. data/test/adapter/json/belongs_to_test.rb +0 -45
  142. data/test/adapter/json/collection_test.rb +0 -90
  143. data/test/adapter/json/has_many_test.rb +0 -45
  144. data/test/adapter/json/transform_test.rb +0 -93
  145. data/test/adapter/json_api/belongs_to_test.rb +0 -155
  146. data/test/adapter/json_api/collection_test.rb +0 -95
  147. data/test/adapter/json_api/errors_test.rb +0 -78
  148. data/test/adapter/json_api/fields_test.rb +0 -87
  149. data/test/adapter/json_api/has_many_embed_ids_test.rb +0 -43
  150. data/test/adapter/json_api/has_many_explicit_serializer_test.rb +0 -96
  151. data/test/adapter/json_api/has_many_test.rb +0 -144
  152. data/test/adapter/json_api/has_one_test.rb +0 -80
  153. data/test/adapter/json_api/json_api_test.rb +0 -35
  154. data/test/adapter/json_api/linked_test.rb +0 -392
  155. data/test/adapter/json_api/links_test.rb +0 -93
  156. data/test/adapter/json_api/pagination_links_test.rb +0 -166
  157. data/test/adapter/json_api/parse_test.rb +0 -137
  158. data/test/adapter/json_api/relationship_test.rb +0 -161
  159. data/test/adapter/json_api/relationships_test.rb +0 -199
  160. data/test/adapter/json_api/resource_identifier_test.rb +0 -85
  161. data/test/adapter/json_api/resource_meta_test.rb +0 -100
  162. data/test/adapter/json_api/toplevel_jsonapi_test.rb +0 -82
  163. data/test/adapter/json_api/transform_test.rb +0 -502
  164. data/test/adapter/json_api/type_test.rb +0 -61
  165. data/test/adapter/json_test.rb +0 -45
  166. data/test/adapter/null_test.rb +0 -23
  167. data/test/adapter/polymorphic_test.rb +0 -171
  168. data/test/adapter_test.rb +0 -67
  169. data/test/array_serializer_test.rb +0 -22
  170. data/test/benchmark/app.rb +0 -65
  171. data/test/benchmark/benchmarking_support.rb +0 -67
  172. data/test/benchmark/bm_caching.rb +0 -119
  173. data/test/benchmark/bm_transform.rb +0 -34
  174. data/test/benchmark/config.ru +0 -3
  175. data/test/benchmark/controllers.rb +0 -84
  176. data/test/benchmark/fixtures.rb +0 -219
  177. data/test/cache_test.rb +0 -485
  178. data/test/collection_serializer_test.rb +0 -110
  179. data/test/fixtures/active_record.rb +0 -78
  180. data/test/fixtures/poro.rb +0 -282
  181. data/test/generators/scaffold_controller_generator_test.rb +0 -24
  182. data/test/generators/serializer_generator_test.rb +0 -57
  183. data/test/grape_test.rb +0 -82
  184. data/test/include_tree/from_include_args_test.rb +0 -26
  185. data/test/include_tree/from_string_test.rb +0 -94
  186. data/test/include_tree/include_args_to_hash_test.rb +0 -64
  187. data/test/lint_test.rb +0 -49
  188. data/test/logger_test.rb +0 -18
  189. data/test/poro_test.rb +0 -9
  190. data/test/serializable_resource_test.rb +0 -83
  191. data/test/serializers/association_macros_test.rb +0 -36
  192. data/test/serializers/associations_test.rb +0 -295
  193. data/test/serializers/attribute_test.rb +0 -151
  194. data/test/serializers/attributes_test.rb +0 -52
  195. data/test/serializers/caching_configuration_test_isolated.rb +0 -170
  196. data/test/serializers/configuration_test.rb +0 -32
  197. data/test/serializers/fieldset_test.rb +0 -14
  198. data/test/serializers/meta_test.rb +0 -196
  199. data/test/serializers/options_test.rb +0 -21
  200. data/test/serializers/read_attribute_for_serialization_test.rb +0 -79
  201. data/test/serializers/root_test.rb +0 -21
  202. data/test/serializers/serialization_test.rb +0 -55
  203. data/test/serializers/serializer_for_test.rb +0 -134
  204. data/test/support/custom_schemas/active_model_serializers/test/schema_test/my/index.json +0 -6
  205. data/test/support/isolated_unit.rb +0 -79
  206. data/test/support/rails5_shims.rb +0 -47
  207. data/test/support/rails_app.rb +0 -45
  208. data/test/support/schemas/active_model_serializers/test/schema_test/my/index.json +0 -6
  209. data/test/support/schemas/active_model_serializers/test/schema_test/my/show.json +0 -6
  210. data/test/support/schemas/custom/show.json +0 -7
  211. data/test/support/schemas/hyper_schema.json +0 -93
  212. data/test/support/schemas/render_using_json_api.json +0 -43
  213. data/test/support/schemas/simple_json_pointers.json +0 -10
  214. data/test/support/serialization_testing.rb +0 -53
  215. 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.0
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: 2016-05-17 00:00:00.000000000 Z
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.0'
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.0'
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.0'
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.0'
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.0'
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: '4.0'
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.0'
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.0'
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: '1.6'
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: '1.6'
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: '1.0'
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: '1.0'
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: '12.0'
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: '12.0'
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/configuration.rb
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/include_tree.rb
278
- - lib/active_model/serializer/links.rb
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
- - test/action_controller/adapter_selector_test.rb
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.0.0
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
- rubyforge_project:
441
- rubygems_version: 2.4.5
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: []
@@ -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
-
@@ -1,15 +0,0 @@
1
- #### Purpose
2
-
3
-
4
- #### Changes
5
-
6
-
7
- #### Caveats
8
-
9
-
10
- #### Related GitHub issues
11
-
12
-
13
- #### Additional helpful information
14
-
15
-
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