minato-utils 0.2.1 → 0.2.2
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/minato/utils/client.rb +1 -2
- data/lib/minato/utils/response_handler.rb +4 -6
- data/lib/minato/utils/version.rb +1 -1
- data/release-notes.md +9 -0
- 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: 792df7e33288c44df36a7c1d2bb4e691722fe28a9c64ed47d0b15f9a71e0645a
|
4
|
+
data.tar.gz: 2a8cc6e71f33794d05505d84d6d41119d7864c0da3d9b86453932b0bffd41371
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 196afd23819111e3da67bd1d584e5ff0c53efc21314417b0e61962355b19b662af4e9c698ebfaf130db6b42dccdb7c177268bafe7dfa56501f729e6c6e0356b6
|
7
|
+
data.tar.gz: 55ae22fdcda8590156fb64c86c29b62d721f9e696a96e82891ff5c905c0cedd8860d5c0fa4802e8294754c909f6cdd4702ef50078b00995b3f7af68288f1b9f8
|
data/Gemfile.lock
CHANGED
data/lib/minato/utils/client.rb
CHANGED
@@ -37,7 +37,6 @@ module Minato
|
|
37
37
|
private
|
38
38
|
|
39
39
|
def request(method, path, options)
|
40
|
-
return_headers = options.delete(:return_headers)
|
41
40
|
request_options = @default_options.deep_merge(options)
|
42
41
|
url = Minato::Utils::Helpers.join_url(@base_uri, path)
|
43
42
|
|
@@ -45,7 +44,7 @@ module Minato
|
|
45
44
|
response = self.class.send(method, url, request_options)
|
46
45
|
|
47
46
|
Minato::Utils.logger.log_response(method, @base_uri, path, request_options, response)
|
48
|
-
Minato::Utils::ResponseHandler.handle(response
|
47
|
+
Minato::Utils::ResponseHandler.handle(response)
|
49
48
|
end
|
50
49
|
end
|
51
50
|
end
|
@@ -7,14 +7,12 @@ module Minato
|
|
7
7
|
module Utils
|
8
8
|
class ResponseHandler
|
9
9
|
class << self
|
10
|
-
def handle(response
|
10
|
+
def handle(response)
|
11
11
|
raise_exception(response) if response_error?(response)
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
Minato::Utils::Helpers.parse_json(response.body)
|
17
|
-
end
|
13
|
+
body = Minato::Utils::Helpers.parse_json(response.body)
|
14
|
+
header = response.header.to_hash || {}
|
15
|
+
{ body: body, header: header }
|
18
16
|
end
|
19
17
|
|
20
18
|
private
|
data/lib/minato/utils/version.rb
CHANGED
data/release-notes.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Release Notes
|
2
2
|
|
3
|
+
## v0.2.2 - January 4th, 2022
|
4
|
+
|
5
|
+
### Compatibility Notes
|
6
|
+
|
7
|
+
- `return_headers` was removed from method `Minato::Utils::Client#request`<br/>
|
8
|
+
This renders `return_headers` as a hash key to `options` variable worthless, so
|
9
|
+
from now on you can assume that all requests will return a header regardless if
|
10
|
+
it's useful for the current invocation or not.
|
11
|
+
|
3
12
|
## v0.2.0 - December 20th, 2021
|
4
13
|
|
5
14
|
### Compatibility Notes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minato-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ferreri
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|