chatwork 0.12.1 → 0.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.rubocop.yml +10 -0
- data/.travis.yml +11 -2
- data/CHANGELOG.md +7 -1
- data/Gemfile +1 -18
- data/bin/console +2 -2
- data/chatwork.gemspec +1 -2
- data/gemfiles/common.gemfile +18 -0
- data/gemfiles/faraday_0.gemfile +8 -0
- data/gemfiles/faraday_1.gemfile +8 -0
- data/lib/chatwork/base_client.rb +8 -1
- data/lib/chatwork/version.rb +1 -1
- data/spec/spec_helper.rb +0 -1
- metadata +8 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc8f82ba70695200c4491b1d302dbbb444605ba831d61294dfbe1543439977d9
|
4
|
+
data.tar.gz: 169be2cf35fc758fe562bf1b1bd7bc8f95327d4d27496c211c7494ce60535bec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2c4442c47082e4472c31fe10b5ac7aae1bd3777928b2f4925bb1380cdfdd63a19faebff3d3b1d72bc1152ad6286b7a6875b3ca79536e8d69616c36b8db57ec2
|
7
|
+
data.tar.gz: 919211479a65433b2820cb0dbf4ea6f3d493351e2ba3b268fa2cdddf4d8d0f355a65cf45d86e7ed6f773deeb115abf62ae34f30892f7c7ed8774e4d46e0b24b0
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -5,6 +5,16 @@ inherit_gem:
|
|
5
5
|
|
6
6
|
require: rubocop-rspec
|
7
7
|
|
8
|
+
AllCops:
|
9
|
+
Exclude:
|
10
|
+
- 'gemfiles/vendor/**/*'
|
11
|
+
|
12
|
+
# c.f. https://github.com/rubocop-hq/rubocop/blob/v0.79.0/config/default.yml#L60-L64
|
13
|
+
- 'node_modules/**/*'
|
14
|
+
- 'tmp/**/*'
|
15
|
+
- 'vendor/**/*'
|
16
|
+
- '.git/**/*'
|
17
|
+
|
8
18
|
# module name is `ChatWork`, but I want to use `chatwork` as filename
|
9
19
|
RSpec/FilePath:
|
10
20
|
Enabled: false
|
data/.travis.yml
CHANGED
@@ -6,11 +6,14 @@ rvm:
|
|
6
6
|
- 2.4
|
7
7
|
- 2.5
|
8
8
|
- 2.6
|
9
|
+
- 2.7
|
9
10
|
- ruby-head
|
11
|
+
gemfile:
|
12
|
+
- gemfiles/faraday_0.gemfile
|
13
|
+
- gemfiles/faraday_1.gemfile
|
10
14
|
bundler_args: "--jobs=2"
|
11
15
|
cache: bundler
|
12
16
|
before_install:
|
13
|
-
- travis_retry gem update --system || travis_retry gem update --system 2.7.8
|
14
17
|
- travis_retry gem install bundler --no-document || travis_retry gem install bundler --no-document -v 1.17.3
|
15
18
|
script:
|
16
19
|
- RUBYOPT=$RSPEC_RUBYOPT bundle exec rake spec
|
@@ -18,12 +21,18 @@ script:
|
|
18
21
|
branches:
|
19
22
|
only:
|
20
23
|
- master
|
21
|
-
|
24
|
+
jobs:
|
22
25
|
allow_failures:
|
23
26
|
- rvm: ruby-head
|
27
|
+
exclude:
|
28
|
+
# faraday v1.0+ requires Ruby 2.3+
|
29
|
+
- rvm: 2.2
|
30
|
+
gemfile: gemfiles/faraday_1.gemfile
|
24
31
|
include:
|
25
32
|
- rvm: 2.6
|
26
33
|
env: RSPEC_RUBYOPT="--jit"
|
34
|
+
- rvm: 2.7
|
35
|
+
env: RSPEC_RUBYOPT="--jit"
|
27
36
|
- rvm: ruby-head
|
28
37
|
env: RSPEC_RUBYOPT="--jit"
|
29
38
|
env:
|
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.2...master)
|
4
|
+
|
5
|
+
## v0.12.2
|
6
|
+
[Full Changelog](https://github.com/asonas/chatwork-ruby/compare/v0.12.1...v0.12.2)
|
7
|
+
|
8
|
+
* Support faraday v1.0
|
9
|
+
* https://github.com/asonas/chatwork-ruby/pull/70
|
4
10
|
|
5
11
|
## v0.12.1
|
6
12
|
[Full Changelog](https://github.com/asonas/chatwork-ruby/compare/v0.12.0...v0.12.1)
|
data/Gemfile
CHANGED
@@ -3,21 +3,4 @@ source "https://rubygems.org"
|
|
3
3
|
# Specify your gem's dependencies in chatwork.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
|
7
|
-
group :test do
|
8
|
-
gem "backport_dig", group: :development
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.2.2")
|
13
|
-
group :test do
|
14
|
-
gem "activesupport", "< 5.0.0", group: :development
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.5.0")
|
19
|
-
group :test do
|
20
|
-
# NOTE: unparser v0.3.0+ requires Ruby 2.5+
|
21
|
-
gem "unparser", "< 0.3.0"
|
22
|
-
end
|
23
|
-
end
|
6
|
+
eval_gemfile "#{__dir__}/gemfiles/common.gemfile"
|
data/bin/console
CHANGED
data/chatwork.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
-
spec.add_dependency "faraday", "
|
20
|
+
spec.add_dependency "faraday", ">= 0.9"
|
21
21
|
spec.add_dependency "faraday_middleware"
|
22
22
|
spec.add_dependency "hashie"
|
23
23
|
|
@@ -27,7 +27,6 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.add_development_dependency "dotenv"
|
28
28
|
spec.add_development_dependency "faraday_curl"
|
29
29
|
spec.add_development_dependency "onkcop", "0.53.0.0"
|
30
|
-
spec.add_development_dependency "pry-byebug"
|
31
30
|
spec.add_development_dependency "rake"
|
32
31
|
spec.add_development_dependency "rspec"
|
33
32
|
spec.add_development_dependency "rspec-its"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.3.0")
|
2
|
+
group :test do
|
3
|
+
gem "backport_dig", group: :development
|
4
|
+
end
|
5
|
+
end
|
6
|
+
|
7
|
+
if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.2.2")
|
8
|
+
group :test do
|
9
|
+
gem "activesupport", "< 5.0.0", group: :development
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.5.0")
|
14
|
+
group :test do
|
15
|
+
# NOTE: unparser v0.3.0+ requires Ruby 2.5+
|
16
|
+
gem "unparser", "< 0.3.0"
|
17
|
+
end
|
18
|
+
end
|
data/lib/chatwork/base_client.rb
CHANGED
@@ -36,9 +36,16 @@ module ChatWork
|
|
36
36
|
|
37
37
|
Faraday::Connection::METHODS.each do |method|
|
38
38
|
define_method(method) do |url, args = {}, &block|
|
39
|
+
faraday_errors =
|
40
|
+
if Gem::Version.create(Faraday::VERSION) >= Gem::Version.create("1.0.0")
|
41
|
+
[Faraday::ClientError, Faraday::ServerError]
|
42
|
+
else
|
43
|
+
[Faraday::Error::ClientError]
|
44
|
+
end
|
45
|
+
|
39
46
|
begin
|
40
47
|
response = @conn.__send__(method, @api_version + url, hash_compact(args))
|
41
|
-
rescue
|
48
|
+
rescue *faraday_errors => e
|
42
49
|
raise ChatWork::APIConnectionError.faraday_error(e)
|
43
50
|
end
|
44
51
|
payload = handle_response(response)
|
data/lib/chatwork/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- asonas
|
@@ -9,20 +9,20 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-03-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '0.9'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - "
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0.9'
|
28
28
|
- !ruby/object:Gem::Dependency
|
@@ -137,20 +137,6 @@ dependencies:
|
|
137
137
|
- - '='
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: 0.53.0.0
|
140
|
-
- !ruby/object:Gem::Dependency
|
141
|
-
name: pry-byebug
|
142
|
-
requirement: !ruby/object:Gem::Requirement
|
143
|
-
requirements:
|
144
|
-
- - ">="
|
145
|
-
- !ruby/object:Gem::Version
|
146
|
-
version: '0'
|
147
|
-
type: :development
|
148
|
-
prerelease: false
|
149
|
-
version_requirements: !ruby/object:Gem::Requirement
|
150
|
-
requirements:
|
151
|
-
- - ">="
|
152
|
-
- !ruby/object:Gem::Version
|
153
|
-
version: '0'
|
154
140
|
- !ruby/object:Gem::Dependency
|
155
141
|
name: rake
|
156
142
|
requirement: !ruby/object:Gem::Requirement
|
@@ -285,6 +271,9 @@ files:
|
|
285
271
|
- Rakefile
|
286
272
|
- bin/console
|
287
273
|
- chatwork.gemspec
|
274
|
+
- gemfiles/common.gemfile
|
275
|
+
- gemfiles/faraday_0.gemfile
|
276
|
+
- gemfiles/faraday_1.gemfile
|
288
277
|
- lib/chatwork.rb
|
289
278
|
- lib/chatwork/base_client.rb
|
290
279
|
- lib/chatwork/chatwork_error.rb
|
@@ -371,7 +360,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
371
360
|
- !ruby/object:Gem::Version
|
372
361
|
version: '0'
|
373
362
|
requirements: []
|
374
|
-
rubygems_version: 3.
|
363
|
+
rubygems_version: 3.1.2
|
375
364
|
signing_key:
|
376
365
|
specification_version: 4
|
377
366
|
summary: Ruby bindings of ChatWork API
|