reso_transport 1.5.17 → 1.5.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/reso_transport/query.rb +11 -2
- data/lib/reso_transport/resource.rb +7 -0
- 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: ff26d270c5202a27d5df7a52dc122c1790c017cdf6e7547830fa7386d9996ec7
|
4
|
+
data.tar.gz: b4bacea38b43b18ab14989219ab0c0f8d3c0e9587a6a9ff539be2c8b6f05d355
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d8cd7b433014eebe9cb4e5d703d32891f57b75ab510c8d80e0126aa6b676d02fdcc11d779f8a44f9657b0a18402ecea1074f7b1ca874a1d760d1008a010dd1a
|
7
|
+
data.tar.gz: b634920adeb8f9367ca38437137b1976ad96c549995a91fed47593a673519b45febffcf84922925d721d8ff57a2d322a8d5910d184e6d08ce6a76a2aaf9d058e
|
data/Gemfile.lock
CHANGED
data/lib/reso_transport/query.rb
CHANGED
@@ -80,17 +80,26 @@ module ResoTransport
|
|
80
80
|
resource.parse(results)
|
81
81
|
end
|
82
82
|
|
83
|
-
# Can only be accessed after results call
|
83
|
+
# Can only be accessed after results call or if it's being set
|
84
84
|
def next_link
|
85
85
|
@next_link
|
86
86
|
end
|
87
87
|
|
88
|
+
# used for setting the next_link with trestle's replication strategy
|
89
|
+
def next_link=(link)
|
90
|
+
@next_link = link
|
91
|
+
end
|
92
|
+
|
88
93
|
def response
|
89
|
-
resource.get(compile_params)
|
94
|
+
use_next_link? ? resource.get_next_link_results(next_link) : resource.get(compile_params)
|
90
95
|
rescue Faraday::ConnectionFailed
|
91
96
|
raise NoResponse.new(resource.request, nil, resource)
|
92
97
|
end
|
93
98
|
|
99
|
+
def use_next_link?
|
100
|
+
compile_params[:replication] && next_link.present?
|
101
|
+
end
|
102
|
+
|
94
103
|
def handle_response(response)
|
95
104
|
raise RequestError.new(resource.request, response, resource) unless response.success?
|
96
105
|
|
@@ -43,6 +43,13 @@ module ResoTransport
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
+
def get_next_link_results(next_link)
|
47
|
+
client.connection.get(next_link) do |req|
|
48
|
+
req.headers['Accept'] = 'application/json'
|
49
|
+
@request = req
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
46
53
|
def url
|
47
54
|
return local['ResourcePath'].gsub(%r{^/}, '') if local
|
48
55
|
|
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.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Druse
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|