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