active_model_serializers 0.10.9 → 0.10.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -2
  3. data/README.md +18 -18
  4. data/lib/action_controller/serialization.rb +9 -1
  5. data/lib/active_model/serializer.rb +11 -4
  6. data/lib/active_model/serializer/concerns/caching.rb +2 -1
  7. data/lib/active_model/serializer/fieldset.rb +1 -1
  8. data/lib/active_model/serializer/reflection.rb +4 -4
  9. data/lib/active_model/serializer/version.rb +1 -1
  10. data/lib/active_model_serializers/adapter/attributes.rb +21 -0
  11. data/lib/active_model_serializers/adapter/json_api/resource_identifier.rb +1 -1
  12. data/lib/active_model_serializers/model/caching.rb +25 -0
  13. metadata +24 -270
  14. data/.github/ISSUE_TEMPLATE.md +0 -29
  15. data/.github/PULL_REQUEST_TEMPLATE.md +0 -15
  16. data/.gitignore +0 -35
  17. data/.rubocop.yml +0 -109
  18. data/.simplecov +0 -110
  19. data/.travis.yml +0 -63
  20. data/CODE_OF_CONDUCT.md +0 -74
  21. data/CONTRIBUTING.md +0 -105
  22. data/Gemfile +0 -74
  23. data/Rakefile +0 -76
  24. data/active_model_serializers.gemspec +0 -64
  25. data/appveyor.yml +0 -28
  26. data/bin/bench +0 -171
  27. data/bin/bench_regression +0 -316
  28. data/bin/rubocop +0 -38
  29. data/bin/serve_benchmark +0 -39
  30. data/docs/README.md +0 -41
  31. data/docs/STYLE.md +0 -58
  32. data/docs/general/adapters.md +0 -269
  33. data/docs/general/caching.md +0 -58
  34. data/docs/general/configuration_options.md +0 -185
  35. data/docs/general/deserialization.md +0 -100
  36. data/docs/general/fields.md +0 -31
  37. data/docs/general/getting_started.md +0 -133
  38. data/docs/general/instrumentation.md +0 -40
  39. data/docs/general/key_transforms.md +0 -40
  40. data/docs/general/logging.md +0 -21
  41. data/docs/general/rendering.md +0 -293
  42. data/docs/general/serializers.md +0 -495
  43. data/docs/how-open-source-maintained.jpg +0 -0
  44. data/docs/howto/add_pagination_links.md +0 -138
  45. data/docs/howto/add_relationship_links.md +0 -140
  46. data/docs/howto/add_root_key.md +0 -62
  47. data/docs/howto/grape_integration.md +0 -42
  48. data/docs/howto/outside_controller_use.md +0 -66
  49. data/docs/howto/passing_arbitrary_options.md +0 -27
  50. data/docs/howto/serialize_poro.md +0 -73
  51. data/docs/howto/test.md +0 -154
  52. data/docs/howto/upgrade_from_0_8_to_0_10.md +0 -265
  53. data/docs/integrations/ember-and-json-api.md +0 -147
  54. data/docs/integrations/grape.md +0 -19
  55. data/docs/jsonapi/errors.md +0 -56
  56. data/docs/jsonapi/schema.md +0 -151
  57. data/docs/jsonapi/schema/schema.json +0 -366
  58. data/docs/rfcs/0000-namespace.md +0 -106
  59. data/docs/rfcs/template.md +0 -15
  60. data/test/action_controller/adapter_selector_test.rb +0 -64
  61. data/test/action_controller/explicit_serializer_test.rb +0 -137
  62. data/test/action_controller/json/include_test.rb +0 -248
  63. data/test/action_controller/json_api/deserialization_test.rb +0 -114
  64. data/test/action_controller/json_api/errors_test.rb +0 -42
  65. data/test/action_controller/json_api/fields_test.rb +0 -68
  66. data/test/action_controller/json_api/linked_test.rb +0 -204
  67. data/test/action_controller/json_api/pagination_test.rb +0 -126
  68. data/test/action_controller/json_api/transform_test.rb +0 -191
  69. data/test/action_controller/lookup_proc_test.rb +0 -51
  70. data/test/action_controller/namespace_lookup_test.rb +0 -234
  71. data/test/action_controller/serialization_scope_name_test.rb +0 -237
  72. data/test/action_controller/serialization_test.rb +0 -480
  73. data/test/active_model_serializers/adapter_for_test.rb +0 -210
  74. data/test/active_model_serializers/json_pointer_test.rb +0 -24
  75. data/test/active_model_serializers/logging_test.rb +0 -79
  76. data/test/active_model_serializers/model_test.rb +0 -144
  77. data/test/active_model_serializers/railtie_test_isolated.rb +0 -70
  78. data/test/active_model_serializers/register_jsonapi_renderer_test_isolated.rb +0 -163
  79. data/test/active_model_serializers/serialization_context_test_isolated.rb +0 -73
  80. data/test/active_model_serializers/test/schema_test.rb +0 -133
  81. data/test/active_model_serializers/test/serializer_test.rb +0 -64
  82. data/test/active_record_test.rb +0 -11
  83. data/test/adapter/attributes_test.rb +0 -42
  84. data/test/adapter/deprecation_test.rb +0 -102
  85. data/test/adapter/json/belongs_to_test.rb +0 -47
  86. data/test/adapter/json/collection_test.rb +0 -106
  87. data/test/adapter/json/has_many_test.rb +0 -55
  88. data/test/adapter/json/transform_test.rb +0 -95
  89. data/test/adapter/json_api/belongs_to_test.rb +0 -157
  90. data/test/adapter/json_api/collection_test.rb +0 -98
  91. data/test/adapter/json_api/errors_test.rb +0 -78
  92. data/test/adapter/json_api/fields_test.rb +0 -98
  93. data/test/adapter/json_api/has_many_explicit_serializer_test.rb +0 -98
  94. data/test/adapter/json_api/has_many_test.rb +0 -175
  95. data/test/adapter/json_api/has_one_test.rb +0 -82
  96. data/test/adapter/json_api/include_data_if_sideloaded_test.rb +0 -215
  97. data/test/adapter/json_api/json_api_test.rb +0 -35
  98. data/test/adapter/json_api/linked_test.rb +0 -415
  99. data/test/adapter/json_api/links_test.rb +0 -112
  100. data/test/adapter/json_api/pagination_links_test.rb +0 -208
  101. data/test/adapter/json_api/parse_test.rb +0 -139
  102. data/test/adapter/json_api/relationship_test.rb +0 -399
  103. data/test/adapter/json_api/resource_meta_test.rb +0 -102
  104. data/test/adapter/json_api/toplevel_jsonapi_test.rb +0 -84
  105. data/test/adapter/json_api/transform_test.rb +0 -514
  106. data/test/adapter/json_api/type_test.rb +0 -195
  107. data/test/adapter/json_test.rb +0 -48
  108. data/test/adapter/null_test.rb +0 -24
  109. data/test/adapter/polymorphic_test.rb +0 -220
  110. data/test/adapter_test.rb +0 -69
  111. data/test/array_serializer_test.rb +0 -24
  112. data/test/benchmark/app.rb +0 -67
  113. data/test/benchmark/benchmarking_support.rb +0 -69
  114. data/test/benchmark/bm_active_record.rb +0 -83
  115. data/test/benchmark/bm_adapter.rb +0 -40
  116. data/test/benchmark/bm_caching.rb +0 -121
  117. data/test/benchmark/bm_lookup_chain.rb +0 -85
  118. data/test/benchmark/bm_transform.rb +0 -47
  119. data/test/benchmark/config.ru +0 -3
  120. data/test/benchmark/controllers.rb +0 -85
  121. data/test/benchmark/fixtures.rb +0 -221
  122. data/test/cache_test.rb +0 -717
  123. data/test/collection_serializer_test.rb +0 -129
  124. data/test/fixtures/active_record.rb +0 -115
  125. data/test/fixtures/poro.rb +0 -227
  126. data/test/generators/scaffold_controller_generator_test.rb +0 -26
  127. data/test/generators/serializer_generator_test.rb +0 -77
  128. data/test/grape_test.rb +0 -198
  129. data/test/lint_test.rb +0 -51
  130. data/test/logger_test.rb +0 -22
  131. data/test/poro_test.rb +0 -11
  132. data/test/serializable_resource_test.rb +0 -81
  133. data/test/serializers/association_macros_test.rb +0 -39
  134. data/test/serializers/associations_test.rb +0 -520
  135. data/test/serializers/attribute_test.rb +0 -155
  136. data/test/serializers/attributes_test.rb +0 -54
  137. data/test/serializers/caching_configuration_test_isolated.rb +0 -172
  138. data/test/serializers/configuration_test.rb +0 -34
  139. data/test/serializers/fieldset_test.rb +0 -16
  140. data/test/serializers/meta_test.rb +0 -204
  141. data/test/serializers/options_test.rb +0 -34
  142. data/test/serializers/read_attribute_for_serialization_test.rb +0 -81
  143. data/test/serializers/reflection_test.rb +0 -481
  144. data/test/serializers/root_test.rb +0 -23
  145. data/test/serializers/serialization_test.rb +0 -57
  146. data/test/serializers/serializer_for_test.rb +0 -138
  147. data/test/serializers/serializer_for_with_namespace_test.rb +0 -90
  148. data/test/support/custom_schemas/active_model_serializers/test/schema_test/my/index.json +0 -6
  149. data/test/support/isolated_unit.rb +0 -86
  150. data/test/support/rails5_shims.rb +0 -55
  151. data/test/support/rails_app.rb +0 -40
  152. data/test/support/schemas/active_model_serializers/test/schema_test/my/index.json +0 -6
  153. data/test/support/schemas/active_model_serializers/test/schema_test/my/show.json +0 -6
  154. data/test/support/schemas/custom/show.json +0 -7
  155. data/test/support/schemas/hyper_schema.json +0 -93
  156. data/test/support/schemas/render_using_json_api.json +0 -43
  157. data/test/support/schemas/simple_json_pointers.json +0 -10
  158. data/test/support/serialization_testing.rb +0 -81
  159. data/test/test_helper.rb +0 -72
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e365d9b8e66fd40b66555a2e57faad48fee5bfd82b988ab42aacda73930bb53c
4
- data.tar.gz: bbad118b340ea31c7a09f1f0661d0e53866135a99923276182dc159d4eeb2f9c
3
+ metadata.gz: 3c046246492aa51d55bec5b8ce5d2a97d9cd0ff8dba206cdde613f47aca0230e
4
+ data.tar.gz: 3621cbc3e965bc80389e08b40483b6de73e4a7c7ba7ac96315e1d6e5ee2995e9
5
5
  SHA512:
