chatwork 0.12.0 → 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -3
- data/CHANGELOG.md +7 -1
- data/lib/chatwork/chatwork_error.rb +6 -1
- data/lib/chatwork/version.rb +1 -1
- data/spec/lib/chatwork/chatwork_error_spec.rb +14 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 315bd80bfb5a763374614ae62995c7fa8331cd9431b8a615da395c584c1a0428
|
4
|
+
data.tar.gz: 461aa370bc116b8965a67911cae2d0faac8b6ef7c575ddd1563ec167e1ec3530
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee54ec2f352176209194eacd2dc082e693849194078e274715c93db8eda11fd929dfc90774a65819b4cb749c6c3b023d649c51a3329d73425445de7bef8c9b2b
|
7
|
+
data.tar.gz: c1aaeb29786e2169ff1d585710c3e04692b5409984662c2e856410cab3e4879e44033d533b2237bab3475da9f7284b7e9366f2b088c97a621b672468b9fd759b
|
data/.travis.yml
CHANGED
@@ -13,7 +13,7 @@ before_install:
|
|
13
13
|
- travis_retry gem update --system || travis_retry gem update --system 2.7.8
|
14
14
|
- travis_retry gem install bundler --no-document || travis_retry gem install bundler --no-document -v 1.17.3
|
15
15
|
script:
|
16
|
-
- bundle exec rake spec
|
16
|
+
- RUBYOPT=$RSPEC_RUBYOPT bundle exec rake spec
|
17
17
|
- bundle exec rubocop
|
18
18
|
branches:
|
19
19
|
only:
|
@@ -23,9 +23,9 @@ matrix:
|
|
23
23
|
- rvm: ruby-head
|
24
24
|
include:
|
25
25
|
- rvm: 2.6
|
26
|
-
env:
|
26
|
+
env: RSPEC_RUBYOPT="--jit"
|
27
27
|
- rvm: ruby-head
|
28
|
-
env:
|
28
|
+
env: RSPEC_RUBYOPT="--jit"
|
29
29
|
env:
|
30
30
|
global:
|
31
31
|
secure: Ntdheemdu1GavPR/3kPfQg1tR13FTP0jE9KxsSKcG32VbIzM69l22OXXwYttFexMhA1dMNytv5bKGIszeiO+YjwzDXkcDHF7ZULc24epsGCOVfNax4g47Q+Lgt2kpAsx8V/8/SIpK7VeBhc2nPvhAKPjTZ8ddN2gLHk4wifLRFA=
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
# Change Log
|
2
2
|
## Unreleased
|
3
|
-
[Full Changelog](https://github.com/asonas/chatwork-ruby/compare/v0.12.
|
3
|
+
[Full Changelog](https://github.com/asonas/chatwork-ruby/compare/v0.12.1...master)
|
4
|
+
|
5
|
+
## v0.12.1
|
6
|
+
[Full Changelog](https://github.com/asonas/chatwork-ruby/compare/v0.12.0...v0.12.1)
|
7
|
+
|
8
|
+
* Fixed. set status code and body when unexpected error is occurred
|
9
|
+
* https://github.com/asonas/chatwork-ruby/pull/68
|
4
10
|
|
5
11
|
## v0.12.0
|
6
12
|
[Full Changelog](https://github.com/asonas/chatwork-ruby/compare/v0.11.0...v0.12.0)
|
@@ -40,7 +40,12 @@ module ChatWork
|
|
40
40
|
|
41
41
|
def initialize(message, original_error = nil)
|
42
42
|
@original_error = original_error
|
43
|
-
|
43
|
+
|
44
|
+
if original_error && original_error.response.is_a?(Hash)
|
45
|
+
super(message, original_error.response[:status], original_error.response[:body])
|
46
|
+
else
|
47
|
+
super(message)
|
48
|
+
end
|
44
49
|
end
|
45
50
|
end
|
46
51
|
|
data/lib/chatwork/version.rb
CHANGED
@@ -74,4 +74,18 @@ describe ChatWork::ChatWorkError do
|
|
74
74
|
its(:error_response) { should eq ["Invalid API Token"] }
|
75
75
|
end
|
76
76
|
end
|
77
|
+
|
78
|
+
describe ChatWork::APIConnectionError do
|
79
|
+
describe ".faraday_error" do
|
80
|
+
subject { ChatWork::APIConnectionError.faraday_error(error) }
|
81
|
+
|
82
|
+
let(:error) do
|
83
|
+
Faraday::ResourceNotFound.new(status: 404, body: "Not found")
|
84
|
+
end
|
85
|
+
|
86
|
+
its(:original_error) { should eq error }
|
87
|
+
its(:status) { should eq 404 }
|
88
|
+
its(:error_response) { should eq "Not found" }
|
89
|
+
end
|
90
|
+
end
|
77
91
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chatwork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- asonas
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-06-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -371,7 +371,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
371
371
|
- !ruby/object:Gem::Version
|
372
372
|
version: '0'
|
373
373
|
requirements: []
|
374
|
-
rubygems_version: 3.0.
|
374
|
+
rubygems_version: 3.0.3
|
375
375
|
signing_key:
|
376
376
|
specification_version: 4
|
377
377
|
summary: Ruby bindings of ChatWork API
|