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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9f6aa0030171474c99726d5cde0c78550c6a22b0d56ca435bd03e4384627868
4
- data.tar.gz: 2c02e8088b4c8caef247f1952d99deeacb08933038dcd1d9482eaa39b3b2f6c3
3
+ metadata.gz: dc233f787b4e6ca3f10280e1135c157365fd935e591c1a8299cb0a9a467be212
4
+ data.tar.gz: 688e7d5d6154737fd0d98bf38284b64e0146023da377174efce8cde1794f695b
5
5
  SHA512:
6
- metadata.gz: 82eacaadc3b6051b9219dcd6153bf2dc393cde4d11f5aa5ce520dae40b92ba11a3545e696f29d01a48005e372963f182bfd8ef1981967c2d6f6a00d5d29ac87e
7
- data.tar.gz: 0a7b1f194ea17e963a6731b5d4961b1f7c5b5f262d4f3411db4478c71d849ce4017b3cdff0592dea6a79898b088b745e629976f00a3e3bc9b4f43af8bcf60cc0
6
+ metadata.gz: 1f57d7014f8fe2b1241fe0580b573578c68737c9bb48f1e4e6733909bd702cd3e78beafa18703a0b4d60c9d1c2a0948abf50c1b01499a6094e3e05c6321767fb
7
+ data.tar.gz: c7cbdcad79344872fc986f0ea893ce62234eee398a6b9447ea15ba14e0dbe013d5e951f839bbe494cfbc6615a459c8295c63b534ed5f73eb953590e30b110d0d
@@ -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.send(:define_method, :records) { |_ctx| item[:scope] }
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(item[:resource],
124
+ processor = JSONAPI::Processor.new(resource,
123
125
  :find,
124
126
  filters: query[:filter] || {},
125
127
  sort_criteria: sort_criteria,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeepUnrest
4
- VERSION = '0.1.52'
4
+ VERSION = '0.1.53'
5
5
  end
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.52
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-22 00:00:00.000000000 Z
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
- rubyforge_project:
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