preservation-client 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +0 -1
- data/.rubocop_todo.yml +6 -2
- data/lib/preservation/client/version.rb +1 -1
- data/lib/preservation/client/versioned_api_service.rb +8 -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: a5935f4397931242b724daedc842b1fdbdb8d84de5a0a61c0bd08b00064c4396
|
4
|
+
data.tar.gz: d9ffeef6b17897ebad03ddab8508c62caaa247a35ce380e4ba5b543cf8244a04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5afaae843e9fd36aac08b07d514e307993864222a60210e94537f3cfa25f278bd7eccbdc7af6c1bc90b9987ca0bce3e78330092408acc3bf125e6f9685fea28f
|
7
|
+
data.tar.gz: 4177db6c38c34714601a481ef8c6b4b89de04ce607ef766db3af6f136fd497675679a17080c1404fddc5c91a29d85ce2af1e18e09d5d0abcb9b10b47f3e1355d
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,11 +1,15 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2020-01-27 18:06:55 -0800 using RuboCop version 0.77.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
9
|
+
# Offense count: 2
|
10
10
|
Metrics/AbcSize:
|
11
11
|
Max: 34
|
12
|
+
|
13
|
+
# Offense count: 1
|
14
|
+
Metrics/CyclomaticComplexity:
|
15
|
+
Max: 7
|
@@ -52,7 +52,14 @@ module Preservation
|
|
52
52
|
# @param params [Hash] optional params
|
53
53
|
def http_response(method, path, params)
|
54
54
|
req_url = api_version.present? ? "#{api_version}/#{path}" : path
|
55
|
-
resp =
|
55
|
+
resp =
|
56
|
+
case method
|
57
|
+
when :get
|
58
|
+
connection.get(req_url, params)
|
59
|
+
when :post
|
60
|
+
request_json = params.to_json if params&.any?
|
61
|
+
connection.post(req_url, request_json, 'Content-Type' => 'application/json')
|
62
|
+
end
|
56
63
|
return resp.body if resp.success?
|
57
64
|
|
58
65
|
errmsg = ResponseErrorFormatter.format(response: resp, client_method_name: caller_locations.first.label)
|
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: 3.
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naomi Dushay
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|