barkibu-kb 0.21.0 → 0.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -1
- data/Gemfile.lock +4 -4
- data/barkibu-kb.gemspec +1 -1
- data/lib/kb/client_resolver.rb +2 -2
- data/lib/kb/errors/error.rb +3 -2
- data/lib/kb/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60c13170a8bc9ef25645fcdef01fc91f75210c4c37b91a6625c6556f836b85b8
|
4
|
+
data.tar.gz: cff3103e0dd410df52443d5133899a7d0af5208e7122b2c55dd75526c464f842
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc81ede8d03708a18439bf9ff7c154e274cd61d37136788ad10a3361b089a8b6eb64d6b852e2e76778560133ef4f3e15c646779c9cf8cb15903521e4163abf19
|
7
|
+
data.tar.gz: 03dca28d0b6b9fab0c1c7b3d66e53746dd6368db4baf7f183a1e394072d3c7b31cdd949096c05c4019f2caac67a11b3ac1b9a8e2a5ced5c573635787529c96f5
|
data/CHANGELOG.md
CHANGED
@@ -6,7 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
8
|
## [unreleased]
|
9
|
-
- See diff: https://github.com/barkibu/kb-ruby/compare/v0.
|
9
|
+
- See diff: https://github.com/barkibu/kb-ruby/compare/v0.22.0...HEAD
|
10
|
+
|
11
|
+
# [0.22.0]
|
12
|
+
- Fix error parsing if HTTP client returns no response
|
10
13
|
|
11
14
|
## [0.21.0]
|
12
15
|
- Add city attribute to PetParent model
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
barkibu-kb (0.
|
4
|
+
barkibu-kb (0.22.0)
|
5
5
|
activemodel (>= 4.0.2)
|
6
6
|
activerecord
|
7
7
|
activesupport (>= 3.0.0)
|
@@ -10,8 +10,8 @@ PATH
|
|
10
10
|
faraday-http
|
11
11
|
faraday_middleware
|
12
12
|
i18n
|
13
|
-
barkibu-kb-fake (0.
|
14
|
-
barkibu-kb (= 0.
|
13
|
+
barkibu-kb-fake (0.22.0)
|
14
|
+
barkibu-kb (= 0.22.0)
|
15
15
|
countries
|
16
16
|
sinatra
|
17
17
|
webmock
|
@@ -168,7 +168,7 @@ PLATFORMS
|
|
168
168
|
DEPENDENCIES
|
169
169
|
barkibu-kb!
|
170
170
|
barkibu-kb-fake!
|
171
|
-
bundler (~>
|
171
|
+
bundler (~> 2.4.12)
|
172
172
|
byebug
|
173
173
|
rake (>= 12.3.3)
|
174
174
|
rspec (~> 3.0)
|
data/barkibu-kb.gemspec
CHANGED
@@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.required_ruby_version = '>= 2.6'
|
38
38
|
|
39
39
|
spec.add_dependency 'dry-configurable', '~> 0.9'
|
40
|
-
spec.add_development_dependency 'bundler', '~>
|
40
|
+
spec.add_development_dependency 'bundler', '~> 2.4.12'
|
41
41
|
spec.add_development_dependency 'byebug'
|
42
42
|
spec.add_development_dependency 'rake', '>= 12.3.3'
|
43
43
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
data/lib/kb/client_resolver.rb
CHANGED
data/lib/kb/errors/error.rb
CHANGED
@@ -7,11 +7,12 @@ module KB
|
|
7
7
|
@status_code = status_code
|
8
8
|
@body = body
|
9
9
|
@message = "Received Status: #{status_code}\n#{body}"
|
10
|
+
@message = error.message if error.present? && body.nil? && status_code.nil?
|
10
11
|
set_backtrace error.backtrace if error
|
11
12
|
end
|
12
13
|
|
13
14
|
def self.from_faraday(error)
|
14
|
-
case error.response[:status
|
15
|
+
case error.response&.[](:status)
|
15
16
|
when 404
|
16
17
|
ResourceNotFound
|
17
18
|
when 409
|
@@ -20,7 +21,7 @@ module KB
|
|
20
21
|
UnprocessableEntityError
|
21
22
|
else
|
22
23
|
self
|
23
|
-
end.new(error.response[:status
|
24
|
+
end.new(error.response&.[](:status), error.response&.[](:body), error)
|
24
25
|
end
|
25
26
|
end
|
26
27
|
end
|
data/lib/kb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: barkibu-kb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.22.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Léo Figea
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-configurable
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 2.4.12
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 2.4.12
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: byebug
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|