deep_unrest 0.1.52 → 0.1.53
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/deep_unrest/read.rb +4 -2
- data/lib/deep_unrest/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc233f787b4e6ca3f10280e1135c157365fd935e591c1a8299cb0a9a467be212
|
4
|
+
data.tar.gz: 688e7d5d6154737fd0d98bf38284b64e0146023da377174efce8cde1794f695b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f57d7014f8fe2b1241fe0580b573578c68737c9bb48f1e4e6733909bd702cd3e78beafa18703a0b4d60c9d1c2a0948abf50c1b01499a6094e3e05c6321767fb
|
7
|
+
data.tar.gz: c7cbdcad79344872fc986f0ea893ce62234eee398a6b9447ea15ba14e0dbe013d5e951f839bbe494cfbc6615a459c8295c63b534ed5f73eb953590e30b110d0d
|
data/lib/deep_unrest/read.rb
CHANGED
@@ -114,12 +114,14 @@ module DeepUnrest
|
|
114
114
|
r_metaclass = class << resource; self; end
|
115
115
|
r_metaclass.send(:alias_method, :records_original, :records)
|
116
116
|
# TODO: find a way to do this that doesn't blow out the original :records method
|
117
|
-
r_metaclass.
|
117
|
+
r_metaclass.define_singleton_method(:records) { |ctx|
|
118
|
+
item[:scope].merge(records_original(ctx))
|
119
|
+
}
|
118
120
|
|
119
121
|
# transform sort value casing for rails
|
120
122
|
sort_criteria = query[:sort]&.map { |s| s.clone.merge(field: s[:field].underscore) }
|
121
123
|
|
122
|
-
processor = JSONAPI::Processor.new(
|
124
|
+
processor = JSONAPI::Processor.new(resource,
|
123
125
|
:find,
|
124
126
|
filters: query[:filter] || {},
|
125
127
|
sort_criteria: sort_criteria,
|
data/lib/deep_unrest/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deep_unrest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.53
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lynn Hurley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11
|
11
|
+
date: 2019-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -172,8 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
172
|
- !ruby/object:Gem::Version
|
173
173
|
version: '0'
|
174
174
|
requirements: []
|
175
|
-
|
176
|
-
rubygems_version: 2.7.3
|
175
|
+
rubygems_version: 3.0.3
|
177
176
|
signing_key:
|
178
177
|
specification_version: 4
|
179
178
|
summary: Update multiple or deeply nested JSONAPI resources
|