6
- metadata.gz: 011fcf63a00a7cfc27a54679551cf6c03b3dd4ff177192fca7d2be34bfbb2c3b6c6ba40bc92395997a392ed9bf1d91823da15afa7bde374d08f5e9d69982d054
7
- data.tar.gz: 8311b1ed270c60ae5d00beaa2e421a350201bec131a44096190f40dfb61a84f11d50ace18c357cc77e364863bef94eebaad717dc78a156c923049679c5295d1d
6
+ metadata.gz: 6fca5a15965145969a683b4f3466a067812ae6680a6a171e885854b6e8e1a684685cb0b37b6ffd52045c8404a95237ddfdd45628e39c0e33a779512ee5a56f5b
7
+ data.tar.gz: c32438302db80117e82bec0964c58177cca8579765e5169d127b423927430ab2cff2c51f8b6858e09ea53044b8cf6205524398d0a2e8560738499e9e80983dfa
data/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ## 0.10.x
2
2
 
3
- ### [master (unreleased)](https://github.com/rails-api/active_model_serializers/compare/v0.10.9...0-10-stable)
3
+ ### [master (unreleased)](https://github.com/rails-api/active_model_serializers/compare/v0.10.12...0-10-stable)
4
4
 
5
5
  Breaking changes:
6
6
 
@@ -10,8 +10,41 @@ Fixes:
10
10
 
11
11
  Misc:
12
12
 
