preservation-client 7.0.0 → 7.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +1 -1
- data/Gemfile.lock +79 -59
- data/lib/preservation/client/version.rb +1 -1
- data/lib/preservation/client/versioned_api_service.rb +11 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c80fea134e78418410a157f1d05d2c1fe5ab4651f5d5db2f44d5b7ae2ec9171d
|
4
|
+
data.tar.gz: c569af575448f9ae1f23e3810159ecda3e8c5089e6f10c3f35e69af3e63f64ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d748a24a0cedea152322ece89273ee8e10131bd97884d49ab87d3e09ecf47fd30b295498aed3813d90906d9b0aff2f9ed43b81995df646489a113e2eec404a45
|
7
|
+
data.tar.gz: 1cba48166d80175dc0dbdcab7f5aefeb606fefa98391ff377071c361c6e4e1514cc21ef04c6ef8e78540e1e069c787aec9dfb7380c31cd57f1a5e0f71d0686c4
|
data/.circleci/config.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
preservation-client (7.0.
|
4
|
+
preservation-client (7.0.1)
|
5
5
|
activesupport (>= 4.2, < 8)
|
6
6
|
faraday (~> 2.0)
|
7
7
|
moab-versioning (>= 5.0.0, < 7)
|
@@ -10,47 +10,64 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
activesupport (7.
|
14
|
-
|
13
|
+
activesupport (7.2.1.1)
|
14
|
+
base64
|
15
|
+
bigdecimal
|
16
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
17
|
+
connection_pool (>= 2.2.5)
|
18
|
+
drb
|
15
19
|
i18n (>= 1.6, < 2)
|
20
|
+
logger (>= 1.4.2)
|
16
21
|
minitest (>= 5.1)
|
17
|
-
|
18
|
-
|
19
|
-
|
22
|
+
securerandom (>= 0.3)
|
23
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
24
|
+
addressable (2.8.7)
|
25
|
+
public_suffix (>= 2.0.2, < 7.0)
|
20
26
|
ast (2.4.2)
|
21
|
-
base64 (0.
|
27
|
+
base64 (0.2.0)
|
28
|
+
bigdecimal (3.1.8)
|
22
29
|
byebug (11.1.3)
|
23
30
|
coderay (1.1.3)
|
24
|
-
concurrent-ruby (1.
|
25
|
-
|
31
|
+
concurrent-ruby (1.3.4)
|
32
|
+
connection_pool (2.4.1)
|
33
|
+
crack (1.0.0)
|
34
|
+
bigdecimal
|
26
35
|
rexml
|
27
|
-
diff-lcs (1.5.
|
28
|
-
docile (1.4.
|
36
|
+
diff-lcs (1.5.1)
|
37
|
+
docile (1.4.1)
|
38
|
+
drb (2.2.1)
|
29
39
|
druid-tools (3.0.0)
|
30
|
-
faraday (2.
|
31
|
-
faraday-net_http (>= 2.0, < 3.
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
40
|
+
faraday (2.12.0)
|
41
|
+
faraday-net_http (>= 2.0, < 3.4)
|
42
|
+
json
|
43
|
+
logger
|
44
|
+
faraday-net_http (3.3.0)
|
45
|
+
net-http
|
46
|
+
hashdiff (1.1.1)
|
47
|
+
i18n (1.14.6)
|
36
48
|
concurrent-ruby (~> 1.0)
|
37
|
-
json (2.
|
49
|
+
json (2.7.2)
|
38
50
|
language_server-protocol (3.17.0.3)
|
39
|
-
|
40
|
-
|
51
|
+
logger (1.6.1)
|
52
|
+
method_source (1.1.0)
|
53
|
+
minitest (5.25.1)
|
41
54
|
moab-versioning (6.1.0)
|
42
55
|
druid-tools (>= 1.0.0)
|
43
56
|
json
|
44
57
|
nokogiri
|
45
58
|
nokogiri-happymapper
|
46
|
-
|
59
|
+
net-http (0.4.1)
|
60
|
+
uri
|
61
|
+
nokogiri (1.16.7-arm64-darwin)
|
62
|
+
racc (~> 1.4)
|
63
|
+
nokogiri (1.16.7-x86_64-darwin)
|
47
64
|
racc (~> 1.4)
|
48
|
-
nokogiri (1.
|
65
|
+
nokogiri (1.16.7-x86_64-linux)
|
49
66
|
racc (~> 1.4)
|
50
|
-
nokogiri-happymapper (0.
|
67
|
+
nokogiri-happymapper (0.10.0)
|
51
68
|
nokogiri (~> 1.5)
|
52
|
-
parallel (1.
|
53
|
-
parser (3.
|
69
|
+
parallel (1.26.3)
|
70
|
+
parser (3.3.5.0)
|
54
71
|
ast (~> 2.4.1)
|
55
72
|
racc
|
56
73
|
pry (0.14.2)
|
@@ -59,67 +76,70 @@ GEM
|
|
59
76
|
pry-byebug (3.10.1)
|
60
77
|
byebug (~> 11.0)
|
61
78
|
pry (>= 0.13, < 0.15)
|
62
|
-
public_suffix (
|
63
|
-
racc (1.
|
79
|
+
public_suffix (6.0.1)
|
80
|
+
racc (1.8.1)
|
64
81
|
rainbow (3.1.1)
|
65
|
-
rake (13.
|
66
|
-
regexp_parser (2.
|
67
|
-
rexml (3.
|
68
|
-
rspec (3.
|
69
|
-
rspec-core (~> 3.
|
70
|
-
rspec-expectations (~> 3.
|
71
|
-
rspec-mocks (~> 3.
|
72
|
-
rspec-core (3.
|
73
|
-
rspec-support (~> 3.
|
74
|
-
rspec-expectations (3.
|
82
|
+
rake (13.2.1)
|
83
|
+
regexp_parser (2.9.2)
|
84
|
+
rexml (3.3.8)
|
85
|
+
rspec (3.13.0)
|
86
|
+
rspec-core (~> 3.13.0)
|
87
|
+
rspec-expectations (~> 3.13.0)
|
88
|
+
rspec-mocks (~> 3.13.0)
|
89
|
+
rspec-core (3.13.2)
|
90
|
+
rspec-support (~> 3.13.0)
|
91
|
+
rspec-expectations (3.13.3)
|
75
92
|
diff-lcs (>= 1.2.0, < 2.0)
|
76
|
-
rspec-support (~> 3.
|
77
|
-
rspec-mocks (3.
|
93
|
+
rspec-support (~> 3.13.0)
|
94
|
+
rspec-mocks (3.13.2)
|
78
95
|
diff-lcs (>= 1.2.0, < 2.0)
|
79
|
-
rspec-support (~> 3.
|
80
|
-
rspec-support (3.
|
81
|
-
rubocop (1.
|
82
|
-
base64 (~> 0.1.1)
|
96
|
+
rspec-support (~> 3.13.0)
|
97
|
+
rspec-support (3.13.1)
|
98
|
+
rubocop (1.67.0)
|
83
99
|
json (~> 2.3)
|
84
100
|
language_server-protocol (>= 3.17.0)
|
85
101
|
parallel (~> 1.10)
|
86
|
-
parser (>= 3.
|
102
|
+
parser (>= 3.3.0.2)
|
87
103
|
rainbow (>= 2.2.2, < 4.0)
|
88
|
-
regexp_parser (>=
|
89
|
-
|
90
|
-
rubocop-ast (>= 1.28.1, < 2.0)
|
104
|
+
regexp_parser (>= 2.4, < 3.0)
|
105
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
91
106
|
ruby-progressbar (~> 1.7)
|
92
107
|
unicode-display_width (>= 2.4.0, < 3.0)
|
93
|
-
rubocop-ast (1.
|
94
|
-
parser (>= 3.
|
95
|
-
rubocop-capybara (2.
|
108
|
+
rubocop-ast (1.32.3)
|
109
|
+
parser (>= 3.3.1.0)
|
110
|
+
rubocop-capybara (2.21.0)
|
96
111
|
rubocop (~> 1.41)
|
97
|
-
rubocop-factory_bot (2.
|
98
|
-
rubocop (~> 1.
|
112
|
+
rubocop-factory_bot (2.26.1)
|
113
|
+
rubocop (~> 1.61)
|
99
114
|
rubocop-rake (0.6.0)
|
100
115
|
rubocop (~> 1.0)
|
101
|
-
rubocop-rspec (2.
|
102
|
-
rubocop (~> 1.
|
116
|
+
rubocop-rspec (2.31.0)
|
117
|
+
rubocop (~> 1.40)
|
103
118
|
rubocop-capybara (~> 2.17)
|
104
119
|
rubocop-factory_bot (~> 2.22)
|
120
|
+
rubocop-rspec_rails (~> 2.28)
|
121
|
+
rubocop-rspec_rails (2.29.1)
|
122
|
+
rubocop (~> 1.61)
|
105
123
|
ruby-progressbar (1.13.0)
|
106
|
-
|
124
|
+
securerandom (0.3.1)
|
107
125
|
simplecov (0.22.0)
|
108
126
|
docile (~> 1.1)
|
109
127
|
simplecov-html (~> 0.11)
|
110
128
|
simplecov_json_formatter (~> 0.1)
|
111
|
-
simplecov-html (0.
|
129
|
+
simplecov-html (0.13.1)
|
112
130
|
simplecov_json_formatter (0.1.4)
|
113
131
|
tzinfo (2.0.6)
|
114
132
|
concurrent-ruby (~> 1.0)
|
115
|
-
unicode-display_width (2.
|
116
|
-
|
133
|
+
unicode-display_width (2.6.0)
|
134
|
+
uri (0.13.1)
|
135
|
+
webmock (3.24.0)
|
117
136
|
addressable (>= 2.8.0)
|
118
137
|
crack (>= 0.3.2)
|
119
138
|
hashdiff (>= 0.4.0, < 2.0.0)
|
120
|
-
zeitwerk (2.
|
139
|
+
zeitwerk (2.7.1)
|
121
140
|
|
122
141
|
PLATFORMS
|
142
|
+
arm64-darwin-23
|
123
143
|
x86_64-darwin-19
|
124
144
|
x86_64-darwin-20
|
125
145
|
x86_64-darwin-21
|
@@ -41,8 +41,16 @@ module Preservation
|
|
41
41
|
def get(path, params, on_data:)
|
42
42
|
return http_response(:get, path, params) unless on_data
|
43
43
|
|
44
|
+
req_url = "#{api_version}/#{path}"
|
44
45
|
connection.get("#{api_version}/#{path}", params) do |req|
|
45
|
-
req.options.on_data =
|
46
|
+
req.options.on_data = proc do |chunk, size, env|
|
47
|
+
if env.status >= 300
|
48
|
+
errmsg = "Preservation::Client.#{caller_locations.first.label} " \
|
49
|
+
"got #{env.status} from Preservation at #{req_url}"
|
50
|
+
raise http_exception_class(env.status), errmsg
|
51
|
+
end
|
52
|
+
on_data.call(chunk, size, env)
|
53
|
+
end
|
46
54
|
end
|
47
55
|
end
|
48
56
|
|
@@ -101,6 +109,8 @@ module Preservation
|
|
101
109
|
# @param status_code [Integer] the HTTP status code to translate to an exception class
|
102
110
|
def http_exception_class(status_code)
|
103
111
|
case status_code
|
112
|
+
when 404
|
113
|
+
NotFoundError
|
104
114
|
when 423
|
105
115
|
LockedError
|
106
116
|
when 409
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: preservation-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.
|
4
|
+
version: 7.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naomi Dushay
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -255,7 +255,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
255
255
|
- !ruby/object:Gem::Version
|
256
256
|
version: '0'
|
257
257
|
requirements: []
|
258
|
-
rubygems_version: 3.
|
258
|
+
rubygems_version: 3.5.11
|
259
259
|
signing_key:
|
260
260
|
specification_version: 4
|
261
261
|
summary: A thin client for getting info from SDR preservation.
|