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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dfb058593a0636a69c8a496a846dbfdcee34ebe79475545c80999642dffc5ffd
4
- data.tar.gz: c0c4a0d3c0994116ff61648fcba67575adcc144edaacac0e6986dc81cf4fd117
3
+ metadata.gz: a5935f4397931242b724daedc842b1fdbdb8d84de5a0a61c0bd08b00064c4396
4
+ data.tar.gz: d9ffeef6b17897ebad03ddab8508c62caaa247a35ce380e4ba5b543cf8244a04
5
5
  SHA512:
6
- metadata.gz: d742c45557b5bd9e2c8bcdee76bd24149ab6b4b225772cbbbcb7ab1f1e35a28b6f6951869c9a4e3443970562824a824dd9cdc83f06a4499fbdcdf560f992d79a
7
- data.tar.gz: 8d0983ba3bc0d3c0def903983a118a462b496b1397d5b235c08bca37a63186a3a169fca293657acaa0c8039b52480d13f7485d2d29ba65bbba48248510e70f22
6
+ metadata.gz: 5afaae843e9fd36aac08b07d514e307993864222a60210e94537f3cfa25f278bd7eccbdc7af6c1bc90b9987ca0bce3e78330092408acc3bf125e6f9685fea28f
7
+ data.tar.gz: 4177db6c38c34714601a481ef8c6b4b89de04ce607ef766db3af6f136fd497675679a17080c1404fddc5c91a29d85ce2af1e18e09d5d0abcb9b10b47f3e1355d
data/.rubocop.yml CHANGED
@@ -24,6 +24,5 @@ Style/Documentation:
24
24
  Exclude:
25
25
  - 'spec/**/*'
26
26
 
27
-
28
27
  Style/WordArray:
29
28
  Enabled: false
data/.rubocop_todo.yml CHANGED
@@ -1,11 +1,15 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2019-12-03 15:41:39 -0800 using RuboCop version 0.74.0.
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: 3
9
+ # Offense count: 2
10
10
  Metrics/AbcSize:
11
11
  Max: 34
12
+
13
+ # Offense count: 1
14
+ Metrics/CyclomaticComplexity:
15
+ Max: 7
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Preservation
4
4
  class Client
5
- VERSION = '3.0.0'
5
+ VERSION = '3.1.0'
6
6
  end
7
7
  end
@@ -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 = connection.send(method, req_url, params)
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.0.0
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-17 00:00:00.000000000 Z
11
+ date: 2020-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport