active_model_serializers 0.8.3 → 0.10.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/ISSUE_TEMPLATE.md +29 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +15 -0
- data/.gitignore +17 -0
- data/.rubocop.yml +105 -0
- data/.simplecov +110 -0
- data/.travis.yml +50 -24
- data/CHANGELOG.md +650 -6
- data/CODE_OF_CONDUCT.md +74 -0
- data/CONTRIBUTING.md +105 -0
- data/Gemfile +69 -1
- data/{MIT-LICENSE.txt → MIT-LICENSE} +3 -2
- data/README.md +195 -545
- data/Rakefile +64 -8
- data/active_model_serializers.gemspec +62 -23
- data/appveyor.yml +28 -0
- data/bin/bench +171 -0
- data/bin/bench_regression +316 -0
- data/bin/rubocop +38 -0
- data/bin/serve_benchmark +39 -0
- data/docs/README.md +41 -0
- data/docs/STYLE.md +58 -0
- data/docs/general/adapters.md +269 -0
- data/docs/general/caching.md +58 -0
- data/docs/general/configuration_options.md +185 -0
- data/docs/general/deserialization.md +100 -0
- data/docs/general/fields.md +31 -0
- data/docs/general/getting_started.md +133 -0
- data/docs/general/instrumentation.md +40 -0
- data/docs/general/key_transforms.md +40 -0
- data/docs/general/logging.md +21 -0
- data/docs/general/rendering.md +293 -0
- data/docs/general/serializers.md +495 -0
- data/docs/how-open-source-maintained.jpg +0 -0
- data/docs/howto/add_pagination_links.md +138 -0
- data/docs/howto/add_relationship_links.md +140 -0
- data/docs/howto/add_root_key.md +62 -0
- data/docs/howto/grape_integration.md +42 -0
- data/docs/howto/outside_controller_use.md +66 -0
- data/docs/howto/passing_arbitrary_options.md +27 -0
- data/docs/howto/serialize_poro.md +73 -0
- data/docs/howto/test.md +154 -0
- data/docs/howto/upgrade_from_0_8_to_0_10.md +265 -0
- data/docs/integrations/ember-and-json-api.md +147 -0
- data/docs/integrations/grape.md +19 -0
- data/docs/jsonapi/errors.md +56 -0
- data/docs/jsonapi/schema/schema.json +366 -0
- data/docs/jsonapi/schema.md +151 -0
- data/docs/rfcs/0000-namespace.md +106 -0
- data/docs/rfcs/template.md +15 -0
- data/lib/action_controller/serialization.rb +43 -38
- data/lib/active_model/serializable_resource.rb +11 -0
- data/lib/active_model/serializer/adapter/attributes.rb +15 -0
- data/lib/active_model/serializer/adapter/base.rb +18 -0
- data/lib/active_model/serializer/adapter/json.rb +15 -0
- data/lib/active_model/serializer/adapter/json_api.rb +15 -0
- data/lib/active_model/serializer/adapter/null.rb +15 -0
- data/lib/active_model/serializer/adapter.rb +24 -0
- data/lib/active_model/serializer/array_serializer.rb +12 -0
- data/lib/active_model/serializer/association.rb +71 -0
- data/lib/active_model/serializer/attribute.rb +25 -0
- data/lib/active_model/serializer/belongs_to_reflection.rb +11 -0
- data/lib/active_model/serializer/collection_serializer.rb +88 -0
- data/lib/active_model/serializer/concerns/caching.rb +300 -0
- data/lib/active_model/serializer/error_serializer.rb +14 -0
- data/lib/active_model/serializer/errors_serializer.rb +32 -0
- data/lib/active_model/serializer/field.rb +90 -0
- data/lib/active_model/serializer/fieldset.rb +31 -0
- data/lib/active_model/serializer/has_many_reflection.rb +10 -0
- data/lib/active_model/serializer/has_one_reflection.rb +7 -0
- data/lib/active_model/serializer/lazy_association.rb +96 -0
- data/lib/active_model/serializer/link.rb +21 -0
- data/lib/active_model/serializer/lint.rb +150 -0
- data/lib/active_model/serializer/null.rb +17 -0
- data/lib/active_model/serializer/reflection.rb +210 -0
- data/lib/active_model/{serializers → serializer}/version.rb +1 -1
- data/lib/active_model/serializer.rb +343 -442
- data/lib/active_model_serializers/adapter/attributes.rb +13 -0
- data/lib/active_model_serializers/adapter/base.rb +83 -0
- data/lib/active_model_serializers/adapter/json.rb +21 -0
- data/lib/active_model_serializers/adapter/json_api/deserialization.rb +213 -0
- data/lib/active_model_serializers/adapter/json_api/error.rb +96 -0
- data/lib/active_model_serializers/adapter/json_api/jsonapi.rb +49 -0
- data/lib/active_model_serializers/adapter/json_api/link.rb +83 -0
- data/lib/active_model_serializers/adapter/json_api/meta.rb +37 -0
- data/lib/active_model_serializers/adapter/json_api/pagination_links.rb +88 -0
- data/lib/active_model_serializers/adapter/json_api/relationship.rb +104 -0
- data/lib/active_model_serializers/adapter/json_api/resource_identifier.rb +66 -0
- data/lib/active_model_serializers/adapter/json_api.rb +533 -0
- data/lib/active_model_serializers/adapter/null.rb +9 -0
- data/lib/active_model_serializers/adapter.rb +98 -0
- data/lib/active_model_serializers/callbacks.rb +55 -0
- data/lib/active_model_serializers/deprecate.rb +54 -0
- data/lib/active_model_serializers/deserialization.rb +15 -0
- data/lib/active_model_serializers/json_pointer.rb +14 -0
- data/lib/active_model_serializers/logging.rb +122 -0
- data/lib/active_model_serializers/lookup_chain.rb +80 -0
- data/lib/active_model_serializers/model.rb +130 -0
- data/lib/active_model_serializers/railtie.rb +50 -0
- data/lib/active_model_serializers/register_jsonapi_renderer.rb +78 -0
- data/lib/active_model_serializers/serializable_resource.rb +82 -0
- data/lib/active_model_serializers/serialization_context.rb +39 -0
- data/lib/active_model_serializers/test/schema.rb +138 -0
- data/lib/active_model_serializers/test/serializer.rb +125 -0
- data/lib/active_model_serializers/test.rb +7 -0
- data/lib/active_model_serializers.rb +47 -81
- data/lib/generators/rails/USAGE +6 -0
- data/lib/generators/rails/resource_override.rb +10 -0
- data/lib/generators/rails/serializer_generator.rb +36 -0
- data/lib/generators/rails/templates/serializer.rb.erb +8 -0
- data/lib/grape/active_model_serializers.rb +16 -0
- data/lib/grape/formatters/active_model_serializers.rb +32 -0
- data/lib/grape/helpers/active_model_serializers.rb +17 -0
- data/lib/tasks/rubocop.rake +53 -0
- data/test/action_controller/adapter_selector_test.rb +62 -0
- data/test/action_controller/explicit_serializer_test.rb +135 -0
- data/test/action_controller/json/include_test.rb +246 -0
- data/test/action_controller/json_api/deserialization_test.rb +112 -0
- data/test/action_controller/json_api/errors_test.rb +40 -0
- data/test/action_controller/json_api/fields_test.rb +66 -0
- data/test/action_controller/json_api/linked_test.rb +202 -0
- data/test/action_controller/json_api/pagination_test.rb +124 -0
- data/test/action_controller/json_api/transform_test.rb +189 -0
- 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 +235 -0
- data/test/action_controller/serialization_test.rb +478 -0
- data/test/active_model_serializers/adapter_for_test.rb +208 -0
- data/test/active_model_serializers/json_pointer_test.rb +22 -0
- data/test/active_model_serializers/logging_test.rb +77 -0
- data/test/active_model_serializers/model_test.rb +142 -0
- data/test/active_model_serializers/railtie_test_isolated.rb +68 -0
- data/test/active_model_serializers/register_jsonapi_renderer_test_isolated.rb +161 -0
- data/test/active_model_serializers/serialization_context_test_isolated.rb +71 -0
- data/test/active_model_serializers/test/schema_test.rb +131 -0
- data/test/active_model_serializers/test/serializer_test.rb +62 -0
- data/test/active_record_test.rb +9 -0
- data/test/adapter/attributes_test.rb +40 -0
- data/test/adapter/deprecation_test.rb +100 -0
- data/test/adapter/json/belongs_to_test.rb +45 -0
- data/test/adapter/json/collection_test.rb +104 -0
- data/test/adapter/json/has_many_test.rb +53 -0
- data/test/adapter/json/transform_test.rb +93 -0
- data/test/adapter/json_api/belongs_to_test.rb +155 -0
- data/test/adapter/json_api/collection_test.rb +96 -0
- data/test/adapter/json_api/errors_test.rb +76 -0
- data/test/adapter/json_api/fields_test.rb +96 -0
- data/test/adapter/json_api/has_many_explicit_serializer_test.rb +96 -0
- data/test/adapter/json_api/has_many_test.rb +173 -0
- data/test/adapter/json_api/has_one_test.rb +80 -0
- data/test/adapter/json_api/include_data_if_sideloaded_test.rb +213 -0
- data/test/adapter/json_api/json_api_test.rb +33 -0
- data/test/adapter/json_api/linked_test.rb +413 -0
- data/test/adapter/json_api/links_test.rb +110 -0
- data/test/adapter/json_api/pagination_links_test.rb +206 -0
- data/test/adapter/json_api/parse_test.rb +137 -0
- data/test/adapter/json_api/relationship_test.rb +397 -0
- data/test/adapter/json_api/resource_meta_test.rb +100 -0
- data/test/adapter/json_api/toplevel_jsonapi_test.rb +82 -0
- data/test/adapter/json_api/transform_test.rb +512 -0
- data/test/adapter/json_api/type_test.rb +193 -0
- data/test/adapter/json_test.rb +46 -0
- data/test/adapter/null_test.rb +22 -0
- data/test/adapter/polymorphic_test.rb +218 -0
- data/test/adapter_test.rb +67 -0
- data/test/array_serializer_test.rb +20 -73
- data/test/benchmark/app.rb +65 -0
- data/test/benchmark/benchmarking_support.rb +67 -0
- data/test/benchmark/bm_active_record.rb +81 -0
- data/test/benchmark/bm_adapter.rb +38 -0
- data/test/benchmark/bm_caching.rb +119 -0
- data/test/benchmark/bm_lookup_chain.rb +83 -0
- data/test/benchmark/bm_transform.rb +45 -0
- data/test/benchmark/config.ru +3 -0
- data/test/benchmark/controllers.rb +83 -0
- data/test/benchmark/fixtures.rb +219 -0
- data/test/cache_test.rb +651 -0
- data/test/collection_serializer_test.rb +127 -0
- data/test/fixtures/active_record.rb +113 -0
- data/test/fixtures/poro.rb +225 -0
- data/test/generators/scaffold_controller_generator_test.rb +24 -0
- data/test/generators/serializer_generator_test.rb +75 -0
- data/test/grape_test.rb +196 -0
- data/test/lint_test.rb +49 -0
- data/test/logger_test.rb +20 -0
- data/test/poro_test.rb +9 -0
- data/test/serializable_resource_test.rb +79 -0
- data/test/serializers/association_macros_test.rb +37 -0
- data/test/serializers/associations_test.rb +518 -0
- data/test/serializers/attribute_test.rb +153 -0
- data/test/serializers/attributes_test.rb +52 -0
- data/test/serializers/caching_configuration_test_isolated.rb +170 -0
- data/test/serializers/configuration_test.rb +32 -0
- data/test/serializers/fieldset_test.rb +14 -0
- data/test/serializers/meta_test.rb +202 -0
- data/test/serializers/options_test.rb +32 -0
- data/test/serializers/read_attribute_for_serialization_test.rb +79 -0
- data/test/serializers/reflection_test.rb +479 -0
- data/test/serializers/root_test.rb +21 -0
- data/test/serializers/serialization_test.rb +55 -0
- data/test/serializers/serializer_for_test.rb +136 -0
- data/test/serializers/serializer_for_with_namespace_test.rb +88 -0
- data/test/support/custom_schemas/active_model_serializers/test/schema_test/my/index.json +6 -0
- data/test/support/isolated_unit.rb +84 -0
- data/test/support/rails5_shims.rb +53 -0
- data/test/support/rails_app.rb +38 -0
- data/test/support/schemas/active_model_serializers/test/schema_test/my/index.json +6 -0
- data/test/support/schemas/active_model_serializers/test/schema_test/my/show.json +6 -0
- data/test/support/schemas/custom/show.json +7 -0
- data/test/support/schemas/hyper_schema.json +93 -0
- data/test/support/schemas/render_using_json_api.json +43 -0
- data/test/support/schemas/simple_json_pointers.json +10 -0
- data/test/support/serialization_testing.rb +79 -0
- data/test/test_helper.rb +59 -21
- metadata +529 -43
- data/DESIGN.textile +0 -586
- data/Gemfile.edge +0 -9
- data/bench/perf.rb +0 -43
- data/cruft.md +0 -19
- data/lib/active_model/array_serializer.rb +0 -104
- data/lib/active_model/serializer/associations.rb +0 -233
- data/lib/active_record/serializer_override.rb +0 -16
- data/lib/generators/resource_override.rb +0 -13
- data/lib/generators/serializer/USAGE +0 -9
- data/lib/generators/serializer/serializer_generator.rb +0 -42
- data/lib/generators/serializer/templates/serializer.rb +0 -19
- data/test/association_test.rb +0 -592
- data/test/caching_test.rb +0 -96
- data/test/generators_test.rb +0 -85
- data/test/no_serialization_scope_test.rb +0 -34
- data/test/serialization_scope_name_test.rb +0 -67
- data/test/serialization_test.rb +0 -392
- data/test/serializer_support_test.rb +0 -51
- data/test/serializer_test.rb +0 -1465
- data/test/test_fakes.rb +0 -217
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_model_serializers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8
|
4
|
+
version: 0.10.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
- Yehuda Katz
|
7
|
+
- Steve Klabnik
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2018-11-01 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: activemodel
|
@@ -17,44 +16,232 @@ dependencies:
|
|
17
16
|
requirements:
|
18
17
|
- - ">="
|
19
18
|
- !ruby/object:Gem::Version
|
20
|
-
version: '
|
19
|
+
version: '4.1'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '6'
|
21
23
|
type: :runtime
|
22
24
|
prerelease: false
|
23
25
|
version_requirements: !ruby/object:Gem::Requirement
|
24
26
|
requirements:
|
25
27
|
- - ">="
|
26
28
|
- !ruby/object:Gem::Version
|
27
|
-
version: '
|
29
|
+
version: '4.1'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '6'
|
28
33
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
34
|
+
name: actionpack
|
30
35
|
requirement: !ruby/object:Gem::Requirement
|
31
36
|
requirements:
|
32
37
|
- - ">="
|
33
38
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
39
|
+
version: '4.1'
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '6'
|
43
|
+
type: :runtime
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '4.1'
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '6'
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: railties
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '4.1'
|
60
|
+
- - "<"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '6'
|
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'
|
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'
|
103
|
+
type: :runtime
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 0.1.1.beta1
|
110
|
+
- - "<"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0.3'
|
113
|
+
- !ruby/object:Gem::Dependency
|
114
|
+
name: case_transform
|
115
|
+
requirement: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0.2'
|
120
|
+
type: :runtime
|
121
|
+
prerelease: false
|
122
|
+
version_requirements: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0.2'
|
127
|
+
- !ruby/object:Gem::Dependency
|
128
|
+
name: activerecord
|
129
|
+
requirement: !ruby/object:Gem::Requirement
|
130
|
+
requirements:
|
131
|
+
- - ">="
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '4.1'
|
134
|
+
- - "<"
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '6'
|
137
|
+
type: :development
|
138
|
+
prerelease: false
|
139
|
+
version_requirements: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - ">="
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '4.1'
|
144
|
+
- - "<"
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '6'
|
147
|
+
- !ruby/object:Gem::Dependency
|
148
|
+
name: kaminari
|
149
|
+
requirement: !ruby/object:Gem::Requirement
|
150
|
+
requirements:
|
151
|
+
- - "~>"
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: 0.16.3
|
35
154
|
type: :development
|
36
155
|
prerelease: false
|
37
156
|
version_requirements: !ruby/object:Gem::Requirement
|
38
157
|
requirements:
|
158
|
+
- - "~>"
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: 0.16.3
|
161
|
+
- !ruby/object:Gem::Dependency
|
162
|
+
name: will_paginate
|
163
|
+
requirement: !ruby/object:Gem::Requirement
|
164
|
+
requirements:
|
165
|
+
- - "~>"
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '3.0'
|
39
168
|
- - ">="
|
169
|
+
- !ruby/object:Gem::Version
|
170
|
+
version: 3.0.7
|
171
|
+
type: :development
|
172
|
+
prerelease: false
|
173
|
+
version_requirements: !ruby/object:Gem::Requirement
|
174
|
+
requirements:
|
175
|
+
- - "~>"
|
40
176
|
- !ruby/object:Gem::Version
|
41
177
|
version: '3.0'
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: 3.0.7
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: bundler
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "~>"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '1.6'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '1.6'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: simplecov
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - "~>"
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0.11'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - "~>"
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0.11'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: timecop
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - "~>"
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0.7'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - "~>"
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0.7'
|
42
223
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
224
|
+
name: grape
|
44
225
|
requirement: !ruby/object:Gem::Requirement
|
45
226
|
requirements:
|
46
227
|
- - ">="
|
47
228
|
- !ruby/object:Gem::Version
|
48
|
-
version: '0'
|
229
|
+
version: '0.13'
|
230
|
+
- - "<"
|
231
|
+
- !ruby/object:Gem::Version
|
232
|
+
version: 0.19.1
|
49
233
|
type: :development
|
50
234
|
prerelease: false
|
51
235
|
version_requirements: !ruby/object:Gem::Requirement
|
52
236
|
requirements:
|
53
237
|
- - ">="
|
54
238
|
- !ruby/object:Gem::Version
|
55
|
-
version: '0'
|
239
|
+
version: '0.13'
|
240
|
+
- - "<"
|
241
|
+
- !ruby/object:Gem::Version
|
242
|
+
version: 0.19.1
|
56
243
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
244
|
+
name: json_schema
|
58
245
|
requirement: !ruby/object:Gem::Requirement
|
59
246
|
requirements:
|
60
247
|
- - ">="
|
@@ -67,50 +254,250 @@ dependencies:
|
|
67
254
|
- - ">="
|
68
255
|
- !ruby/object:Gem::Version
|
69
256
|
version: '0'
|
70
|
-
|
257
|
+
- !ruby/object:Gem::Dependency
|
258
|
+
name: rake
|
259
|
+
requirement: !ruby/object:Gem::Requirement
|
260
|
+
requirements:
|
261
|
+
- - ">="
|
262
|
+
- !ruby/object:Gem::Version
|
263
|
+
version: '10.0'
|
264
|
+
- - "<"
|
265
|
+
- !ruby/object:Gem::Version
|
266
|
+
version: '12.0'
|
267
|
+
type: :development
|
268
|
+
prerelease: false
|
269
|
+
version_requirements: !ruby/object:Gem::Requirement
|
270
|
+
requirements:
|
271
|
+
- - ">="
|
272
|
+
- !ruby/object:Gem::Version
|
273
|
+
version: '10.0'
|
274
|
+
- - "<"
|
275
|
+
- !ruby/object:Gem::Version
|
276
|
+
version: '12.0'
|
277
|
+
description: ActiveModel::Serializers allows you to generate your JSON in an object-oriented
|
278
|
+
and convention-driven manner.
|
71
279
|
email:
|
72
|
-
-
|
73
|
-
- wycats@gmail.com
|
280
|
+
- steve@steveklabnik.com
|
74
281
|
executables: []
|
75
282
|
extensions: []
|
76
283
|
extra_rdoc_files: []
|
77
284
|
files:
|
285
|
+
- ".github/ISSUE_TEMPLATE.md"
|
286
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
78
287
|
- ".gitignore"
|
288
|
+
- ".rubocop.yml"
|
289
|
+
- ".simplecov"
|
79
290
|
- ".travis.yml"
|
80
291
|
- CHANGELOG.md
|
81
|
-
-
|
292
|
+
- CODE_OF_CONDUCT.md
|
293
|
+
- CONTRIBUTING.md
|
82
294
|
- Gemfile
|
83
|
-
-
|
84
|
-
- MIT-LICENSE.txt
|
295
|
+
- MIT-LICENSE
|
85
296
|
- README.md
|
86
297
|
- Rakefile
|
87
298
|
- active_model_serializers.gemspec
|
88
|
-
-
|
89
|
-
-
|
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
|
90
334
|
- lib/action_controller/serialization.rb
|
91
|
-
- lib/active_model/
|
335
|
+
- lib/active_model/serializable_resource.rb
|
92
336
|
- lib/active_model/serializer.rb
|
93
|
-
- lib/active_model/serializer/
|
94
|
-
- lib/active_model/
|
337
|
+
- lib/active_model/serializer/adapter.rb
|
338
|
+
- lib/active_model/serializer/adapter/attributes.rb
|
339
|
+
- lib/active_model/serializer/adapter/base.rb
|
340
|
+
- lib/active_model/serializer/adapter/json.rb
|
341
|
+
- lib/active_model/serializer/adapter/json_api.rb
|
342
|
+
- lib/active_model/serializer/adapter/null.rb
|
343
|
+
- lib/active_model/serializer/array_serializer.rb
|
344
|
+
- lib/active_model/serializer/association.rb
|
345
|
+
- lib/active_model/serializer/attribute.rb
|
346
|
+
- lib/active_model/serializer/belongs_to_reflection.rb
|
347
|
+
- lib/active_model/serializer/collection_serializer.rb
|
348
|
+
- lib/active_model/serializer/concerns/caching.rb
|
349
|
+
- lib/active_model/serializer/error_serializer.rb
|
350
|
+
- lib/active_model/serializer/errors_serializer.rb
|
351
|
+
- lib/active_model/serializer/field.rb
|
352
|
+
- lib/active_model/serializer/fieldset.rb
|
353
|
+
- lib/active_model/serializer/has_many_reflection.rb
|
354
|
+
- lib/active_model/serializer/has_one_reflection.rb
|
355
|
+
- lib/active_model/serializer/lazy_association.rb
|
356
|
+
- lib/active_model/serializer/link.rb
|
357
|
+
- lib/active_model/serializer/lint.rb
|
358
|
+
- lib/active_model/serializer/null.rb
|
359
|
+
- lib/active_model/serializer/reflection.rb
|
360
|
+
- lib/active_model/serializer/version.rb
|
95
361
|
- lib/active_model_serializers.rb
|
96
|
-
- lib/
|
97
|
-
- lib/
|
98
|
-
- lib/
|
99
|
-
- lib/
|
100
|
-
- lib/
|
362
|
+
- lib/active_model_serializers/adapter.rb
|
363
|
+
- lib/active_model_serializers/adapter/attributes.rb
|
364
|
+
- lib/active_model_serializers/adapter/base.rb
|
365
|
+
- lib/active_model_serializers/adapter/json.rb
|
366
|
+
- lib/active_model_serializers/adapter/json_api.rb
|
367
|
+
- lib/active_model_serializers/adapter/json_api/deserialization.rb
|
368
|
+
- lib/active_model_serializers/adapter/json_api/error.rb
|
369
|
+
- lib/active_model_serializers/adapter/json_api/jsonapi.rb
|
370
|
+
- lib/active_model_serializers/adapter/json_api/link.rb
|
371
|
+
- lib/active_model_serializers/adapter/json_api/meta.rb
|
372
|
+
- lib/active_model_serializers/adapter/json_api/pagination_links.rb
|
373
|
+
- lib/active_model_serializers/adapter/json_api/relationship.rb
|
374
|
+
- lib/active_model_serializers/adapter/json_api/resource_identifier.rb
|
375
|
+
- lib/active_model_serializers/adapter/null.rb
|
376
|
+
- lib/active_model_serializers/callbacks.rb
|
377
|
+
- lib/active_model_serializers/deprecate.rb
|
378
|
+
- lib/active_model_serializers/deserialization.rb
|
379
|
+
- lib/active_model_serializers/json_pointer.rb
|
380
|
+
- lib/active_model_serializers/logging.rb
|
381
|
+
- lib/active_model_serializers/lookup_chain.rb
|
382
|
+
- lib/active_model_serializers/model.rb
|
383
|
+
- lib/active_model_serializers/railtie.rb
|
384
|
+
- lib/active_model_serializers/register_jsonapi_renderer.rb
|
385
|
+
- lib/active_model_serializers/serializable_resource.rb
|
386
|
+
- lib/active_model_serializers/serialization_context.rb
|
387
|
+
- lib/active_model_serializers/test.rb
|
388
|
+
- lib/active_model_serializers/test/schema.rb
|
389
|
+
- lib/active_model_serializers/test/serializer.rb
|
390
|
+
- lib/generators/rails/USAGE
|
391
|
+
- lib/generators/rails/resource_override.rb
|
392
|
+
- lib/generators/rails/serializer_generator.rb
|
393
|
+
- lib/generators/rails/templates/serializer.rb.erb
|
394
|
+
- lib/grape/active_model_serializers.rb
|
395
|
+
- lib/grape/formatters/active_model_serializers.rb
|
396
|
+
- lib/grape/helpers/active_model_serializers.rb
|
397
|
+
- 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
|
101
449
|
- test/array_serializer_test.rb
|
102
|
-
- test/
|
103
|
-
- test/
|
104
|
-
- test/
|
105
|
-
- test/
|
106
|
-
- test/
|
107
|
-
- test/
|
108
|
-
- test/
|
109
|
-
- test/
|
110
|
-
- test/
|
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
|
111
497
|
- test/test_helper.rb
|
112
498
|
homepage: https://github.com/rails-api/active_model_serializers
|
113
|
-
licenses:
|
499
|
+
licenses:
|
500
|
+
- MIT
|
114
501
|
metadata: {}
|
115
502
|
post_install_message:
|
116
503
|
rdoc_options: []
|
@@ -120,7 +507,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
120
507
|
requirements:
|
121
508
|
- - ">="
|
122
509
|
- !ruby/object:Gem::Version
|
123
|
-
version: '
|
510
|
+
version: '2.1'
|
124
511
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
512
|
requirements:
|
126
513
|
- - ">="
|
@@ -128,9 +515,108 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
515
|
version: '0'
|
129
516
|
requirements: []
|
130
517
|
rubyforge_project:
|
131
|
-
rubygems_version: 2.
|
518
|
+
rubygems_version: 2.7.6
|
132
519
|
signing_key:
|
133
520
|
specification_version: 4
|
134
|
-
summary:
|
135
|
-
|
136
|
-
|
521
|
+
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
|