reso_transport 1.5.9 → 1.5.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/reso_transport/client.rb +4 -0
- data/lib/reso_transport/errors.rb +6 -1
- data/lib/reso_transport/query.rb +6 -1
- data/lib/reso_transport/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: 55b3a8f4ed28e5069b20b57cd23aa1fa3a0d43108433908768e2dc9b79b7c1cb
|
4
|
+
data.tar.gz: f06068401c564a7b56cb7f902b8ff563ea7b3436357c969cecde42d6d37bc828
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8aaa33a1d1d5b23a051d09370c7d7bf57c5efd7d07da270c50ded5c056d2c6362d5df0903914918d34a5f3ad6c2ec439a73f71590d07088d137ba8da2a85a8b2
|
7
|
+
data.tar.gz: 05ca83aaca4f6a4f04ae5a32ab69a5a085eb2f330f47449d428428af4b86ac201db3d240b18178dc19d0b8165b0e23ada1924b4827801e0e74c87f4beceafb1a
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
reso_transport (1.5.
|
4
|
+
reso_transport (1.5.13)
|
5
5
|
faraday (~> 1.0.1)
|
6
6
|
|
7
7
|
GEM
|
@@ -22,7 +22,7 @@ PLATFORMS
|
|
22
22
|
|
23
23
|
DEPENDENCIES
|
24
24
|
bundler (~> 2)
|
25
|
-
byebug
|
25
|
+
byebug (~> 11)
|
26
26
|
minitest (~> 5.0)
|
27
27
|
minitest-rg (~> 5.0)
|
28
28
|
rake (~> 13)
|
@@ -62,8 +62,13 @@ module ResoTransport
|
|
62
62
|
end
|
63
63
|
|
64
64
|
class AccessDenied < RequestError
|
65
|
+
def initialize(request, response, resource = nil)
|
66
|
+
@reason = response.reason_phrase
|
67
|
+
super(request, response, resource)
|
68
|
+
end
|
69
|
+
|
65
70
|
def message
|
66
|
-
"Access denied: #{
|
71
|
+
"Access denied: #{@reason}"
|
67
72
|
end
|
68
73
|
end
|
69
74
|
end
|
data/lib/reso_transport/query.rb
CHANGED
@@ -43,6 +43,11 @@ module ResoTransport
|
|
43
43
|
self
|
44
44
|
end
|
45
45
|
|
46
|
+
def page(token)
|
47
|
+
options[:next] = token
|
48
|
+
self
|
49
|
+
end
|
50
|
+
|
46
51
|
def select(*fields)
|
47
52
|
os = options.fetch(:select, '').split(',')
|
48
53
|
options[:select] = (os + Array(fields)).uniq.join(',')
|
@@ -66,7 +71,7 @@ module ResoTransport
|
|
66
71
|
def results
|
67
72
|
parsed = handle_response response
|
68
73
|
|
69
|
-
@next_link = parsed.fetch('@odata.nextLink')
|
74
|
+
@next_link = parsed.fetch('@odata.nextLink', nil)
|
70
75
|
results = Array(parsed.delete('value'))
|
71
76
|
resource.parse(results)
|
72
77
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reso_transport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Druse
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|