jsonapi-resources 0.4.4 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/README.md +73 -39
- data/lib/jsonapi-resources.rb +2 -1
- data/lib/jsonapi/acts_as_resource_controller.rb +5 -5
- data/lib/jsonapi/configuration.rb +13 -1
- data/lib/jsonapi/error.rb +2 -2
- data/lib/jsonapi/exceptions.rb +32 -20
- data/lib/jsonapi/link_builder.rb +141 -0
- data/lib/jsonapi/operation.rb +34 -34
- data/lib/jsonapi/operation_result.rb +3 -3
- data/lib/jsonapi/operations_processor.rb +7 -7
- data/lib/jsonapi/{association.rb → relationship.rb} +12 -4
- data/lib/jsonapi/request.rb +85 -85
- data/lib/jsonapi/resource.rb +153 -121
- data/lib/jsonapi/resource_serializer.rb +89 -92
- data/lib/jsonapi/resources/version.rb +1 -1
- data/lib/jsonapi/response_document.rb +1 -1
- data/lib/jsonapi/routing_ext.rb +42 -42
- data/test/controllers/controller_test.rb +90 -100
- data/test/fixtures/active_record.rb +38 -5
- data/test/fixtures/author_details.yml +9 -0
- data/test/fixtures/vehicles.yml +10 -2
- data/test/integration/requests/request_test.rb +17 -17
- data/test/integration/routes/routes_test.rb +20 -20
- data/test/test_helper.rb +18 -1
- data/test/unit/jsonapi_request/jsonapi_request_test.rb +1 -1
- data/test/unit/operation/operations_processor_test.rb +21 -21
- data/test/unit/resource/resource_test.rb +13 -13
- data/test/unit/serializer/link_builder_test.rb +183 -0
- data/test/unit/serializer/polymorphic_serializer_test.rb +73 -74
- data/test/unit/serializer/serializer_test.rb +342 -91
- metadata +8 -3
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsonapi-resources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Gebhardt
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-07-
|
12
|
+
date: 2015-07-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -142,7 +142,6 @@ files:
|
|
142
142
|
- lib/jsonapi-resources.rb
|
143
143
|
- lib/jsonapi/active_record_operations_processor.rb
|
144
144
|
- lib/jsonapi/acts_as_resource_controller.rb
|
145
|
-
- lib/jsonapi/association.rb
|
146
145
|
- lib/jsonapi/callbacks.rb
|
147
146
|
- lib/jsonapi/configuration.rb
|
148
147
|
- lib/jsonapi/error.rb
|
@@ -150,12 +149,14 @@ files:
|
|
150
149
|
- lib/jsonapi/exceptions.rb
|
151
150
|
- lib/jsonapi/formatter.rb
|
152
151
|
- lib/jsonapi/include_directives.rb
|
152
|
+
- lib/jsonapi/link_builder.rb
|
153
153
|
- lib/jsonapi/mime_types.rb
|
154
154
|
- lib/jsonapi/operation.rb
|
155
155
|
- lib/jsonapi/operation_result.rb
|
156
156
|
- lib/jsonapi/operation_results.rb
|
157
157
|
- lib/jsonapi/operations_processor.rb
|
158
158
|
- lib/jsonapi/paginator.rb
|
159
|
+
- lib/jsonapi/relationship.rb
|
159
160
|
- lib/jsonapi/request.rb
|
160
161
|
- lib/jsonapi/resource.rb
|
161
162
|
- lib/jsonapi/resource_controller.rb
|
@@ -166,6 +167,7 @@ files:
|
|
166
167
|
- test/config/database.yml
|
167
168
|
- test/controllers/controller_test.rb
|
168
169
|
- test/fixtures/active_record.rb
|
170
|
+
- test/fixtures/author_details.yml
|
169
171
|
- test/fixtures/book_comments.yml
|
170
172
|
- test/fixtures/books.yml
|
171
173
|
- test/fixtures/comments.yml
|
@@ -202,6 +204,7 @@ files:
|
|
202
204
|
- test/unit/pagination/paged_paginator_test.rb
|
203
205
|
- test/unit/resource/resource_test.rb
|
204
206
|
- test/unit/serializer/include_directives_test.rb
|
207
|
+
- test/unit/serializer/link_builder_test.rb
|
205
208
|
- test/unit/serializer/polymorphic_serializer_test.rb
|
206
209
|
- test/unit/serializer/response_document_test.rb
|
207
210
|
- test/unit/serializer/serializer_test.rb
|
@@ -233,6 +236,7 @@ test_files:
|
|
233
236
|
- test/config/database.yml
|
234
237
|
- test/controllers/controller_test.rb
|
235
238
|
- test/fixtures/active_record.rb
|
239
|
+
- test/fixtures/author_details.yml
|
236
240
|
- test/fixtures/book_comments.yml
|
237
241
|
- test/fixtures/books.yml
|
238
242
|
- test/fixtures/comments.yml
|
@@ -269,6 +273,7 @@ test_files:
|
|
269
273
|
- test/unit/pagination/paged_paginator_test.rb
|
270
274
|
- test/unit/resource/resource_test.rb
|
271
275
|
- test/unit/serializer/include_directives_test.rb
|
276
|
+
- test/unit/serializer/link_builder_test.rb
|
272
277
|
- test/unit/serializer/polymorphic_serializer_test.rb
|
273
278
|
- test/unit/serializer/response_document_test.rb
|
274
279
|
- test/unit/serializer/serializer_test.rb
|