sanger-jsonapi-resources 0.1.4 → 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 -42
- 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 +81 -30
- 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,24 +41,38 @@ 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
|
|
|
41
|
-
resource @resource_type,
|
|
42
|
-
|
|
49
|
+
resource @resource_type, options do
|
|
50
|
+
# :nocov:
|
|
51
|
+
if @scope.respond_to? :[]=
|
|
52
|
+
# Rails 4
|
|
53
|
+
@scope[:jsonapi_resource] = @resource_type
|
|
54
|
+
|
|
43
55
|
if block_given?
|
|
44
56
|
yield
|
|
45
57
|
else
|
|
46
58
|
jsonapi_relationships
|
|
47
59
|
end
|
|
60
|
+
else
|
|
61
|
+
# Rails 5
|
|
62
|
+
jsonapi_resource_scope(SingletonResource.new(@resource_type, api_only?, @scope[:shallow], options), @resource_type) do
|
|
63
|
+
if block_given?
|
|
64
|
+
yield
|
|
65
|
+
else
|
|
66
|
+
jsonapi_relationships
|
|
67
|
+
end
|
|
68
|
+
end
|
|
48
69
|
end
|
|
70
|
+
# :nocov:
|
|
49
71
|
end
|
|
50
72
|
end
|
|
51
73
|
|
|
52
74
|
def jsonapi_relationships(options = {})
|
|
53
|
-
res = JSONAPI::Resource.
|
|
75
|
+
res = JSONAPI::Resource.resource_klass_for(resource_type_with_module_prefix(@resource_type))
|
|
54
76
|
res._relationships.each do |relationship_name, relationship|
|
|
55
77
|
if relationship.is_a?(JSONAPI::Relationship::ToMany)
|
|
56
78
|
jsonapi_links(relationship_name, options)
|
|
@@ -64,7 +86,13 @@ module ActionDispatch
|
|
|
64
86
|
|
|
65
87
|
def jsonapi_resources(*resources, &_block)
|
|
66
88
|
@resource_type = resources.first
|
|
67
|
-
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
|
|
68
96
|
|
|
69
97
|
options = resources.extract_options!.dup
|
|
70
98
|
options[:controller] ||= @resource_type
|
|
@@ -88,19 +116,32 @@ module ActionDispatch
|
|
|
88
116
|
end
|
|
89
117
|
|
|
90
118
|
if res._immutable
|
|
91
|
-
options[:except] << :create
|
|
92
|
-
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')
|
|
93
121
|
options[:except] << :destroy unless options[:except].include?(:destroy) || options[:except].include?('destroy')
|
|
94
122
|
end
|
|
95
123
|
|
|
96
|
-
resources @resource_type,
|
|
97
|
-
|
|
124
|
+
resources @resource_type, options do
|
|
125
|
+
# :nocov:
|
|
126
|
+
if @scope.respond_to? :[]=
|
|
127
|
+
# Rails 4
|
|
128
|
+
@scope[:jsonapi_resource] = @resource_type
|
|
98
129
|
if block_given?
|
|
99
130
|
yield
|
|
100
131
|
else
|
|
101
132
|
jsonapi_relationships
|
|
102
133
|
end
|
|
134
|
+
else
|
|
135
|
+
# Rails 5
|
|
136
|
+
jsonapi_resource_scope(Resource.new(@resource_type, api_only?, @scope[:shallow], options), @resource_type) do
|
|
137
|
+
if block_given?
|
|
138
|
+
yield
|
|
139
|
+
else
|
|
140
|
+
jsonapi_relationships
|
|
141
|
+
end
|
|
142
|
+
end
|
|
103
143
|
end
|
|
144
|
+
# :nocov:
|
|
104
145
|
end
|
|
105
146
|
end
|
|
106
147
|
|
|
@@ -120,25 +161,26 @@ module ActionDispatch
|
|
|
120
161
|
formatted_relationship_name = format_route(link_type)
|
|
121
162
|
options = links.extract_options!.dup
|
|
122
163
|
|
|
123
|
-
res = JSONAPI::Resource.
|
|
164
|
+
res = JSONAPI::Resource.resource_klass_for(resource_type_with_module_prefix)
|
|
124
165
|
options[:controller] ||= res._type.to_s
|
|
125
166
|
|
|
126
167
|
methods = links_methods(options)
|
|
127
168
|
|
|
128
169
|
if methods.include?(:show)
|
|
129
170
|
match "relationships/#{formatted_relationship_name}", controller: options[:controller],
|
|
130
|
-
|
|
171
|
+
action: 'show_relationship', relationship: link_type.to_s, via: [:get],
|
|
172
|
+
as: "relationships/#{link_type}"
|
|
131
173
|
end
|
|
132
174
|
|
|
133
175
|
if res.mutable?
|
|
134
176
|
if methods.include?(:update)
|
|
135
177
|
match "relationships/#{formatted_relationship_name}", controller: options[:controller],
|
|
136
|
-
|
|
178
|
+
action: 'update_relationship', relationship: link_type.to_s, via: [:put, :patch]
|
|
137
179
|
end
|
|
138
180
|
|
|
139
181
|
if methods.include?(:destroy)
|
|
140
182
|
match "relationships/#{formatted_relationship_name}", controller: options[:controller],
|
|
141
|
-
|
|
183
|
+
action: 'destroy_relationship', relationship: link_type.to_s, via: [:delete]
|
|
142
184
|
end
|
|
143
185
|
end
|
|
144
186
|
end
|
|
@@ -148,69 +190,77 @@ module ActionDispatch
|
|
|
148
190
|
formatted_relationship_name = format_route(link_type)
|
|
149
191
|
options = links.extract_options!.dup
|
|
150
192
|
|
|
151
|
-
res = JSONAPI::Resource.
|
|
193
|
+
res = JSONAPI::Resource.resource_klass_for(resource_type_with_module_prefix)
|
|
152
194
|
options[:controller] ||= res._type.to_s
|
|
153
195
|
|
|
154
196
|
methods = links_methods(options)
|
|
155
197
|
|
|
156
198
|
if methods.include?(:show)
|
|
157
199
|
match "relationships/#{formatted_relationship_name}", controller: options[:controller],
|
|
158
|
-
|
|
200
|
+
action: 'show_relationship', relationship: link_type.to_s, via: [:get],
|
|
201
|
+
as: "relationships/#{link_type}"
|
|
159
202
|
end
|
|
160
203
|
|
|
161
204
|
if res.mutable?
|
|
162
205
|
if methods.include?(:create)
|
|
163
206
|
match "relationships/#{formatted_relationship_name}", controller: options[:controller],
|
|
164
|
-
|
|
207
|
+
action: 'create_relationship', relationship: link_type.to_s, via: [:post]
|
|
165
208
|
end
|
|
166
209
|
|
|
167
210
|
if methods.include?(:update)
|
|
168
211
|
match "relationships/#{formatted_relationship_name}", controller: options[:controller],
|
|
169
|
-
|
|
212
|
+
action: 'update_relationship', relationship: link_type.to_s, via: [:put, :patch]
|
|
170
213
|
end
|
|
171
214
|
|
|
172
215
|
if methods.include?(:destroy)
|
|
173
216
|
match "relationships/#{formatted_relationship_name}", controller: options[:controller],
|
|
174
|
-
|
|
217
|
+
action: 'destroy_relationship', relationship: link_type.to_s, via: [:delete]
|
|
175
218
|
end
|
|
176
219
|
end
|
|
177
220
|
end
|
|
178
221
|
|
|
179
222
|
def jsonapi_related_resource(*relationship)
|
|
180
|
-
source = JSONAPI::Resource.
|
|
223
|
+
source = JSONAPI::Resource.resource_klass_for(resource_type_with_module_prefix)
|
|
181
224
|
options = relationship.extract_options!.dup
|
|
182
225
|
|
|
183
226
|
relationship_name = relationship.first
|
|
184
227
|
relationship = source._relationships[relationship_name]
|
|
185
228
|
|
|
229
|
+
relationship._routed = true
|
|
230
|
+
|
|
186
231
|
formatted_relationship_name = format_route(relationship.name)
|
|
187
232
|
|
|
188
233
|
if relationship.polymorphic?
|
|
189
234
|
options[:controller] ||= relationship.class_name.underscore.pluralize
|
|
190
235
|
else
|
|
191
|
-
related_resource = JSONAPI::Resource.
|
|
236
|
+
related_resource = JSONAPI::Resource.resource_klass_for(resource_type_with_module_prefix(relationship.class_name.underscore.pluralize))
|
|
192
237
|
options[:controller] ||= related_resource._type.to_s
|
|
193
238
|
end
|
|
194
239
|
|
|
195
|
-
match
|
|
196
|
-
|
|
197
|
-
|
|
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}"
|
|
198
244
|
end
|
|
199
245
|
|
|
200
246
|
def jsonapi_related_resources(*relationship)
|
|
201
|
-
source = JSONAPI::Resource.
|
|
247
|
+
source = JSONAPI::Resource.resource_klass_for(resource_type_with_module_prefix)
|
|
202
248
|
options = relationship.extract_options!.dup
|
|
203
249
|
|
|
204
250
|
relationship_name = relationship.first
|
|
205
251
|
relationship = source._relationships[relationship_name]
|
|
206
252
|
|
|
253
|
+
relationship._routed = true
|
|
254
|
+
|
|
207
255
|
formatted_relationship_name = format_route(relationship.name)
|
|
208
|
-
related_resource = JSONAPI::Resource.
|
|
256
|
+
related_resource = JSONAPI::Resource.resource_klass_for(resource_type_with_module_prefix(relationship.class_name.underscore))
|
|
209
257
|
options[:controller] ||= related_resource._type.to_s
|
|
210
258
|
|
|
211
|
-
match
|
|
212
|
-
|
|
213
|
-
|
|
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}"
|
|
214
264
|
end
|
|
215
265
|
|
|
216
266
|
protected
|
|
@@ -223,6 +273,7 @@ module ActionDispatch
|
|
|
223
273
|
@scope = @scope.parent
|
|
224
274
|
end
|
|
225
275
|
# :nocov:
|
|
276
|
+
|
|
226
277
|
private
|
|
227
278
|
|
|
228
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: '9.0'
|
|
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: '9.0'
|
|
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: '9.0'
|
|
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: '9.0'
|
|
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: []
|