sanger-jsonapi-resources 0.1.3 → 0.2.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/LICENSE.txt +1 -1
- data/README.md +26 -44
- data/lib/bug_report_templates/rails_5_latest.rb +125 -0
- data/lib/bug_report_templates/rails_5_master.rb +140 -0
- data/lib/jsonapi/active_relation/adapters/join_left_active_record_adapter.rb +26 -0
- data/lib/jsonapi/active_relation/join_manager.rb +297 -0
- data/lib/jsonapi/active_relation_resource.rb +898 -0
- data/lib/jsonapi/acts_as_resource_controller.rb +130 -113
- data/lib/jsonapi/basic_resource.rb +1164 -0
- data/lib/jsonapi/cached_response_fragment.rb +129 -0
- data/lib/jsonapi/callbacks.rb +2 -0
- data/lib/jsonapi/compatibility_helper.rb +29 -0
- data/lib/jsonapi/compiled_json.rb +13 -1
- data/lib/jsonapi/configuration.rb +88 -21
- data/lib/jsonapi/error.rb +24 -10
- data/lib/jsonapi/error_codes.rb +4 -0
- data/lib/jsonapi/exceptions.rb +84 -52
- data/lib/jsonapi/formatter.rb +5 -3
- data/lib/jsonapi/include_directives.rb +22 -67
- data/lib/jsonapi/link_builder.rb +76 -80
- data/lib/jsonapi/mime_types.rb +6 -10
- data/lib/jsonapi/naive_cache.rb +2 -0
- data/lib/jsonapi/operation.rb +18 -5
- data/lib/jsonapi/operation_result.rb +76 -16
- data/lib/jsonapi/paginator.rb +2 -0
- data/lib/jsonapi/path.rb +45 -0
- data/lib/jsonapi/path_segment.rb +78 -0
- data/lib/jsonapi/processor.rb +193 -115
- data/lib/jsonapi/relationship.rb +145 -14
- data/lib/jsonapi/request.rb +734 -0
- data/lib/jsonapi/resource.rb +3 -1251
- data/lib/jsonapi/resource_controller.rb +2 -0
- data/lib/jsonapi/resource_controller_metal.rb +7 -1
- data/lib/jsonapi/resource_fragment.rb +56 -0
- data/lib/jsonapi/resource_identity.rb +44 -0
- data/lib/jsonapi/resource_serializer.rb +158 -284
- data/lib/jsonapi/resource_set.rb +196 -0
- data/lib/jsonapi/resource_tree.rb +236 -0
- data/lib/jsonapi/resources/railtie.rb +9 -0
- data/lib/jsonapi/resources/version.rb +1 -1
- data/lib/jsonapi/response_document.rb +107 -83
- data/lib/jsonapi/routing_ext.rb +50 -26
- data/lib/jsonapi-resources.rb +23 -5
- data/lib/tasks/check_upgrade.rake +52 -0
- metadata +43 -82
- data/lib/jsonapi/cached_resource_fragment.rb +0 -127
- data/lib/jsonapi/operation_dispatcher.rb +0 -88
- data/lib/jsonapi/operation_results.rb +0 -35
- data/lib/jsonapi/relationship_builder.rb +0 -167
- data/lib/jsonapi/request_parser.rb +0 -679
data/lib/jsonapi/routing_ext.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module ActionDispatch
|
|
2
4
|
module Routing
|
|
3
5
|
class Mapper
|
|
@@ -18,7 +20,13 @@ module ActionDispatch
|
|
|
18
20
|
|
|
19
21
|
def jsonapi_resource(*resources, &_block)
|
|
20
22
|
@resource_type = resources.first
|
|
21
|
-
res = JSONAPI::Resource.
|
|
23
|
+
res = JSONAPI::Resource.resource_klass_for(resource_type_with_module_prefix(@resource_type))
|
|
24
|
+
|
|
25
|
+
res._routed = true
|
|
26
|
+
|
|
27
|
+
unless res.singleton?
|
|
28
|
+
warn "Singleton routes created for non singleton resource #{res}. Links may not be generated correctly."
|
|
29
|
+
end
|
|
22
30
|
|
|
23
31
|
options = resources.extract_options!.dup
|
|
24
32
|
options[:controller] ||= @resource_type
|
|
@@ -33,8 +41,8 @@ module ActionDispatch
|
|
|
33
41
|
end
|
|
34
42
|
|
|
35
43
|
if res._immutable
|
|
36
|
-
options[:except] << :create
|
|
37
|
-
options[:except] << :update
|
|
44
|
+
options[:except] << :create unless options[:except].include?(:create) || options[:except].include?('create')
|
|
45
|
+
options[:except] << :update unless options[:except].include?(:update) || options[:except].include?('update')
|
|
38
46
|
options[:except] << :destroy unless options[:except].include?(:destroy) || options[:except].include?('destroy')
|
|
39
47
|
end
|
|
40
48
|
|
|
@@ -64,7 +72,7 @@ module ActionDispatch
|
|
|
64
72
|
end
|
|
65
73
|
|
|
66
74
|
def jsonapi_relationships(options = {})
|
|
67
|
-
res = JSONAPI::Resource.
|
|
75
|
+
res = JSONAPI::Resource.resource_klass_for(resource_type_with_module_prefix(@resource_type))
|
|
68
76
|
res._relationships.each do |relationship_name, relationship|
|
|
69
77
|
if relationship.is_a?(JSONAPI::Relationship::ToMany)
|
|
70
78
|
jsonapi_links(relationship_name, options)
|
|
@@ -78,7 +86,13 @@ module ActionDispatch
|
|
|
78
86
|
|
|
79
87
|
def jsonapi_resources(*resources, &_block)
|
|
80
88
|
@resource_type = resources.first
|
|
81
|
-
res = JSONAPI::Resource.
|
|
89
|
+
res = JSONAPI::Resource.resource_klass_for(resource_type_with_module_prefix(@resource_type))
|
|
90
|
+
|
|
91
|
+
res._routed = true
|
|
92
|
+
|
|
93
|
+
if res.singleton?
|
|
94
|
+
warn "Singleton resource #{res} should use `jsonapi_resource` instead."
|
|
95
|
+
end
|
|
82
96
|
|
|
83
97
|
options = resources.extract_options!.dup
|
|
84
98
|
options[:controller] ||= @resource_type
|
|
@@ -102,8 +116,8 @@ module ActionDispatch
|
|
|
102
116
|
end
|
|
103
117
|
|
|
104
118
|
if res._immutable
|
|
105
|
-
options[:except] << :create
|
|
106
|
-
options[:except] << :update
|
|
119
|
+
options[:except] << :create unless options[:except].include?(:create) || options[:except].include?('create')
|
|
120
|
+
options[:except] << :update unless options[:except].include?(:update) || options[:except].include?('update')
|
|
107
121
|
options[:except] << :destroy unless options[:except].include?(:destroy) || options[:except].include?('destroy')
|
|
108
122
|
end
|
|
109
123
|
|
|
@@ -147,25 +161,26 @@ module ActionDispatch
|
|
|
147
161
|
formatted_relationship_name = format_route(link_type)
|
|
148
162
|
options = links.extract_options!.dup
|
|
149
163
|
|
|
150
|
-
res = JSONAPI::Resource.
|
|
164
|
+
res = JSONAPI::Resource.resource_klass_for(resource_type_with_module_prefix)
|
|
151
165
|
options[:controller] ||= res._type.to_s
|
|
152
166
|
|
|
153
167
|
methods = links_methods(options)
|
|
154
168
|
|
|
155
169
|
if methods.include?(:show)
|
|
156
170
|
match "relationships/#{formatted_relationship_name}", controller: options[:controller],
|
|
157
|
-
|
|
171
|
+
action: 'show_relationship', relationship: link_type.to_s, via: [:get],
|
|
172
|
+
as: "relationships/#{link_type}"
|
|
158
173
|
end
|
|
159
174
|
|
|
160
175
|
if res.mutable?
|
|
161
176
|
if methods.include?(:update)
|
|
162
177
|
match "relationships/#{formatted_relationship_name}", controller: options[:controller],
|
|
163
|
-
|
|
178
|
+
action: 'update_relationship', relationship: link_type.to_s, via: [:put, :patch]
|
|
164
179
|
end
|
|
165
180
|
|
|
166
181
|
if methods.include?(:destroy)
|
|
167
182
|
match "relationships/#{formatted_relationship_name}", controller: options[:controller],
|
|
168
|
-
|
|
183
|
+
action: 'destroy_relationship', relationship: link_type.to_s, via: [:delete]
|
|
169
184
|
end
|
|
170
185
|
end
|
|
171
186
|
end
|
|
@@ -175,69 +190,77 @@ module ActionDispatch
|
|
|
175
190
|
formatted_relationship_name = format_route(link_type)
|
|
176
191
|
options = links.extract_options!.dup
|
|
177
192
|
|
|
178
|
-
res = JSONAPI::Resource.
|
|
193
|
+
res = JSONAPI::Resource.resource_klass_for(resource_type_with_module_prefix)
|
|
179
194
|
options[:controller] ||= res._type.to_s
|
|
180
195
|
|
|
181
196
|
methods = links_methods(options)
|
|
182
197
|
|
|
183
198
|
if methods.include?(:show)
|
|
184
199
|
match "relationships/#{formatted_relationship_name}", controller: options[:controller],
|
|
185
|
-
|
|
200
|
+
action: 'show_relationship', relationship: link_type.to_s, via: [:get],
|
|
201
|
+
as: "relationships/#{link_type}"
|
|
186
202
|
end
|
|
187
203
|
|
|
188
204
|
if res.mutable?
|
|
189
205
|
if methods.include?(:create)
|
|
190
206
|
match "relationships/#{formatted_relationship_name}", controller: options[:controller],
|
|
191
|
-
|
|
207
|
+
action: 'create_relationship', relationship: link_type.to_s, via: [:post]
|
|
192
208
|
end
|
|
193
209
|
|
|
194
210
|
if methods.include?(:update)
|
|
195
211
|
match "relationships/#{formatted_relationship_name}", controller: options[:controller],
|
|
196
|
-
|
|
212
|
+
action: 'update_relationship', relationship: link_type.to_s, via: [:put, :patch]
|
|
197
213
|
end
|
|
198
214
|
|
|
199
215
|
if methods.include?(:destroy)
|
|
200
216
|
match "relationships/#{formatted_relationship_name}", controller: options[:controller],
|
|
201
|
-
|
|
217
|
+
action: 'destroy_relationship', relationship: link_type.to_s, via: [:delete]
|
|
202
218
|
end
|
|
203
219
|
end
|
|
204
220
|
end
|
|
205
221
|
|
|
206
222
|
def jsonapi_related_resource(*relationship)
|
|
207
|
-
source = JSONAPI::Resource.
|
|
223
|
+
source = JSONAPI::Resource.resource_klass_for(resource_type_with_module_prefix)
|
|
208
224
|
options = relationship.extract_options!.dup
|
|
209
225
|
|
|
210
226
|
relationship_name = relationship.first
|
|
211
227
|
relationship = source._relationships[relationship_name]
|
|
212
228
|
|
|
229
|
+
relationship._routed = true
|
|
230
|
+
|
|
213
231
|
formatted_relationship_name = format_route(relationship.name)
|
|
214
232
|
|
|
215
233
|
if relationship.polymorphic?
|
|
216
234
|
options[:controller] ||= relationship.class_name.underscore.pluralize
|
|
217
235
|
else
|
|
218
|
-
related_resource = JSONAPI::Resource.
|
|
236
|
+
related_resource = JSONAPI::Resource.resource_klass_for(resource_type_with_module_prefix(relationship.class_name.underscore.pluralize))
|
|
219
237
|
options[:controller] ||= related_resource._type.to_s
|
|
220
238
|
end
|
|
221
239
|
|
|
222
|
-
match
|
|
223
|
-
|
|
224
|
-
|
|
240
|
+
match formatted_relationship_name, controller: options[:controller],
|
|
241
|
+
relationship: relationship.name, source: resource_type_with_module_prefix(source._type),
|
|
242
|
+
action: 'show_related_resource', via: [:get],
|
|
243
|
+
as: "related/#{relationship_name}"
|
|
225
244
|
end
|
|
226
245
|
|
|
227
246
|
def jsonapi_related_resources(*relationship)
|
|
228
|
-
source = JSONAPI::Resource.
|
|
247
|
+
source = JSONAPI::Resource.resource_klass_for(resource_type_with_module_prefix)
|
|
229
248
|
options = relationship.extract_options!.dup
|
|
230
249
|
|
|
231
250
|
relationship_name = relationship.first
|
|
232
251
|
relationship = source._relationships[relationship_name]
|
|
233
252
|
|
|
253
|
+
relationship._routed = true
|
|
254
|
+
|
|
234
255
|
formatted_relationship_name = format_route(relationship.name)
|
|
235
|
-
related_resource = JSONAPI::Resource.
|
|
256
|
+
related_resource = JSONAPI::Resource.resource_klass_for(resource_type_with_module_prefix(relationship.class_name.underscore))
|
|
236
257
|
options[:controller] ||= related_resource._type.to_s
|
|
237
258
|
|
|
238
|
-
match
|
|
239
|
-
|
|
240
|
-
|
|
259
|
+
match formatted_relationship_name,
|
|
260
|
+
controller: options[:controller],
|
|
261
|
+
relationship: relationship.name, source: resource_type_with_module_prefix(source._type),
|
|
262
|
+
action: 'index_related_resources', via: [:get],
|
|
263
|
+
as: "related/#{relationship_name}"
|
|
241
264
|
end
|
|
242
265
|
|
|
243
266
|
protected
|
|
@@ -250,6 +273,7 @@ module ActionDispatch
|
|
|
250
273
|
@scope = @scope.parent
|
|
251
274
|
end
|
|
252
275
|
# :nocov:
|
|
276
|
+
|
|
253
277
|
private
|
|
254
278
|
|
|
255
279
|
def resource_type_with_module_prefix(resource = nil)
|
data/lib/jsonapi-resources.rb
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'jsonapi/resources/railtie'
|
|
1
4
|
require 'jsonapi/naive_cache'
|
|
2
5
|
require 'jsonapi/compiled_json'
|
|
6
|
+
require 'jsonapi/basic_resource'
|
|
7
|
+
require 'jsonapi/active_relation_resource'
|
|
3
8
|
require 'jsonapi/resource'
|
|
4
|
-
require 'jsonapi/
|
|
9
|
+
require 'jsonapi/cached_response_fragment'
|
|
5
10
|
require 'jsonapi/response_document'
|
|
6
11
|
require 'jsonapi/acts_as_resource_controller'
|
|
7
|
-
|
|
12
|
+
if Rails::VERSION::MAJOR >= 6
|
|
13
|
+
ActiveSupport.on_load(:action_controller_base) do
|
|
14
|
+
require 'jsonapi/resource_controller'
|
|
15
|
+
end
|
|
16
|
+
else
|
|
17
|
+
require 'jsonapi/resource_controller'
|
|
18
|
+
end
|
|
8
19
|
require 'jsonapi/resource_controller_metal'
|
|
9
20
|
require 'jsonapi/resources/version'
|
|
10
21
|
require 'jsonapi/configuration'
|
|
@@ -16,12 +27,19 @@ require 'jsonapi/resource_serializer'
|
|
|
16
27
|
require 'jsonapi/exceptions'
|
|
17
28
|
require 'jsonapi/error'
|
|
18
29
|
require 'jsonapi/error_codes'
|
|
19
|
-
require 'jsonapi/
|
|
20
|
-
require 'jsonapi/operation_dispatcher'
|
|
30
|
+
require 'jsonapi/request'
|
|
21
31
|
require 'jsonapi/processor'
|
|
22
32
|
require 'jsonapi/relationship'
|
|
23
33
|
require 'jsonapi/include_directives'
|
|
34
|
+
require 'jsonapi/operation'
|
|
24
35
|
require 'jsonapi/operation_result'
|
|
25
|
-
require 'jsonapi/operation_results'
|
|
26
36
|
require 'jsonapi/callbacks'
|
|
27
37
|
require 'jsonapi/link_builder'
|
|
38
|
+
require 'jsonapi/active_relation/adapters/join_left_active_record_adapter'
|
|
39
|
+
require 'jsonapi/active_relation/join_manager'
|
|
40
|
+
require 'jsonapi/resource_identity'
|
|
41
|
+
require 'jsonapi/resource_fragment'
|
|
42
|
+
require 'jsonapi/resource_tree'
|
|
43
|
+
require 'jsonapi/resource_set'
|
|
44
|
+
require 'jsonapi/path'
|
|
45
|
+
require 'jsonapi/path_segment'
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
require 'rake'
|
|
2
|
+
require 'jsonapi-resources'
|
|
3
|
+
|
|
4
|
+
namespace :jsonapi do
|
|
5
|
+
namespace :resources do
|
|
6
|
+
desc 'Checks application for orphaned overrides'
|
|
7
|
+
task :check_upgrade => :environment do
|
|
8
|
+
Rails.application.eager_load!
|
|
9
|
+
|
|
10
|
+
resource_klasses = ObjectSpace.each_object(Class).select { |klass| klass < JSONAPI::Resource}
|
|
11
|
+
|
|
12
|
+
puts "Checking #{resource_klasses.count} resources"
|
|
13
|
+
|
|
14
|
+
issues_found = 0
|
|
15
|
+
|
|
16
|
+
klasses_with_deprecated = resource_klasses.select { |klass| klass.methods.include?(:find_records) }
|
|
17
|
+
unless klasses_with_deprecated.empty?
|
|
18
|
+
puts " Found the following resources the still implement `find_records`:"
|
|
19
|
+
klasses_with_deprecated.each { |klass| puts " #{klass}"}
|
|
20
|
+
puts " The `find_records` method is no longer called by JR. Please review and ensure your functionality is ported over."
|
|
21
|
+
|
|
22
|
+
issues_found = issues_found + klasses_with_deprecated.length
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
klasses_with_deprecated = resource_klasses.select { |klass| klass.methods.include?(:records_for) }
|
|
26
|
+
unless klasses_with_deprecated.empty?
|
|
27
|
+
puts " Found the following resources the still implement `records_for`:"
|
|
28
|
+
klasses_with_deprecated.each { |klass| puts " #{klass}"}
|
|
29
|
+
puts " The `records_for` method is no longer called by JR. Please review and ensure your functionality is ported over."
|
|
30
|
+
|
|
31
|
+
issues_found = issues_found + klasses_with_deprecated.length
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
klasses_with_deprecated = resource_klasses.select { |klass| klass.methods.include?(:apply_includes) }
|
|
35
|
+
unless klasses_with_deprecated.empty?
|
|
36
|
+
puts " Found the following resources the still implement `apply_includes`:"
|
|
37
|
+
klasses_with_deprecated.each { |klass| puts " #{klass}"}
|
|
38
|
+
puts " The `apply_includes` method is no longer called by JR. Please review and ensure your functionality is ported over."
|
|
39
|
+
|
|
40
|
+
issues_found = issues_found + klasses_with_deprecated.length
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
if issues_found > 0
|
|
44
|
+
puts "Finished inspection. #{issues_found} issues found that may impact upgrading. Please address these issues. "
|
|
45
|
+
else
|
|
46
|
+
puts "Finished inspection with no issues found. Note this is only a cursory check for method overrides that will no \n" \
|
|
47
|
+
"longer be called by JSONAPI::Resources. This check in no way assures your code will continue to function as \n" \
|
|
48
|
+
"it did before the upgrade. Please do adequate testing before using in production."
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sanger-jsonapi-resources
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- PSD Team - Wellcome Trust Sanger Institute
|
|
8
|
+
autorequire:
|
|
8
9
|
bindir: bin
|
|
9
10
|
cert_chain: []
|
|
10
|
-
date:
|
|
11
|
+
date: 2025-06-30 00:00:00.000000000 Z
|
|
11
12
|
dependencies:
|
|
12
13
|
- !ruby/object:Gem::Dependency
|
|
13
14
|
name: bundler
|
|
@@ -15,20 +16,14 @@ dependencies:
|
|
|
15
16
|
requirements:
|
|
16
17
|
- - ">="
|
|
17
18
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: '1.
|
|
19
|
-
- - "<"
|
|
20
|
-
- !ruby/object:Gem::Version
|
|
21
|
-
version: '3.0'
|
|
19
|
+
version: '1.17'
|
|
22
20
|
type: :development
|
|
23
21
|
prerelease: false
|
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
23
|
requirements:
|
|
26
24
|
- - ">="
|
|
27
25
|
- !ruby/object:Gem::Version
|
|
28
|
-
version: '1.
|
|
29
|
-
- - "<"
|
|
30
|
-
- !ruby/object:Gem::Version
|
|
31
|
-
version: '3.0'
|
|
26
|
+
version: '1.17'
|
|
32
27
|
- !ruby/object:Gem::Dependency
|
|
33
28
|
name: rake
|
|
34
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -47,30 +42,22 @@ dependencies:
|
|
|
47
42
|
name: minitest
|
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
|
49
44
|
requirements:
|
|
50
|
-
- - "
|
|
51
|
-
- !ruby/object:Gem::Version
|
|
52
|
-
version: '0'
|
|
53
|
-
type: :development
|
|
54
|
-
prerelease: false
|
|
55
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
56
|
-
requirements:
|
|
57
|
-
- - ">="
|
|
45
|
+
- - "~>"
|
|
58
46
|
- !ruby/object:Gem::Version
|
|
59
|
-
version: '
|
|
60
|
-
-
|
|
61
|
-
name: minitest-mock
|
|
62
|
-
requirement: !ruby/object:Gem::Requirement
|
|
63
|
-
requirements:
|
|
64
|
-
- - ">="
|
|
47
|
+
version: '5.10'
|
|
48
|
+
- - "!="
|
|
65
49
|
- !ruby/object:Gem::Version
|
|
66
|
-
version:
|
|
50
|
+
version: 5.10.2
|
|
67
51
|
type: :development
|
|
68
52
|
prerelease: false
|
|
69
53
|
version_requirements: !ruby/object:Gem::Requirement
|
|
70
54
|
requirements:
|
|
71
|
-
- - "
|
|
55
|
+
- - "~>"
|
|
72
56
|
- !ruby/object:Gem::Version
|
|
73
|
-
version: '
|
|
57
|
+
version: '5.10'
|
|
58
|
+
- - "!="
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: 5.10.2
|
|
74
61
|
- !ruby/object:Gem::Dependency
|
|
75
62
|
name: minitest-spec-rails
|
|
76
63
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -86,7 +73,7 @@ dependencies:
|
|
|
86
73
|
- !ruby/object:Gem::Version
|
|
87
74
|
version: '0'
|
|
88
75
|
- !ruby/object:Gem::Dependency
|
|
89
|
-
name:
|
|
76
|
+
name: simplecov
|
|
90
77
|
requirement: !ruby/object:Gem::Requirement
|
|
91
78
|
requirements:
|
|
92
79
|
- - ">="
|
|
@@ -100,7 +87,7 @@ dependencies:
|
|
|
100
87
|
- !ruby/object:Gem::Version
|
|
101
88
|
version: '0'
|
|
102
89
|
- !ruby/object:Gem::Dependency
|
|
103
|
-
name:
|
|
90
|
+
name: pry
|
|
104
91
|
requirement: !ruby/object:Gem::Requirement
|
|
105
92
|
requirements:
|
|
106
93
|
- - ">="
|
|
@@ -114,7 +101,7 @@ dependencies:
|
|
|
114
101
|
- !ruby/object:Gem::Version
|
|
115
102
|
version: '0'
|
|
116
103
|
- !ruby/object:Gem::Dependency
|
|
117
|
-
name:
|
|
104
|
+
name: concurrent-ruby-ext
|
|
118
105
|
requirement: !ruby/object:Gem::Requirement
|
|
119
106
|
requirements:
|
|
120
107
|
- - ">="
|
|
@@ -128,7 +115,7 @@ dependencies:
|
|
|
128
115
|
- !ruby/object:Gem::Version
|
|
129
116
|
version: '0'
|
|
130
117
|
- !ruby/object:Gem::Dependency
|
|
131
|
-
name:
|
|
118
|
+
name: database_cleaner
|
|
132
119
|
requirement: !ruby/object:Gem::Requirement
|
|
133
120
|
requirements:
|
|
134
121
|
- - ">="
|
|
@@ -147,54 +134,28 @@ dependencies:
|
|
|
147
134
|
requirements:
|
|
148
135
|
- - ">="
|
|
149
136
|
- !ruby/object:Gem::Version
|
|
150
|
-
version: '
|
|
151
|
-
- - "<"
|
|
152
|
-
- !ruby/object:Gem::Version
|
|
153
|
-
version: '8.1'
|
|
137
|
+
version: '5.1'
|
|
154
138
|
type: :runtime
|
|
155
139
|
prerelease: false
|
|
156
140
|
version_requirements: !ruby/object:Gem::Requirement
|
|
157
141
|
requirements:
|
|
158
142
|
- - ">="
|
|
159
143
|
- !ruby/object:Gem::Version
|
|
160
|
-
version: '
|
|
161
|
-
- - "<"
|
|
162
|
-
- !ruby/object:Gem::Version
|
|
163
|
-
version: '8.1'
|
|
144
|
+
version: '5.1'
|
|
164
145
|
- !ruby/object:Gem::Dependency
|
|
165
146
|
name: railties
|
|
166
147
|
requirement: !ruby/object:Gem::Requirement
|
|
167
148
|
requirements:
|
|
168
149
|
- - ">="
|
|
169
150
|
- !ruby/object:Gem::Version
|
|
170
|
-
version: '
|
|
171
|
-
- - "<"
|
|
172
|
-
- !ruby/object:Gem::Version
|
|
173
|
-
version: '8.1'
|
|
151
|
+
version: '5.1'
|
|
174
152
|
type: :runtime
|
|
175
153
|
prerelease: false
|
|
176
154
|
version_requirements: !ruby/object:Gem::Requirement
|
|
177
155
|
requirements:
|
|
178
156
|
- - ">="
|
|
179
157
|
- !ruby/object:Gem::Version
|
|
180
|
-
version: '
|
|
181
|
-
- - "<"
|
|
182
|
-
- !ruby/object:Gem::Version
|
|
183
|
-
version: '8.1'
|
|
184
|
-
- !ruby/object:Gem::Dependency
|
|
185
|
-
name: rack
|
|
186
|
-
requirement: !ruby/object:Gem::Requirement
|
|
187
|
-
requirements:
|
|
188
|
-
- - "~>"
|
|
189
|
-
- !ruby/object:Gem::Version
|
|
190
|
-
version: '3.0'
|
|
191
|
-
type: :runtime
|
|
192
|
-
prerelease: false
|
|
193
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
194
|
-
requirements:
|
|
195
|
-
- - "~>"
|
|
196
|
-
- !ruby/object:Gem::Version
|
|
197
|
-
version: '3.0'
|
|
158
|
+
version: '5.1'
|
|
198
159
|
- !ruby/object:Gem::Dependency
|
|
199
160
|
name: concurrent-ruby
|
|
200
161
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -209,20 +170,6 @@ dependencies:
|
|
|
209
170
|
- - ">="
|
|
210
171
|
- !ruby/object:Gem::Version
|
|
211
172
|
version: '0'
|
|
212
|
-
- !ruby/object:Gem::Dependency
|
|
213
|
-
name: csv
|
|
214
|
-
requirement: !ruby/object:Gem::Requirement
|
|
215
|
-
requirements:
|
|
216
|
-
- - ">="
|
|
217
|
-
- !ruby/object:Gem::Version
|
|
218
|
-
version: '0'
|
|
219
|
-
type: :runtime
|
|
220
|
-
prerelease: false
|
|
221
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
222
|
-
requirements:
|
|
223
|
-
- - ">="
|
|
224
|
-
- !ruby/object:Gem::Version
|
|
225
|
-
version: '0'
|
|
226
173
|
description: Forked from jsonapi-resources. A resource-centric approach to implementing
|
|
227
174
|
the controllers, routes, and serializers needed to support the JSON API spec.
|
|
228
175
|
email:
|
|
@@ -233,15 +180,22 @@ extra_rdoc_files: []
|
|
|
233
180
|
files:
|
|
234
181
|
- LICENSE.txt
|
|
235
182
|
- README.md
|
|
183
|
+
- lib/bug_report_templates/rails_5_latest.rb
|
|
184
|
+
- lib/bug_report_templates/rails_5_master.rb
|
|
236
185
|
- lib/generators/jsonapi/USAGE
|
|
237
186
|
- lib/generators/jsonapi/controller_generator.rb
|
|
238
187
|
- lib/generators/jsonapi/resource_generator.rb
|
|
239
188
|
- lib/generators/jsonapi/templates/jsonapi_controller.rb
|
|
240
189
|
- lib/generators/jsonapi/templates/jsonapi_resource.rb
|
|
241
190
|
- lib/jsonapi-resources.rb
|
|
191
|
+
- lib/jsonapi/active_relation/adapters/join_left_active_record_adapter.rb
|
|
192
|
+
- lib/jsonapi/active_relation/join_manager.rb
|
|
193
|
+
- lib/jsonapi/active_relation_resource.rb
|
|
242
194
|
- lib/jsonapi/acts_as_resource_controller.rb
|
|
243
|
-
- lib/jsonapi/
|
|
195
|
+
- lib/jsonapi/basic_resource.rb
|
|
196
|
+
- lib/jsonapi/cached_response_fragment.rb
|
|
244
197
|
- lib/jsonapi/callbacks.rb
|
|
198
|
+
- lib/jsonapi/compatibility_helper.rb
|
|
245
199
|
- lib/jsonapi/compiled_json.rb
|
|
246
200
|
- lib/jsonapi/configuration.rb
|
|
247
201
|
- lib/jsonapi/error.rb
|
|
@@ -253,26 +207,32 @@ files:
|
|
|
253
207
|
- lib/jsonapi/mime_types.rb
|
|
254
208
|
- lib/jsonapi/naive_cache.rb
|
|
255
209
|
- lib/jsonapi/operation.rb
|
|
256
|
-
- lib/jsonapi/operation_dispatcher.rb
|
|
257
210
|
- lib/jsonapi/operation_result.rb
|
|
258
|
-
- lib/jsonapi/operation_results.rb
|
|
259
211
|
- lib/jsonapi/paginator.rb
|
|
212
|
+
- lib/jsonapi/path.rb
|
|
213
|
+
- lib/jsonapi/path_segment.rb
|
|
260
214
|
- lib/jsonapi/processor.rb
|
|
261
215
|
- lib/jsonapi/relationship.rb
|
|
262
|
-
- lib/jsonapi/
|
|
263
|
-
- lib/jsonapi/request_parser.rb
|
|
216
|
+
- lib/jsonapi/request.rb
|
|
264
217
|
- lib/jsonapi/resource.rb
|
|
265
218
|
- lib/jsonapi/resource_controller.rb
|
|
266
219
|
- lib/jsonapi/resource_controller_metal.rb
|
|
220
|
+
- lib/jsonapi/resource_fragment.rb
|
|
221
|
+
- lib/jsonapi/resource_identity.rb
|
|
267
222
|
- lib/jsonapi/resource_serializer.rb
|
|
223
|
+
- lib/jsonapi/resource_set.rb
|
|
224
|
+
- lib/jsonapi/resource_tree.rb
|
|
225
|
+
- lib/jsonapi/resources/railtie.rb
|
|
268
226
|
- lib/jsonapi/resources/version.rb
|
|
269
227
|
- lib/jsonapi/response_document.rb
|
|
270
228
|
- lib/jsonapi/routing_ext.rb
|
|
271
229
|
- lib/sanger-jsonapi-resources.rb
|
|
230
|
+
- lib/tasks/check_upgrade.rake
|
|
272
231
|
homepage: https://github.com/sanger/jsonapi-resources
|
|
273
232
|
licenses:
|
|
274
233
|
- MIT
|
|
275
234
|
metadata: {}
|
|
235
|
+
post_install_message:
|
|
276
236
|
rdoc_options: []
|
|
277
237
|
require_paths:
|
|
278
238
|
- lib
|
|
@@ -280,14 +240,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
280
240
|
requirements:
|
|
281
241
|
- - ">="
|
|
282
242
|
- !ruby/object:Gem::Version
|
|
283
|
-
version: '3
|
|
243
|
+
version: '2.3'
|
|
284
244
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
285
245
|
requirements:
|
|
286
246
|
- - ">="
|
|
287
247
|
- !ruby/object:Gem::Version
|
|
288
248
|
version: '0'
|
|
289
249
|
requirements: []
|
|
290
|
-
rubygems_version: 3.
|
|
250
|
+
rubygems_version: 3.5.11
|
|
251
|
+
signing_key:
|
|
291
252
|
specification_version: 4
|
|
292
253
|
summary: Easily support JSON API in Rails.
|
|
293
254
|
test_files: []
|