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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 315bd80bfb5a763374614ae62995c7fa8331cd9431b8a615da395c584c1a0428
4
- data.tar.gz: 461aa370bc116b8965a67911cae2d0faac8b6ef7c575ddd1563ec167e1ec3530
3
+ metadata.gz: bc8f82ba70695200c4491b1d302dbbb444605ba831d61294dfbe1543439977d9
4
+ data.tar.gz: 169be2cf35fc758fe562bf1b1bd7bc8f95327d4d27496c211c7494ce60535bec
5
5
  SHA512:
6
- metadata.gz: ee54ec2f352176209194eacd2dc082e693849194078e274715c93db8eda11fd929dfc90774a65819b4cb749c6c3b023d649c51a3329d73425445de7bef8c9b2b
7
- data.tar.gz: c1aaeb29786e2169ff1d585710c3e04692b5409984662c2e856410cab3e4879e44033d533b2237bab3475da9f7284b7e9366f2b088c97a621b672468b9fd759b
6
+ metadata.gz: f2c4442c47082e4472c31fe10b5ac7aae1bd3777928b2f4925bb1380cdfdd63a19faebff3d3b1d72bc1152ad6286b7a6875b3ca79536e8d69616c36b8db57ec2
7
+ data.tar.gz: 919211479a65433b2820cb0dbf4ea6f3d493351e2ba3b268fa2cdddf4d8d0f355a65cf45d86e7ed6f773deeb115abf62ae34f30892f7c7ed8774e4d46e0b24b0
data/.gitignore CHANGED
@@ -3,7 +3,7 @@
3
3
  .bundle
4
4
  .config
5
5
  .yardoc
6
- Gemfile.lock
6
+ *.lock
7
7
  InstalledFiles
8
8
  _yardoc
9
9
  coverage
@@ -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
@@ -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
- matrix:
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:
@@ -1,6 +1,12 @@
1
1
  # Change Log
2
2
  ## Unreleased
3
- [Full Changelog](https://github.com/asonas/chatwork-ruby/compare/v0.12.1...master)
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
- if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.3.0")
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"
@@ -14,5 +14,5 @@ connection = @client.instance_variable_get(:@conn)
14
14
  connection.request :curl, logger, :debug
15
15
  connection.response :logger, logger, bodies: true
16
16
 
17
- require "pry"
18
- Pry.start
17
+ require "irb"
18
+ IRB.start
@@ -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", "~> 0.9"
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
@@ -0,0 +1,8 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in chatwork.gemspec
4
+ gemspec path: "../"
5
+
6
+ eval_gemfile "#{__dir__}/common.gemfile"
7
+
8
+ gem "faraday", "~> 0.9"
@@ -0,0 +1,8 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in chatwork.gemspec
4
+ gemspec path: "../"
5
+
6
+ eval_gemfile "#{__dir__}/common.gemfile"
7
+
8
+ gem "faraday", "~> 1.0"
@@ -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 Faraday::Error::ClientError => e
48
+ rescue *faraday_errors => e
42
49
  raise ChatWork::APIConnectionError.faraday_error(e)
43
50
  end
44
51
  payload = handle_response(response)
@@ -1,3 +1,3 @@
1
1
  module ChatWork
2
- VERSION = "0.12.1".freeze
2
+ VERSION = "0.12.2".freeze
3
3
  end
@@ -17,7 +17,6 @@ require "chatwork"
17
17
  require "rspec-parameterized"
18
18
  require "rspec/its"
19
19
  require "webmock/rspec"
20
- require "pry"
21
20
  require "active_support/all"
22
21
 
23
22
  begin
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.1
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: 2019-06-30 00:00:00.000000000 Z
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.0.3
363
+ rubygems_version: 3.1.2
375
364
  signing_key:
376
365
  specification_version: 4
377
366
  summary: Ruby bindings of ChatWork API