13
- ### [v0.10.9 (2019-02-08)](https://github.com/rails-api/active_model_serializers/compare/v0.10.8...v0.10.9)
13
+ ### [v0.10.12 (2020-12-10)](https://github.com/rails-api/active_model_serializers/compare/v0.10.11...v0.10.12)
14
+
15
+ Fixes:
16
+
17
+ - [#2398](https://github.com/rails-api/active_model_serializers/pull/2398) Update rails dependency to < 6.2 (@ritikesh)
18
+
19
+ ### [v0.10.11 (2020-12-04)](https://github.com/rails-api/active_model_serializers/compare/v0.10.10...v0.10.11)
20
+
21
+ Features:
22
+
23
+ - [#2361](https://github.com/rails-api/active_model_serializers/pull/2361) Add `ActiveModelSerializers.config.use_sha1_digests` to allow customization of the hashing algorithm used for serializer caching (@alexzherdev)
24
+
25
+ Fixes:
14
26
 
27
+ - [#2344](https://github.com/rails-api/active_model_serializers/pull/2344) Fixes #2341 introduced since #2223 (@wasifhossain)
28
+ - [#2395](https://github.com/rails-api/active_model_serializers/pull/2395) remove explicit require for thread_safe (@ritikesh)
29
+
30
+ ### [v0.10.10 (2019-07-13)](https://github.com/rails-api/active_model_serializers/compare/v0.10.9...v0.10.10)
31
+
32
+ Fixes:
33
+
34
+ - [#2319](https://github.com/rails-api/active_model_serializers/pull/2319) Fixes #2316. (@kylekeesling)
35
+ - Fix Rails 6.0 deprication warnings
36
+ - update test fixture schema to use `timestamps` instead of `timestamp`
37
+ - [#2223](https://github.com/rails-api/active_model_serializers/pull/2223) Support Fieldset in Attributes/JSON adapters documented in [docs/general/fields.md](https://github.com/rails-api/active_model_serializers/blob/0-10-stable/docs/general/fields.md) that worked partially before (@bf4)
38
+ - [#2337](https://github.com/rails-api/active_model_serializers/pull/2337) fix incorrect belongs_to serialization when foreign_key on object and belongs_to is blank (@InteNs)
39
+ - Fixes incorrect json-api generation when `jsonapi_use_foreign_key_on_belongs_to_relationship` is `true` and the relationship is blank
40
+ - [#2172](https://github.com/rails-api/active_model_serializers/pull/2172) Preserve the namespace when falling back to a superclass serializer
41
+
42
+ Misc:
43
+
44
+ - [#2327](https://github.com/rails-api/active_model_serializers/pull/2327) Add support for Ruby 2.6 on Travis CI (@wasifhossain)
45
+ - [#2304](https://github.com/rails-api/active_model_serializers/pull/2304) Slim down bundled gem by excluding test files and docs (@greysteil)
46
+
47
+ ### [v0.10.9 (2019-02-08)](https://github.com/rails-api/active_model_serializers/compare/v0.10.8...v0.10.9)
15
48
 
16
49
  Fixes:
17
50
 
data/README.md CHANGED
@@ -4,8 +4,8 @@
4
4
  <tr>
5
5
  <td>Build Status</td>
6
6
  <td>
7
- <a href="https://travis-ci.org/rails-api/active_model_serializers"><img src="https://travis-ci.org/rails-api/active_model_serializers.svg?branch=master" alt="Build Status" ></a>
8
- <a href="https://ci.appveyor.com/project/joaomdmoura/active-model-serializers/branch/master"><img src="https://ci.appveyor.com/api/projects/status/x6xdjydutm54gvyt/branch/master?svg=true" alt="Build status"></a>
7
+ <a href="https://travis-ci.org/rails-api/active_model_serializers"><img src="https://api.travis-ci.org/rails-api/active_model_serializers.svg?branch=0-10-stable" alt="Build Status" ></a>
8
+ <a href="https://ci.appveyor.com/project/bf4/active-model-serializers/branch/0-10-stable"><img src="https://ci.appveyor.com/api/projects/status/x6xdjydutm54gvyt/branch/master?svg=true" alt="Build status"></a>
9
9
  </td>
10
10
  </tr>
11
11
  <tr>
@@ -41,7 +41,7 @@ these methods to the adapter.)
41
41
 
42
42
  By default ActiveModelSerializers will use the **Attributes Adapter** (no JSON root).
43
43
  But we strongly advise you to use **JsonApi Adapter**, which
44
- follows 1.0 of the format specified in [jsonapi.org/format](http://jsonapi.org/format).
44
+ follows 1.0 of the format specified in [jsonapi.org/format](https://jsonapi.org/format).
45
45
  Check how to change the adapter in the sections below.
46
46
 
47
47
  `0.10.x` is **not** backward compatible with `0.9.x` nor `0.8.x`.
@@ -75,9 +75,9 @@ More information is available in the [Guides](docs) and
75
75
  If you find a bug, please report an [Issue](https://github.com/rails-api/active_model_serializers/issues/new)
76
76
  and see our [contributing guide](CONTRIBUTING.md).
77
77
 
78
- If you have a question, please [post to Stack Overflow](http://stackoverflow.com/questions/tagged/active-model-serializers).
78
+ If you have a question, please [post to Stack Overflow](https://stackoverflow.com/questions/tagged/active-model-serializers).
79
79
 
80
- If you'd like to chat, we have a [community slack](http://amserializers.herokuapp.com).
80
+ If you'd like to chat, we have a [community slack](https://amserializers.herokuapp.com).
81
81
 
82
82
  Thanks!
83
83
 
@@ -87,14 +87,14 @@ If you're reading this at https://github.com/rails-api/active_model_serializers
87
87
  reading documentation for our `master`, which may include features that have not
88
88
  been released yet. Please see below for the documentation relevant to you.
89
89
 
90
- - [0.10 (master) Documentation](https://github.com/rails-api/active_model_serializers/tree/master)
91
- - [0.10.6 (latest release) Documentation](https://github.com/rails-api/active_model_serializers/tree/v0.10.6)
92
- - [![API Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://www.rubydoc.info/gems/active_model_serializers/0.10.6)
93
- - [Guides](docs)
90
+ - [0.10 (0-10-stable) Documentation](https://github.com/rails-api/active_model_serializers/tree/0-10-stable)
91
+ - [0.10.10 (latest release) Documentation](https://github.com/rails-api/active_model_serializers/tree/v0.10.10)
92
+ - [![API Docs](https://img.shields.io/badge/yard-docs-blue.svg)](https://www.rubydoc.info/gems/active_model_serializers/0.10.10)
93
+ - [Guides](docs)
94
94
  - [0.9 (0-9-stable) Documentation](https://github.com/rails-api/active_model_serializers/tree/0-9-stable)
95
- - [![API Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://www.rubydoc.info/github/rails-api/active_model_serializers/0-9-stable)
95
+ - [![API Docs](https://img.shields.io/badge/yard-docs-blue.svg)](https://www.rubydoc.info/gems/active_model_serializers/0.9.7)
96
96
  - [0.8 (0-8-stable) Documentation](https://github.com/rails-api/active_model_serializers/tree/0-8-stable)
97
- - [![API Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://www.rubydoc.info/github/rails-api/active_model_serializers/0-8-stable)
97
+ - [![API Docs](https://img.shields.io/badge/yard-docs-blue.svg)](https://www.rubydoc.info/gems/active_model_serializers/0.8.4)
98
98
 
99
99
 
100
100
  ## High-level behavior
@@ -171,12 +171,12 @@ The original design is also available [here](https://github.com/rails-api/active
171
171
 
172
172
  ### ActiveModel::Serializer
173
173
 
174
- An **`ActiveModel::Serializer`** wraps a [serializable resource](https://github.com/rails/rails/blob/4-2-stable/activemodel/lib/active_model/serialization.rb)
174
+ An **`ActiveModel::Serializer`** wraps a [serializable resource](https://github.com/rails/rails/blob/master/activemodel/lib/active_model/serialization.rb)
175
175
  and exposes an `attributes` method, among a few others.
176
176
  It allows you to specify which attributes and associations should be represented in the serializatation of the resource.
177
177
  It requires an adapter to transform its attributes into a JSON document; it cannot be serialized itself.
178
178
  It may be useful to think of it as a
179
- [presenter](http://blog.steveklabnik.com/posts/2011-09-09-better-ruby-presenters).
179
+ [presenter](https://blog.steveklabnik.com/posts/2011-09-09-better-ruby-presenters).
180
180
 
181
181
  #### ActiveModel::CollectionSerializer
182
182
 
@@ -188,7 +188,7 @@ and, if there is no serializer, primitives.
188
188
  The **`ActiveModelSerializers::Adapter::Base`** describes the structure of the JSON document generated from a
189
189
  serializer. For example, the `Attributes` example represents each serializer as its
190
190
  unmodified attributes. The `JsonApi` adapter represents the serializer as a [JSON
191
- API](http://jsonapi.org/) document.
191
+ API](https://jsonapi.org/) document.
192
192
 
193
193
  ### ActiveModelSerializers::SerializableResource
194
194
 
@@ -229,7 +229,7 @@ High-level overview:
229
229
  - `:each_serializer` specifies the serializer for each resource in the collection.
230
230
  - For a **single resource**, the `:serializer` option is the resource serializer.
231
231
  - Options are partitioned in serializer options and adapter options. Keys for adapter options are specified by
232
- [`ADAPTER_OPTION_KEYS`](https://github.com/rails-api/active_model_serializers/blob/master/lib/active_model_serializers/serializable_resource.rb#L5).
232
+ [`ADAPTER_OPTION_KEYS`](lib/active_model_serializers/serializable_resource.rb#L5).
233
233
  The remaining options are serializer options.
234
234
 
235
235
  Details:
@@ -254,7 +254,7 @@ Details:
254
254
  2. `adapter_instance = ActiveModel::Serializer::Adapter.create(serializer_instance, adapter_opts)`
255
255
  1. **ActiveModel::Serializer::CollectionSerializer#new**
256
256
  1. If the `serializer_instance` was a `CollectionSerializer` and the `:serializer` serializer_opts
257
- is present, then [that serializer is passed into each resource](https://github.com/rails-api/active_model_serializers/blob/a54d237e2828fe6bab1ea5dfe6360d4ecc8214cd/lib/active_model/serializer/array_serializer.rb#L14-L16).
257
+ is present, then [that serializer is passed into each resource](https://github.com/rails-api/active_model_serializers/blob/0-10-stable/lib/active_model/serializer/collection_serializer.rb#L77-L79).
258
258
  1. **ActiveModel::Serializer#attributes** is used by the adapter to get the attributes for
259
259
  resource as defined by the serializer.
260
260
 
@@ -270,7 +270,7 @@ to know about, but not part of ActiveModelSerializers.)
270
270
  [(code)](lib/active_model/serializer/lint.rb).
271
271
 
272
272
  ActiveModelSerializers provides a
273
- [`ActiveModelSerializers::Model`](https://github.com/rails-api/active_model_serializers/blob/master/lib/active_model_serializers/model.rb),
273
+ [`ActiveModelSerializers::Model`](lib/active_model_serializers/model.rb),
274
274
  which is a simple serializable PORO (Plain-Old Ruby Object).
275
275
 
276
276
  `ActiveModelSerializers::Model` may be used either as a reference implementation, or in production code.
@@ -298,7 +298,7 @@ ActiveModelSerializers::SerializableResource.new(MyModel.new(level: 'awesome'),
298
298
 
299
299
  ## Semantic Versioning
300
300
 
301
- This project adheres to [semver](http://semver.org/)
301
+ This project adheres to [semver](https://semver.org/)
302
302
 
303
303
  ## Contributing
304
304
 
@@ -23,7 +23,15 @@ module ActionController
23
23
  end
24
24
 
25
25
  def namespace_for_serializer
26
- @namespace_for_serializer ||= self.class.parent unless self.class.parent == Object
26
+ @namespace_for_serializer ||= namespace_for_class(self.class) unless namespace_for_class(self.class) == Object
27
+ end
28
+
29
+ def namespace_for_class(klass)
30
+ if Module.method_defined?(:module_parent)
31
+ klass.module_parent
32
+ else
33
+ klass.parent
34
+ end
27
35
  end
28
36
 
29
37
  def serialization_scope
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'thread_safe'
4
3
  require 'jsonapi/include_directive'
5
4
  require 'active_model/serializer/collection_serializer'
6
5
  require 'active_model/serializer/array_serializer'
@@ -73,7 +72,7 @@ module ActiveModel
73
72
  # Used to cache serializer name => serializer class
74
73
  # when looked up by Serializer.get_serializer_for.
75
74
  def self.serializers_cache
76
- @serializers_cache ||= ThreadSafe::Cache.new
75
+ @serializers_cache ||= Concurrent::Map.new
77
76
  end
78
77
 
79
78
  # @api private
@@ -94,7 +93,7 @@ module ActiveModel
94
93
  if serializer_class
95
94
  serializer_class
96
95
  elsif klass.superclass
97
- get_serializer_for(klass.superclass)
96
+ get_serializer_for(klass.superclass, namespace)
98
97
  else
99
98
  nil # No serializer found
100
99
  end
@@ -365,6 +364,9 @@ module ActiveModel
365
364
  def serializable_hash(adapter_options = nil, options = {}, adapter_instance = self.class.serialization_adapter_instance)
366
365
  adapter_options ||= {}
367
366
  options[:include_directive] ||= ActiveModel::Serializer.include_directive_from_options(adapter_options)
367
+ if (fieldset = adapter_options[:fieldset])
368
+ options[:fields] = fieldset.fields_for(json_key)
369
+ end
368
370
  resource = attributes_hash(adapter_options, options, adapter_instance)
369
371
  relationships = associations_hash(adapter_options, options, adapter_instance)
370
372
  resource.merge(relationships)
@@ -379,7 +381,12 @@ module ActiveModel
379
381
 
380
382
  # Used by adapter as resource root.
381
383
  def json_key
382
- root || _type || object.class.model_name.to_s.underscore
384
+ root || _type ||
385
+ begin
386
+ object.class.model_name.to_s.underscore
387
+ rescue ArgumentError
388
+ 'anonymous_object'
389
+ end
383
390
  end
384
391
 
385
392
  def read_attribute_for_serialization(attr)
@@ -56,7 +56,8 @@ module ActiveModel
56
56
  def digest_caller_file(caller_line)
57
57
  serializer_file_path = caller_line[CALLER_FILE]
58
58
  serializer_file_contents = IO.read(serializer_file_path)
59
- Digest::MD5.hexdigest(serializer_file_contents)
59
+ algorithm = ActiveModelSerializers.config.use_sha1_digests ? Digest::SHA1 : Digest::MD5
60
+ algorithm.hexdigest(serializer_file_contents)
60
61
  rescue TypeError, Errno::ENOENT
61
62
  warn <<-EOF.strip_heredoc
62
63
  Cannot digest non-existent file: '#{caller_line}'.
@@ -12,7 +12,7 @@ module ActiveModel
12
12
  end
13
13
 
14
14
  def fields_for(type)
15
- fields[type.singularize.to_sym] || fields[type.pluralize.to_sym]
15
+ fields[type.to_s.singularize.to_sym] || fields[type.to_s.pluralize.to_sym]
16
16
  end
17
17
 
18
18
  protected
@@ -87,8 +87,8 @@ module ActiveModel
87
87
  # meta ids: ids
88
88
  # end
89
89
  # end
90
- def link(name, value = nil)
91
- options[:links][name] = block_given? ? Proc.new : value
90
+ def link(name, value = nil, &block)
91
+ options[:links][name] = block_given? ? block : value
92
92
  :nil
93
93
  end
94
94
 
@@ -102,8 +102,8 @@ module ActiveModel
102
102
  # href object.blog.id.to_s
103
103
  # meta(id: object.blog.id)
104
104
  # end
105
- def meta(value = nil)
106
- options[:meta] = block_given? ? Proc.new : value
105
+ def meta(value = nil, &block)
106
+ options[:meta] = block_given? ? block : value
107
107
  :nil
108
108
  end
109
109
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveModel
4
4
  class Serializer
5
- VERSION = '0.10.9'.freeze
5
+ VERSION = '0.10.12'.freeze
6
6
  end
7
7
  end
@@ -3,6 +3,11 @@
3
3
  module ActiveModelSerializers
4
4
  module Adapter
5
5
  class Attributes < Base
6
+ def initialize(*)
7
+ super
8
+ instance_options[:fieldset] ||= ActiveModel::Serializer::Fieldset.new(fields_to_fieldset(instance_options.delete(:fields)))
9
+ end
10
+
6
11
  def serializable_hash(options = nil)
7
12
  options = serialization_options(options)
8
13
  options[:fields] ||= instance_options[:fields]
@@ -10,6 +15,22 @@ module ActiveModelSerializers
10
15
 
11
16
  self.class.transform_key_casing!(serialized_hash, instance_options)
12
17
  end
18
+
19
+ private
20
+
21
+ def fields_to_fieldset(fields)
22
+ return fields if fields.nil?
23
+ resource_fields = []
24
+ relationship_fields = {}
25
+ fields.each do |field|
26
+ case field
27
+ when Symbol, String then resource_fields << field
28
+ when Hash then relationship_fields.merge!(field)
29
+ else fail ArgumentError, "Unknown conversion of fields to fieldset: '#{field.inspect}' in '#{fields.inspect}'"
30
+ end
31
+ end
32
+ relationship_fields.merge!(serializer.json_key.to_sym => resource_fields)
33
+ end
13
34
  end
14
35
  end
15
36
  end
@@ -13,7 +13,7 @@ module ActiveModelSerializers
13
13
  type = inflect_type(type)
14
14
  type = type_for(:no_class_needed, type, options)
15
15
  if id.blank?
16
- { type: type }
16
+ nil
17
17
  else
18
18
  { id: id.to_s, type: type }
19
19
  end
@@ -0,0 +1,25 @@
1
+ module ActiveModelSerializers
2
+ class Model
3
+ module Caching
4
+ extend ActiveSupport::Concern
5
+
6
+ included do
7
+ attr_writer :updated_at
8
+ attributes :id
9
+ end
10
+
11
+ # Defaults to the downcased model name and updated_at
12
+ def cache_key
13
+ ActiveSupport::Cache.expand_cache_key([
14
+ self.class.model_name.name.downcase,
15
+ "#{id}-#{updated_at.strftime('%Y%m%d%H%M%S%9N')}"
16
+ ].compact)
17
+ end
18
+
19
+ # Defaults to the time the serializer file was modified.
20
+ def updated_at
21
+ defined?(@updated_at) ? @updated_at : File.mtime(__FILE__)
22
+ end
23
+ end
24
+ end
25
+ end
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.9
4
+ version: 0.10.12
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: 2019-02-08 00:00:00.000000000 Z
11
+ date: 2020-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '4.1'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '6'
22
+ version: '6.2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '4.1'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '6'
32
+ version: '6.2'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: actionpack
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: '4.1'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '6'
42
+ version: '6.2'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ dependencies:
49
49
  version: '4.1'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '6'
52
+ version: '6.2'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: railties
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -59,7 +59,7 @@ dependencies:
59
59
  version: '4.1'
60
60
  - - "<"
61
61
  - !ruby/object:Gem::Version
62
- version: '6'
62
+ version: '6.2'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
@@ -69,7 +69,7 @@ dependencies:
69
69
  version: '4.1'
70
70
  - - "<"
71
71
  - !ruby/object:Gem::Version
72
- version: '6'
72
+ version: '6.2'
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: minitest
75
75
  requirement: !ruby/object:Gem::Requirement
@@ -133,7 +133,7 @@ dependencies:
133
133
  version: '4.1'
134
134
  - - "<"
135
135
  - !ruby/object:Gem::Version
136
- version: '6'
136
+ version: '6.2'
137
137
  type: :development
138
138
  prerelease: false
139
139
  version_requirements: !ruby/object:Gem::Requirement
@@ -143,7 +143,7 @@ dependencies:
143
143
  version: '4.1'
144
144
  - - "<"
145
145
  - !ruby/object:Gem::Version
146
- version: '6'
146
+ version: '6.2'
147
147
  - !ruby/object:Gem::Dependency
148
148
  name: kaminari
149
149
  requirement: !ruby/object:Gem::Requirement
@@ -182,28 +182,28 @@ dependencies:
182
182
  name: bundler
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - "~>"
185
+ - - ">="
186
186
  - !ruby/object:Gem::Version
187
- version: '1.6'
187
+ version: '0'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - "~>"
192
+ - - ">="
193
193
  - !ruby/object:Gem::Version
194
- version: '1.6'
194
+ version: '0'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: simplecov
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - "~>"
199
+ - - ">="
200
200
  - !ruby/object:Gem::Version
201
201
  version: '0.11'
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - "~>"
206
+ - - ">="
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0.11'
209
209
  - !ruby/object:Gem::Dependency
@@ -263,7 +263,7 @@ dependencies:
263
263
  version: '10.0'
264
264
  - - "<"
265
265
  - !ruby/object:Gem::Version
266
- version: '12.0'
266
+ version: '13.0'
267
267
  type: :development
268
268
  prerelease: false
269
269
  version_requirements: !ruby/object:Gem::Requirement
@@ -273,7 +273,7 @@ dependencies:
273
273
  version: '10.0'
274
274
  - - "<"
275
275
  - !ruby/object:Gem::Version
276
- version: '12.0'
276
+ version: '13.0'
277
277
  description: ActiveModel::Serializers allows you to generate your JSON in an object-oriented
278
278
  and convention-driven manner.
279
279
  email:
@@ -282,55 +282,9 @@ executables: []
282
282
  extensions: []
283
283
  extra_rdoc_files: []
284
284
  files:
285
- - ".github/ISSUE_TEMPLATE.md"
286
- - ".github/PULL_REQUEST_TEMPLATE.md"
287
- - ".gitignore"
288
- - ".rubocop.yml"
289
- - ".simplecov"
290
- - ".travis.yml"
291
285
  - CHANGELOG.md
292
- - CODE_OF_CONDUCT.md
293
- - CONTRIBUTING.md
294
- - Gemfile
295
286
  - MIT-LICENSE
296
287
  - README.md
297
- - Rakefile
298
- - active_model_serializers.gemspec
299
- - appveyor.yml
300
- - bin/bench
301
- - bin/bench_regression
302
- - bin/rubocop
303
- - bin/serve_benchmark
304
- - docs/README.md
305
- - docs/STYLE.md
306
- - docs/general/adapters.md
307
- - docs/general/caching.md
308
- - docs/general/configuration_options.md
309
- - docs/general/deserialization.md
310
- - docs/general/fields.md
311
- - docs/general/getting_started.md
312
- - docs/general/instrumentation.md
313
- - docs/general/key_transforms.md
314
- - docs/general/logging.md
315
- - docs/general/rendering.md
316
- - docs/general/serializers.md
317
- - docs/how-open-source-maintained.jpg
318
- - docs/howto/add_pagination_links.md
319
- - docs/howto/add_relationship_links.md
320
- - docs/howto/add_root_key.md
321
- - docs/howto/grape_integration.md
322
- - docs/howto/outside_controller_use.md
323
- - docs/howto/passing_arbitrary_options.md
324
- - docs/howto/serialize_poro.md
325
- - docs/howto/test.md
326
- - docs/howto/upgrade_from_0_8_to_0_10.md
327
- - docs/integrations/ember-and-json-api.md
328
- - docs/integrations/grape.md
329
- - docs/jsonapi/errors.md
330
- - docs/jsonapi/schema.md
331
- - docs/jsonapi/schema/schema.json
332
- - docs/rfcs/0000-namespace.md
333
- - docs/rfcs/template.md
334
288
  - lib/action_controller/serialization.rb
335
289
  - lib/active_model/serializable_resource.rb
336
290
  - lib/active_model/serializer.rb
@@ -380,6 +334,7 @@ files:
380
334
  - lib/active_model_serializers/logging.rb
381
335
  - lib/active_model_serializers/lookup_chain.rb
382
336
  - lib/active_model_serializers/model.rb
337
+ - lib/active_model_serializers/model/caching.rb
383
338
  - lib/active_model_serializers/railtie.rb
384
339
  - lib/active_model_serializers/register_jsonapi_renderer.rb
385
340
  - lib/active_model_serializers/serializable_resource.rb
@@ -395,111 +350,11 @@ files:
395
350
  - lib/grape/formatters/active_model_serializers.rb
396
351
  - lib/grape/helpers/active_model_serializers.rb
397
352
  - lib/tasks/rubocop.rake
398
- - test/action_controller/adapter_selector_test.rb
399
- - test/action_controller/explicit_serializer_test.rb
400
- - test/action_controller/json/include_test.rb
401
- - test/action_controller/json_api/deserialization_test.rb
402
- - test/action_controller/json_api/errors_test.rb
403
- - test/action_controller/json_api/fields_test.rb
404
- - test/action_controller/json_api/linked_test.rb
405
- - test/action_controller/json_api/pagination_test.rb
406
- - test/action_controller/json_api/transform_test.rb
407
- - test/action_controller/lookup_proc_test.rb
408
- - test/action_controller/namespace_lookup_test.rb
409
- - test/action_controller/serialization_scope_name_test.rb
410
- - test/action_controller/serialization_test.rb
411
- - test/active_model_serializers/adapter_for_test.rb
412
- - test/active_model_serializers/json_pointer_test.rb
413
- - test/active_model_serializers/logging_test.rb
414
- - test/active_model_serializers/model_test.rb
415
- - test/active_model_serializers/railtie_test_isolated.rb
416
- - test/active_model_serializers/register_jsonapi_renderer_test_isolated.rb
417
- - test/active_model_serializers/serialization_context_test_isolated.rb
418
- - test/active_model_serializers/test/schema_test.rb
419
- - test/active_model_serializers/test/serializer_test.rb
420
- - test/active_record_test.rb
421
- - test/adapter/attributes_test.rb
422
- - test/adapter/deprecation_test.rb
423
- - test/adapter/json/belongs_to_test.rb
424
- - test/adapter/json/collection_test.rb
425
- - test/adapter/json/has_many_test.rb
426
- - test/adapter/json/transform_test.rb
427
- - test/adapter/json_api/belongs_to_test.rb
428
- - test/adapter/json_api/collection_test.rb
429
- - test/adapter/json_api/errors_test.rb
430
- - test/adapter/json_api/fields_test.rb
431
- - test/adapter/json_api/has_many_explicit_serializer_test.rb
432
- - test/adapter/json_api/has_many_test.rb
433
- - test/adapter/json_api/has_one_test.rb
434
- - test/adapter/json_api/include_data_if_sideloaded_test.rb
435
- - test/adapter/json_api/json_api_test.rb
436
- - test/adapter/json_api/linked_test.rb
437
- - test/adapter/json_api/links_test.rb
438
- - test/adapter/json_api/pagination_links_test.rb
439
- - test/adapter/json_api/parse_test.rb
440
- - test/adapter/json_api/relationship_test.rb
441
- - test/adapter/json_api/resource_meta_test.rb
442
- - test/adapter/json_api/toplevel_jsonapi_test.rb
443
- - test/adapter/json_api/transform_test.rb
444
- - test/adapter/json_api/type_test.rb
445
- - test/adapter/json_test.rb
446
- - test/adapter/null_test.rb
447
- - test/adapter/polymorphic_test.rb
448
- - test/adapter_test.rb
449
- - test/array_serializer_test.rb
450
- - test/benchmark/app.rb
451
- - test/benchmark/benchmarking_support.rb
452
- - test/benchmark/bm_active_record.rb
453
- - test/benchmark/bm_adapter.rb
454
- - test/benchmark/bm_caching.rb
455
- - test/benchmark/bm_lookup_chain.rb
456
- - test/benchmark/bm_transform.rb
457
- - test/benchmark/config.ru
458
- - test/benchmark/controllers.rb
459
- - test/benchmark/fixtures.rb
460
- - test/cache_test.rb
461
- - test/collection_serializer_test.rb
462
- - test/fixtures/active_record.rb
463
- - test/fixtures/poro.rb
464
- - test/generators/scaffold_controller_generator_test.rb
465
- - test/generators/serializer_generator_test.rb
466
- - test/grape_test.rb
467
- - test/lint_test.rb
468
- - test/logger_test.rb
469
- - test/poro_test.rb
470
- - test/serializable_resource_test.rb
471
- - test/serializers/association_macros_test.rb
472
- - test/serializers/associations_test.rb
473
- - test/serializers/attribute_test.rb
474
- - test/serializers/attributes_test.rb
475
- - test/serializers/caching_configuration_test_isolated.rb
476
- - test/serializers/configuration_test.rb
477
- - test/serializers/fieldset_test.rb
478
- - test/serializers/meta_test.rb
479
- - test/serializers/options_test.rb
480
- - test/serializers/read_attribute_for_serialization_test.rb
481
- - test/serializers/reflection_test.rb
482
- - test/serializers/root_test.rb
483
- - test/serializers/serialization_test.rb
484
- - test/serializers/serializer_for_test.rb
485
- - test/serializers/serializer_for_with_namespace_test.rb
486
- - test/support/custom_schemas/active_model_serializers/test/schema_test/my/index.json
487
- - test/support/isolated_unit.rb
488
- - test/support/rails5_shims.rb
489
- - test/support/rails_app.rb
490
- - test/support/schemas/active_model_serializers/test/schema_test/my/index.json
491
- - test/support/schemas/active_model_serializers/test/schema_test/my/show.json
492
- - test/support/schemas/custom/show.json
493
- - test/support/schemas/hyper_schema.json
494
- - test/support/schemas/render_using_json_api.json
495
- - test/support/schemas/simple_json_pointers.json
496
- - test/support/serialization_testing.rb
497
- - test/test_helper.rb
498
353
  homepage: https://github.com/rails-api/active_model_serializers
499
354
  licenses:
500
355
  - MIT
501
356
  metadata: {}
502
- post_install_message:
357
+ post_install_message:
503
358
  rdoc_options: []
504
359
  require_paths:
505
360
  - lib
@@ -514,109 +369,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
514
369
  - !ruby/object:Gem::Version
515
370
  version: '0'
516
371
  requirements: []
517
- rubyforge_project:
518
- rubygems_version: 2.7.6
519
- signing_key:
372
+ rubygems_version: 3.1.4
373
+ signing_key:
520
374
  specification_version: 4
521
375
  summary: Conventions-based JSON generation for Rails.
522
- test_files:
523
- - test/action_controller/adapter_selector_test.rb
524
- - test/action_controller/explicit_serializer_test.rb
525
- - test/action_controller/json/include_test.rb
526
- - test/action_controller/json_api/deserialization_test.rb
527
- - test/action_controller/json_api/errors_test.rb
528
- - test/action_controller/json_api/fields_test.rb
529
- - test/action_controller/json_api/linked_test.rb
530
- - test/action_controller/json_api/pagination_test.rb
531
- - test/action_controller/json_api/transform_test.rb
532
- - test/action_controller/lookup_proc_test.rb
533
- - test/action_controller/namespace_lookup_test.rb
534
- - test/action_controller/serialization_scope_name_test.rb
535
- - test/action_controller/serialization_test.rb
536
- - test/active_model_serializers/adapter_for_test.rb
537
- - test/active_model_serializers/json_pointer_test.rb
538
- - test/active_model_serializers/logging_test.rb
539
- - test/active_model_serializers/model_test.rb
540
- - test/active_model_serializers/railtie_test_isolated.rb
541
- - test/active_model_serializers/register_jsonapi_renderer_test_isolated.rb
542
- - test/active_model_serializers/serialization_context_test_isolated.rb
543
- - test/active_model_serializers/test/schema_test.rb
544
- - test/active_model_serializers/test/serializer_test.rb
545
- - test/active_record_test.rb
546
- - test/adapter/attributes_test.rb
547
- - test/adapter/deprecation_test.rb
548
- - test/adapter/json/belongs_to_test.rb
549
- - test/adapter/json/collection_test.rb
550
- - test/adapter/json/has_many_test.rb
551
- - test/adapter/json/transform_test.rb
552
- - test/adapter/json_api/belongs_to_test.rb
553
- - test/adapter/json_api/collection_test.rb
554
- - test/adapter/json_api/errors_test.rb
555
- - test/adapter/json_api/fields_test.rb
556
- - test/adapter/json_api/has_many_explicit_serializer_test.rb
557
- - test/adapter/json_api/has_many_test.rb
558
- - test/adapter/json_api/has_one_test.rb
559
- - test/adapter/json_api/include_data_if_sideloaded_test.rb
560
- - test/adapter/json_api/json_api_test.rb
561
- - test/adapter/json_api/linked_test.rb
562
- - test/adapter/json_api/links_test.rb
563
- - test/adapter/json_api/pagination_links_test.rb
564
- - test/adapter/json_api/parse_test.rb
565
- - test/adapter/json_api/relationship_test.rb
566
- - test/adapter/json_api/resource_meta_test.rb
567
- - test/adapter/json_api/toplevel_jsonapi_test.rb
568
- - test/adapter/json_api/transform_test.rb
569
- - test/adapter/json_api/type_test.rb
570
- - test/adapter/json_test.rb
571
- - test/adapter/null_test.rb
572
- - test/adapter/polymorphic_test.rb
573
- - test/adapter_test.rb
574
- - test/array_serializer_test.rb
575
- - test/benchmark/app.rb
576
- - test/benchmark/benchmarking_support.rb
577
- - test/benchmark/bm_active_record.rb
578
- - test/benchmark/bm_adapter.rb
579
- - test/benchmark/bm_caching.rb
580
- - test/benchmark/bm_lookup_chain.rb
581
- - test/benchmark/bm_transform.rb
582
- - test/benchmark/config.ru
583
- - test/benchmark/controllers.rb
584
- - test/benchmark/fixtures.rb
585
- - test/cache_test.rb
586
- - test/collection_serializer_test.rb
587
- - test/fixtures/active_record.rb
588
- - test/fixtures/poro.rb
589
- - test/generators/scaffold_controller_generator_test.rb
590
- - test/generators/serializer_generator_test.rb
591
- - test/grape_test.rb
592
- - test/lint_test.rb
593
- - test/logger_test.rb
594
- - test/poro_test.rb
595
- - test/serializable_resource_test.rb
596
- - test/serializers/association_macros_test.rb
597
- - test/serializers/associations_test.rb
598
- - test/serializers/attribute_test.rb
599
- - test/serializers/attributes_test.rb
600
- - test/serializers/caching_configuration_test_isolated.rb
601
- - test/serializers/configuration_test.rb
602
- - test/serializers/fieldset_test.rb
603
- - test/serializers/meta_test.rb
604
- - test/serializers/options_test.rb
605
- - test/serializers/read_attribute_for_serialization_test.rb
606
- - test/serializers/reflection_test.rb
607
- - test/serializers/root_test.rb
608
- - test/serializers/serialization_test.rb
609
- - test/serializers/serializer_for_test.rb
610
- - test/serializers/serializer_for_with_namespace_test.rb
611
- - test/support/custom_schemas/active_model_serializers/test/schema_test/my/index.json
612
- - test/support/isolated_unit.rb
613
- - test/support/rails5_shims.rb
614
- - test/support/rails_app.rb
615
- - test/support/schemas/active_model_serializers/test/schema_test/my/index.json
616
- - test/support/schemas/active_model_serializers/test/schema_test/my/show.json
617
- - test/support/schemas/custom/show.json
618
- - test/support/schemas/hyper_schema.json
619
- - test/support/schemas/render_using_json_api.json
620
- - test/support/schemas/simple_json_pointers.json
621
- - test/support/serialization_testing.rb
622
- - test/test_helper.rb
376
+ test_files: []