deep_unrest 0.1.49 → 0.1.50
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 +5 -0
- data/lib/deep_unrest/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97407994fc42e7c7bce4ba6c99f90b293a612ef53ad521dd641076e20b73c74d
|
4
|
+
data.tar.gz: 86f8c59daea5bf4f6b5bbd24635bc0c35683fb256fd6030df55c2b7efb363123
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af2cbe3c9a14be48536ced9014aff929f5add1e535a9553b4bf20f3ddde2078b851d77772d9f9b5e86a1702ea59a30ab0436463662426e36a750f2aa8c370b93
|
7
|
+
data.tar.gz: 799d0e1d06b90cafbbce66460b5d8f1a73fea46ec172e4c467150d970e679e1d39e15794edc3a7976c59b0fbb2b37f107dc286c166b5413ddb44a9d9993f7e28
|
data/lib/deep_unrest/read.rb
CHANGED
@@ -108,6 +108,8 @@ module DeepUnrest
|
|
108
108
|
|
109
109
|
# monkey patch the resource to only show authorized records
|
110
110
|
r_metaclass = class << resource; self; end
|
111
|
+
r_metaclass.send(:alias_method, :records_original, :records)
|
112
|
+
# TODO: find a way to do this that doesn't blow out the original :records method
|
111
113
|
r_metaclass.send(:define_method, :records) { |_ctx| item[:scope] }
|
112
114
|
|
113
115
|
# transform sort value casing for rails
|
@@ -121,6 +123,9 @@ module DeepUnrest
|
|
121
123
|
|
122
124
|
jsonapi_result = processor.process
|
123
125
|
|
126
|
+
# un-monkey patch the resource :records method
|
127
|
+
r_metaclass.send(:alias_method, :records_original, :records)
|
128
|
+
|
124
129
|
meta << {
|
125
130
|
addr: [*addr, item[:key], 'meta'],
|
126
131
|
serialized_result: {
|
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.50
|
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
|
+
date: 2019-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|