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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 49e97dc43976dfe814ab0bdc7ce7aea16ae5f03e00c94d10d60de3319cb4d388
4
- data.tar.gz: f15dd31a948a33dbd8008447be68828ba953114214b7633ff8a4628afa2bdfeb
3
+ metadata.gz: 55b3a8f4ed28e5069b20b57cd23aa1fa3a0d43108433908768e2dc9b79b7c1cb
4
+ data.tar.gz: f06068401c564a7b56cb7f902b8ff563ea7b3436357c969cecde42d6d37bc828
5
5
  SHA512:
6
- metadata.gz: 375f0962243d54dd27b80da550281fbc1a3b2e9a92affc6cb3a00e94104f5be0fddf6b3e1e5e636fc77a557d2a21438427867af8a66b1b18ae4a897c1027d5f1
7
- data.tar.gz: 272dedeb65d29749ff3abeacb955c900a9e7e7dcf2449b53ab1bf9c6f7b996e84b78773f635868e603cc86eb34812a7e3b88f7e981ae41ce671055ddc9fd02a2
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.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)
@@ -45,6 +45,10 @@ module ResoTransport
45
45
  @datasystem ||= Datasystem.new(self)
46
46
  end
47
47
 
48
+ def fetch(url)
49
+ connection.get(url)
50
+ end
51
+
48
52
  def to_s
49
53
  %(#<ResoTransport::Client endpoint="#{endpoint}", md_file="#{md_file}", ds_file="#{ds_file}">)
50
54
  end
@@ -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: #{response.reason_phrase}"
71
+ "Access denied: #{@reason}"
67
72
  end
68
73
  end
69
74
  end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module ResoTransport
2
- VERSION = '1.5.9'.freeze
2
+ VERSION = '1.5.14'.freeze
3
3
  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.9
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: 2021-11-05 00:00:00.000000000 Z
11
+ date: 2022-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday