restful_resource 2.13.3 → 2.13.4

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: f578b915d89258f07c42764c2145d2c2d312a5c433150b8ffc9aaf0928ac9afd
4
- data.tar.gz: 474ee1332121730907f668e7f27f8e9eedd68c97039a5460be734bf8eaf32611
3
+ metadata.gz: 811b916cd8a44f9a8c94185176a2a99e55719dbe7320c8772efb856a5fb17229
4
+ data.tar.gz: '08eec998987cefdee15d7816c5b3ee801d9a7f0e5f5f609d5ee5fade7ad6ee7b'
5
5
  SHA512:
6
- metadata.gz: 200b5161e691223658fdc487251f1136b13a099c7bc59fef225080455c40d720239d6a6924b3935edc5bcf9aa42e8668d71983955aa04c1e8e049879f170e5db
7
- data.tar.gz: e28af4d1460c452b0a51d966e3899a0ded290dc79177d85b320d94a22b4d61a88a2a1acae1b5179021bba6c6f925b0c8d3923875a9fdbcbf8a60335dbc8f4239
6
+ metadata.gz: 6a1bc2e111f392ec4d50a41225b1534b1a6f19bc36d730cbad3047b793624fc0022d9d293be7578ed9886eceb90ed744a94daa7b4239cd68ed83fefe78f982c5
7
+ data.tar.gz: 84684eba6db73549f8b116d7637e2502b7a6721214c10bc1aab4c0adff1a6aca6755a104efb57ea11f9ed7195502aa9177a3b9bd83c8f04f51083e2155ce86dd
data/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
1
  # Changelog
2
+ 2.13.4
3
+ ---
4
+
5
+ - Support passing a an instance of `RestfulResource::Response` to the constructor for a `RestfulResource::HttpClient::HttpError`
6
+
2
7
  2.13.3
3
8
  ---
4
9
 
@@ -11,8 +11,12 @@ module RestfulResource
11
11
  @response = assign_response(response)
12
12
  end
13
13
 
14
- def assign_response(response = nil)
15
- @response = if response
14
+ private
15
+
16
+ def assign_response(response)
17
+ @response = if response.is_a?(Response)
18
+ response
19
+ elsif response
16
20
  Response.new(body: response[:body], headers: response[:headers], status: response[:status])
17
21
  else
18
22
  Response.new
@@ -1,3 +1,3 @@
1
1
  module RestfulResource
2
- VERSION = '2.13.3'.freeze
2
+ VERSION = '2.13.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restful_resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.13.3
4
+ version: 2.13.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Santoro
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-11-01 00:00:00.000000000 Z
12
+ date: 2023-03-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler