chatwork 0.12.0 → 1.0.0

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: 64d1eb9fd81f641753a8e6689001e02d65b1f2845c10dad8dfcc7d0c0af068ea
4
- data.tar.gz: b1b7a40e94579a42352572d17dcbdd336a3660c8d3b4917e9a9b9a8016021001
3
+ metadata.gz: 6ebd6f01a2cc37a47a6257aeb737ff651136d8648fdbc789d7b04ead47871b7f
4
+ data.tar.gz: cc0dd6dad262c74a62a60935c0fd2f7eeacbbcc354e8c9537dcac32484b005ed
5
5
  SHA512:
6
- metadata.gz: 877a8e143ad2280ad801b827a7a6138edfe2c4dbfcd4676bb7657f68e51b35b83ae81e7dd810d5d32f00f4a7370cb00c61883334c02255c15ed1ee5c12d50b16
7
- data.tar.gz: 98ee78d7fec6e0b8cf6dae6b3123363fb630179da15db155b5f00bb47b57e5704b37a969b30d2502c9f6f9f14abd02833de5609583163dae1ea6a1714ce4f66f
6
+ metadata.gz: 4adfba5cbacb2c7d013890d1e023b2b8e3edec7c0a485f3d9e73c0142c34e1f84ecf67cf9238abab519640ecbb932eb2270075829ff7268a316e0f684714f880
7
+ data.tar.gz: eee04c8ba3baf1754b1b497f265dad2be39583a24bda1ba8d6f29ae9b9f85442e2b55570c0c8d9fa45526070621d3c9e423e6ed852937cbc1c7e84240a822631
@@ -0,0 +1,86 @@
1
+ name: test
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+ types:
9
+ - opened
10
+ - synchronize
11
+ - reopened
12
+ schedule:
13
+ - cron: "0 10 * * 5" # JST 19:00 (Fri)
14
+
15
+ env:
16
+ RUBYOPT: -EUTF-8
17
+
18
+ jobs:
19
+ test:
20
+ runs-on: ubuntu-latest
21
+
22
+ container: ${{ matrix.ruby }}
23
+
24
+ strategy:
25
+ fail-fast: false
26
+
27
+ matrix:
28
+ ruby:
29
+ - ruby:2.6
30
+ - ruby:2.7
31
+ - ruby:3.0
32
+ - ruby:3.1
33
+ - rubylang/ruby:master-nightly-bionic
34
+ gemfile:
35
+ - faraday_2
36
+ include:
37
+ - ruby: rubylang/ruby:master-nightly-bionic
38
+ allow_failures: "true"
39
+
40
+ env:
41
+ BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
42
+
43
+ steps:
44
+ - uses: actions/checkout@v2
45
+ with:
46
+ submodules: "true"
47
+
48
+ - name: Cache vendor/bundle
49
+ uses: actions/cache@v1
50
+ id: cache_gem
51
+ with:
52
+ path: vendor/bundle
53
+ key: v1-gem-${{ runner.os }}-${{ matrix.ruby }}-${{ github.sha }}
54
+ restore-keys: |
55
+ v1-gem-${{ runner.os }}-${{ matrix.ruby }}-
56
+ continue-on-error: ${{ matrix.allow_failures == 'true' }}
57
+
58
+ - name: bundle update
59
+ run: |
60
+ set -xe
61
+ bundle config path vendor/bundle
62
+ bundle update --jobs $(nproc) --retry 3
63
+ continue-on-error: ${{ matrix.allow_failures == 'true' }}
64
+
65
+ - run: bundle exec rspec
66
+ continue-on-error: ${{ matrix.allow_failures == 'true' }}
67
+
68
+ - name: Coveralls Parallel
69
+ uses: coverallsapp/github-action@master
70
+ with:
71
+ github-token: ${{ secrets.GITHUB_TOKEN }}
72
+ flag-name: run-${{ matrix.ruby }}-${{ matrix.gemfile }}
73
+ parallel: true
74
+
75
+ - run: bundle exec rubocop
76
+ continue-on-error: ${{ matrix.allow_failures == 'true' }}
77
+
78
+ finish:
79
+ needs: test
80
+ runs-on: ubuntu-latest
81
+ steps:
82
+ - name: Coveralls Finished
83
+ uses: coverallsapp/github-action@master
84
+ with:
85
+ github-token: ${{ secrets.GITHUB_TOKEN }}
86
+ parallel-finished: true
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
data/.rubocop.yml CHANGED
@@ -5,9 +5,40 @@ inherit_gem:
5
5
 
6
6
  require: rubocop-rspec
7
7
 
8
- # module name is `ChatWork`, but I want to use `chatwork` as filename
9
- RSpec/FilePath:
8
+ AllCops:
9
+ NewCops: enable
10
+ SuggestExtensions: false
11
+ TargetRubyVersion: 2.6
12
+ Exclude:
13
+ - 'gemfiles/vendor/**/*'
14
+
15
+ # c.f. https://github.com/rubocop-hq/rubocop/blob/v0.79.0/config/default.yml#L60-L64
16
+ - 'node_modules/**/*'
17
+ - 'tmp/**/*'
18
+ - 'vendor/**/*'
19
+ - '.git/**/*'
20
+
21
+ Layout/HashAlignment:
22
+ EnforcedColonStyle: table
23
+
24
+ Lint/BinaryOperatorWithIdenticalOperands:
10
25
  Enabled: false
11
26
 
12
27
  Metrics/ParameterLists:
13
28
  Max: 6
29
+
30
+ # module name is `ChatWork`, but I want to use `chatwork` as filename
31
+ RSpec/FilePath:
32
+ Enabled: false
33
+
34
+ RSpec/MultipleExpectations:
35
+ Enabled: false
36
+
37
+ RSpec/MultipleMemoizedHelpers:
38
+ Enabled: false
39
+
40
+ RSpec/SharedExamples:
41
+ Enabled: false
42
+
43
+ Style/KeywordParametersOrder:
44
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,6 +1,30 @@
1
1
  # Change Log
2
2
  ## Unreleased
3
- [Full Changelog](https://github.com/asonas/chatwork-ruby/compare/v0.12.0...master)
3
+ [Full Changelog](https://github.com/asonas/chatwork-ruby/compare/v1.0.0...master)
4
+
5
+ ## v1.0.0
6
+ [Full Changelog](https://github.com/asonas/chatwork-ruby/compare/v0.12.3...v1.0.0)
7
+
8
+ * :bomb: **[BREAKING CHANGE]** Support faraday v2+ and drop support ruby < 2.6
9
+ * https://github.com/asonas/chatwork-ruby/pull/78
10
+
11
+ ## v0.12.3
12
+ [Full Changelog](https://github.com/asonas/chatwork-ruby/compare/v0.12.2...v0.12.3)
13
+
14
+ * Enable MFA requirement for gem releasing
15
+ * https://github.com/asonas/chatwork-ruby/pull/75
16
+
17
+ ## v0.12.2
18
+ [Full Changelog](https://github.com/asonas/chatwork-ruby/compare/v0.12.1...v0.12.2)
19
+
20
+ * Support faraday v1.0
21
+ * https://github.com/asonas/chatwork-ruby/pull/70
22
+
23
+ ## v0.12.1
24
+ [Full Changelog](https://github.com/asonas/chatwork-ruby/compare/v0.12.0...v0.12.1)
25
+
26
+ * Fixed. set status code and body when unexpected error is occurred
27
+ * https://github.com/asonas/chatwork-ruby/pull/68
4
28
 
5
29
  ## v0.12.0
6
30
  [Full Changelog](https://github.com/asonas/chatwork-ruby/compare/v0.11.0...v0.12.0)
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"
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Ruby bindings of ChatWork API
4
4
 
5
5
  [![Gem Version](https://badge.fury.io/rb/chatwork.svg)](https://badge.fury.io/rb/chatwork)
6
- [![Build Status](https://travis-ci.org/asonas/chatwork-ruby.svg?branch=master)](https://travis-ci.org/asonas/chatwork-ruby)
6
+ [![Build Status](https://github.com/asonas/chatwork-ruby/workflows/test/badge.svg?branch=master)](https://github.com/asonas/chatwork-ruby/actions?query=workflow%3Atest)
7
7
  [![Coverage Status](https://coveralls.io/repos/github/asonas/chatwork-ruby/badge.svg?branch=master)](https://coveralls.io/github/asonas/chatwork-ruby)
8
8
 
9
9
  ## Installation
data/bin/console CHANGED
@@ -7,12 +7,12 @@ require "faraday_curl"
7
7
 
8
8
  Dotenv.load
9
9
 
10
- logger = Logger.new(STDOUT)
10
+ logger = Logger.new($stdout)
11
11
 
12
12
  @client = ChatWork::Client.new(api_key: ENV["CHATWORK_API_TOKEN"])
13
13
  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
data/chatwork.gemspec CHANGED
@@ -12,28 +12,36 @@ Gem::Specification.new do |spec|
12
12
  spec.homepage = "https://github.com/asonas/chatwork-ruby"
13
13
  spec.license = "MIT"
14
14
 
15
+ spec.metadata["homepage_uri"] = spec.homepage
16
+ spec.metadata["source_code_uri"] = spec.homepage
17
+ spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
18
+ spec.metadata["rubygems_mfa_required"] = "true"
19
+
15
20
  spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
16
21
  spec.executables = spec.files.grep(%r{^exe/}) {|f| File.basename(f) }
17
22
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
23
  spec.require_paths = ["lib"]
19
24
 
20
- spec.add_dependency "faraday", "~> 0.9"
21
- spec.add_dependency "faraday_middleware"
22
- spec.add_dependency "hashie"
25
+ spec.required_ruby_version = ">= 2.6.0"
26
+
27
+ spec.add_dependency "faraday", ">= 2.0.0"
28
+ spec.add_dependency "faraday-mashify"
29
+ spec.add_dependency "faraday-multipart"
23
30
 
24
31
  spec.add_development_dependency "activesupport"
25
32
  spec.add_development_dependency "bundler", ">= 1.3"
26
- spec.add_development_dependency "coveralls"
27
33
  spec.add_development_dependency "dotenv"
28
34
  spec.add_development_dependency "faraday_curl"
29
- spec.add_development_dependency "onkcop", "0.53.0.0"
30
- spec.add_development_dependency "pry-byebug"
35
+ spec.add_development_dependency "onkcop", "1.0.0.0"
31
36
  spec.add_development_dependency "rake"
32
37
  spec.add_development_dependency "rspec"
33
38
  spec.add_development_dependency "rspec-its"
34
39
  spec.add_development_dependency "rspec-parameterized"
35
- spec.add_development_dependency "rubocop", "0.53.0"
36
- spec.add_development_dependency "rubocop-rspec", "1.24.0"
40
+ spec.add_development_dependency "rubocop", "1.24.1"
41
+ spec.add_development_dependency "rubocop_auto_corrector"
42
+ spec.add_development_dependency "rubocop-rspec", "2.7.0"
43
+ spec.add_development_dependency "simplecov"
44
+ spec.add_development_dependency "simplecov-lcov"
37
45
  spec.add_development_dependency "webmock"
38
46
  spec.add_development_dependency "yard"
39
47
  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", "~> 2.0"
@@ -1,6 +1,3 @@
1
- require "faraday"
2
- require "faraday_middleware"
3
-
4
1
  module ChatWork
5
2
  class BaseClient
6
3
  include Converter
@@ -36,9 +33,16 @@ module ChatWork
36
33
 
37
34
  Faraday::Connection::METHODS.each do |method|
38
35
  define_method(method) do |url, args = {}, &block|
36
+ faraday_errors =
37
+ if Gem::Version.create(Faraday::VERSION) >= Gem::Version.create("1.0.0")
38
+ [Faraday::ClientError, Faraday::ServerError]
39
+ else
40
+ [Faraday::Error::ClientError]
41
+ end
42
+
39
43
  begin
40
- response = @conn.__send__(method, @api_version + url, hash_compact(args))
41
- rescue Faraday::Error::ClientError => e
44
+ response = @conn.__send__(method, @api_version + url, args.compact)
45
+ rescue *faraday_errors => e
42
46
  raise ChatWork::APIConnectionError.faraday_error(e)
43
47
  end
44
48
  payload = handle_response(response)
@@ -21,8 +21,7 @@ module ChatWork
21
21
  APIConnectionError.new("Invalid response #{body.to_hash} (status: #{status})")
22
22
  end
23
23
 
24
- attr_reader :status
25
- attr_reader :error_response
24
+ attr_reader :status, :error_response
26
25
 
27
26
  def initialize(message, status = nil, error_response = nil)
28
27
  @status = status
@@ -40,7 +39,12 @@ module ChatWork
40
39
 
41
40
  def initialize(message, original_error = nil)
42
41
  @original_error = original_error
43
- super(message)
42
+
43
+ if original_error && original_error.response.is_a?(Hash)
44
+ super(message, original_error.response[:status], original_error.response[:body])
45
+ else
46
+ super(message)
47
+ end
44
48
  end
45
49
  end
46
50
 
@@ -64,10 +68,10 @@ module ChatWork
64
68
  end
65
69
 
66
70
  def self.from_www_authenticate(www_authenticate:, status:, error_response:)
67
- www_authenticate =~ /error="([^\"]+)"/
71
+ www_authenticate =~ /error="([^"]+)"/
68
72
  error = Regexp.last_match(1)
69
73
 
70
- www_authenticate =~ /error_description="([^\"]+)"/
74
+ www_authenticate =~ /error_description="([^"]+)"/
71
75
  error_description = Regexp.last_match(1)
72
76
 
73
77
  AuthenticateError.new(
@@ -65,8 +65,8 @@ module ChatWork::Client::TaskMethods
65
65
  # }
66
66
  def create_task(room_id:, body:, to_ids:, limit: nil, limit_type: nil, &block)
67
67
  params = {
68
- body: body,
69
- to_ids: Array(to_ids).join(","),
68
+ body: body,
69
+ to_ids: Array(to_ids).join(","),
70
70
  limit_type: limit_type,
71
71
  }
72
72
  params[:limit] = limit.to_i if limit
@@ -1,9 +1,5 @@
1
1
  module ChatWork
2
2
  module Converter
3
- def hash_compact(hash)
4
- hash.reject {|_k, v| v.nil? }
5
- end
6
-
7
3
  def boolean_to_integer(value)
8
4
  case value
9
5
  when true
@@ -1,5 +1,5 @@
1
1
  module ChatWork
2
- class Multipart < ::Faraday::Request::Multipart
2
+ class Multipart < ::Faraday::Multipart::Middleware
3
3
  self.mime_type = "multipart/form-data".freeze
4
4
 
5
5
  def create_multipart(env, params)
@@ -17,7 +17,7 @@ module ChatWork
17
17
  end
18
18
 
19
19
  class EpiloguePart < ::Faraday::Parts::EpiloguePart
20
- def initialize(boundary)
20
+ def initialize(boundary) # rubocop:disable Lint/MissingSuper
21
21
  # NOTE: ChatWork doesn't accepts ending "\r\n\r\n" of payload...
22
22
  # @part = "--#{boundary}--\r\n\r\n"
23
23
  @part = "--#{boundary}--\r\n"
@@ -1,3 +1,3 @@
1
1
  module ChatWork
2
- VERSION = "0.12.0".freeze
2
+ VERSION = "1.0.0".freeze
3
3
  end
data/lib/chatwork.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  require "chatwork/version"
2
2
  require "hashie"
3
3
  require "faraday"
4
+ require "faraday/mashify"
5
+ require "faraday/multipart"
4
6
 
5
7
  module ChatWork
6
8
  autoload :BaseClient, "chatwork/base_client"
@@ -34,7 +36,7 @@ module ChatWork
34
36
  @client_secret = nil
35
37
 
36
38
  Faraday::Request.register_middleware(
37
- chatwork_multipart: -> { ChatWork::Multipart },
39
+ chatwork_multipart: ChatWork::Multipart,
38
40
  )
39
41
 
40
42
  class << self
@@ -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
@@ -13,7 +13,7 @@ describe ChatWork::OAuthClient::TokenMethods do
13
13
  context "when successful" do
14
14
  before do
15
15
  stub_request(:post, "https://oauth.chatwork.com/token").
16
- with(body: { "grant_type" => "refresh_token", "refresh_token" => refresh_token },
16
+ with(body: { "grant_type" => "refresh_token", "refresh_token" => refresh_token },
17
17
  headers: { "Authorization" => "Basic #{signature}", "Content-Type" => "application/x-www-form-urlencoded" }).
18
18
  to_return(status: 200, body: token.to_json, headers: { "Content-Type" => "application/json" })
19
19
  end
@@ -38,7 +38,7 @@ describe ChatWork::OAuthClient::TokenMethods do
38
38
  context "when failure" do
39
39
  before do
40
40
  stub_request(:post, "https://oauth.chatwork.com/token").
41
- with(body: { "grant_type" => "refresh_token", "refresh_token" => refresh_token },
41
+ with(body: { "grant_type" => "refresh_token", "refresh_token" => refresh_token },
42
42
  headers: { "Authorization" => "Basic #{signature}", "Content-Type" => "application/x-www-form-urlencoded" }).
43
43
  to_return(status: 401, body: body.to_json, headers: { "Content-Type" => "application/json" })
44
44
  end
@@ -14,6 +14,7 @@ describe ChatWork do
14
14
 
15
15
  it { should eq("https://api.chatwork.com/") }
16
16
  end
17
+
17
18
  describe "#api_base=" do
18
19
  before { ChatWork.api_base = "https://test.example.com/" }
19
20
 
@@ -22,12 +23,6 @@ describe ChatWork do
22
23
 
23
24
  it { should eq("https://test.example.com/") }
24
25
  end
25
-
26
- describe "#api_base" do
27
- subject { super().api_base }
28
-
29
- it { should eq("https://test.example.com/") }
30
- end
31
26
  end
32
27
 
33
28
  describe "#api_key" do
@@ -42,6 +37,7 @@ describe ChatWork do
42
37
 
43
38
  let(:test_token) { "chatwork_test_token" }
44
39
  before { ENV["CHATWORK_API_TOKEN"] = test_token }
40
+
45
41
  it { is_expected.to eq test_token }
46
42
  end
47
43
  end
@@ -58,6 +54,7 @@ describe ChatWork do
58
54
 
59
55
  let(:test_token) { "chatwork_test_token" }
60
56
  before { ENV["CHATWORK_ACCESS_TOKEN"] = test_token }
57
+
61
58
  it { is_expected.to eq test_token }
62
59
  end
63
60
  end
data/spec/spec_helper.rb CHANGED
@@ -1,8 +1,13 @@
1
1
  if ENV["CI"]
2
2
  require "simplecov"
3
- require "coveralls"
3
+ require "simplecov-lcov"
4
4
 
5
- SimpleCov.formatter = Coveralls::SimpleCov::Formatter
5
+ SimpleCov::Formatter::LcovFormatter.config do |c|
6
+ c.single_report_path = "coverage/lcov.info"
7
+ c.report_with_single_file = true
8
+ end
9
+
10
+ SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter
6
11
  SimpleCov.start do
7
12
  %w[spec].each do |ignore_path|
8
13
  add_filter(ignore_path)
@@ -17,15 +22,14 @@ require "chatwork"
17
22
  require "rspec-parameterized"
18
23
  require "rspec/its"
19
24
  require "webmock/rspec"
20
- require "pry"
21
25
  require "active_support/all"
22
26
 
23
27
  begin
24
28
  require "backport_dig"
25
- rescue LoadError # rubocop:disable Lint/HandleExceptions
29
+ rescue LoadError # rubocop:disable Lint/SuppressedException
26
30
  end
27
31
 
28
- Dir["#{__dir__}/support/**/*.rb"].each {|f| require f }
32
+ Dir["#{__dir__}/support/**/*.rb"].sort.each {|f| require f }
29
33
 
30
34
  def spec_dir
31
35
  Pathname(__dir__)
@@ -4,10 +4,10 @@ RSpec.shared_context :api_context, type: :api do
4
4
 
5
5
  let(:response_headers) do
6
6
  {
7
- "Content-Type" => "application/json",
8
- "X-RateLimit-Limit" => ratelimit_limit,
7
+ "Content-Type" => "application/json",
8
+ "X-RateLimit-Limit" => ratelimit_limit,
9
9
  "X-RateLimit-Remaining" => ratelimit_remaining,
10
- "X-RateLimit-Reset" => ratelimit_reset,
10
+ "X-RateLimit-Reset" => ratelimit_reset,
11
11
  }
12
12
  end
13
13
 
@@ -30,7 +30,7 @@ RSpec.shared_context :api_context, type: :api do
30
30
  unless query_example.empty?
31
31
  case expected_verb
32
32
  when :get, :delete
33
- query_string = "?" + query_example.to_query
33
+ query_string = "?#{query_example.to_query}"
34
34
  when :post, :put
35
35
  request_options[:headers]["Content-Type"] = "application/x-www-form-urlencoded"
36
36
  request_options[:body] = query_example.transform_values(&:to_s)
@@ -33,7 +33,7 @@ module RamlParser
33
33
  nil
34
34
  end
35
35
 
36
- def self.find_query_parameter_example(verb, path)
36
+ def self.find_query_parameter_example(verb, path) # rubocop:disable Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
37
37
  resource = find_resource(verb, path)
38
38
  return {} unless resource
39
39
 
metadata CHANGED
@@ -1,32 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chatwork
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - asonas
8
8
  - sue445
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-04-21 00:00:00.000000000 Z
12
+ date: 2022-01-08 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
- version: '0.9'
20
+ version: 2.0.0
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
- version: '0.9'
27
+ version: 2.0.0
28
28
  - !ruby/object:Gem::Dependency
29
- name: faraday_middleware
29
+ name: faraday-mashify
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - ">="
@@ -40,7 +40,7 @@ dependencies:
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
- name: hashie
43
+ name: faraday-multipart
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - ">="
@@ -81,20 +81,6 @@ dependencies:
81
81
  - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '1.3'
84
- - !ruby/object:Gem::Dependency
85
- name: coveralls
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- version: '0'
91
- type: :development
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - ">="
96
- - !ruby/object:Gem::Version
97
- version: '0'
98
84
  - !ruby/object:Gem::Dependency
99
85
  name: dotenv
100
86
  requirement: !ruby/object:Gem::Requirement
@@ -129,16 +115,16 @@ dependencies:
129
115
  requirements:
130
116
  - - '='
131
117
  - !ruby/object:Gem::Version
132
- version: 0.53.0.0
118
+ version: 1.0.0.0
133
119
  type: :development
134
120
  prerelease: false
135
121
  version_requirements: !ruby/object:Gem::Requirement
136
122
  requirements:
137
123
  - - '='
138
124
  - !ruby/object:Gem::Version
139
- version: 0.53.0.0
125
+ version: 1.0.0.0
140
126
  - !ruby/object:Gem::Dependency
141
- name: pry-byebug
127
+ name: rake
142
128
  requirement: !ruby/object:Gem::Requirement
143
129
  requirements:
144
130
  - - ">="
@@ -152,7 +138,7 @@ dependencies:
152
138
  - !ruby/object:Gem::Version
153
139
  version: '0'
154
140
  - !ruby/object:Gem::Dependency
155
- name: rake
141
+ name: rspec
156
142
  requirement: !ruby/object:Gem::Requirement
157
143
  requirements:
158
144
  - - ">="
@@ -166,7 +152,7 @@ dependencies:
166
152
  - !ruby/object:Gem::Version
167
153
  version: '0'
168
154
  - !ruby/object:Gem::Dependency
169
- name: rspec
155
+ name: rspec-its
170
156
  requirement: !ruby/object:Gem::Requirement
171
157
  requirements:
172
158
  - - ">="
@@ -180,7 +166,7 @@ dependencies:
180
166
  - !ruby/object:Gem::Version
181
167
  version: '0'
182
168
  - !ruby/object:Gem::Dependency
183
- name: rspec-its
169
+ name: rspec-parameterized
184
170
  requirement: !ruby/object:Gem::Requirement
185
171
  requirements:
186
172
  - - ">="
@@ -194,7 +180,21 @@ dependencies:
194
180
  - !ruby/object:Gem::Version
195
181
  version: '0'
196
182
  - !ruby/object:Gem::Dependency
197
- name: rspec-parameterized
183
+ name: rubocop
184
+ requirement: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - '='
187
+ - !ruby/object:Gem::Version
188
+ version: 1.24.1
189
+ type: :development
190
+ prerelease: false
191
+ version_requirements: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - '='
194
+ - !ruby/object:Gem::Version
195
+ version: 1.24.1
196
+ - !ruby/object:Gem::Dependency
197
+ name: rubocop_auto_corrector
198
198
  requirement: !ruby/object:Gem::Requirement
199
199
  requirements:
200
200
  - - ">="
@@ -208,33 +208,47 @@ dependencies:
208
208
  - !ruby/object:Gem::Version
209
209
  version: '0'
210
210
  - !ruby/object:Gem::Dependency
211
- name: rubocop
211
+ name: rubocop-rspec
212
212
  requirement: !ruby/object:Gem::Requirement
213
213
  requirements:
214
214
  - - '='
215
215
  - !ruby/object:Gem::Version
216
- version: 0.53.0
216
+ version: 2.7.0
217
217
  type: :development
218
218
  prerelease: false
219
219
  version_requirements: !ruby/object:Gem::Requirement
220
220
  requirements:
221
221
  - - '='
222
222
  - !ruby/object:Gem::Version
223
- version: 0.53.0
223
+ version: 2.7.0
224
224
  - !ruby/object:Gem::Dependency
225
- name: rubocop-rspec
225
+ name: simplecov
226
226
  requirement: !ruby/object:Gem::Requirement
227
227
  requirements:
228
- - - '='
228
+ - - ">="
229
229
  - !ruby/object:Gem::Version
230
- version: 1.24.0
230
+ version: '0'
231
231
  type: :development
232
232
  prerelease: false
233
233
  version_requirements: !ruby/object:Gem::Requirement
234
234
  requirements:
235
- - - '='
235
+ - - ">="
236
236
  - !ruby/object:Gem::Version
237
- version: 1.24.0
237
+ version: '0'
238
+ - !ruby/object:Gem::Dependency
239
+ name: simplecov-lcov
240
+ requirement: !ruby/object:Gem::Requirement
241
+ requirements:
242
+ - - ">="
243
+ - !ruby/object:Gem::Version
244
+ version: '0'
245
+ type: :development
246
+ prerelease: false
247
+ version_requirements: !ruby/object:Gem::Requirement
248
+ requirements:
249
+ - - ">="
250
+ - !ruby/object:Gem::Version
251
+ version: '0'
238
252
  - !ruby/object:Gem::Dependency
239
253
  name: webmock
240
254
  requirement: !ruby/object:Gem::Requirement
@@ -272,11 +286,11 @@ extensions: []
272
286
  extra_rdoc_files: []
273
287
  files:
274
288
  - ".env.example"
289
+ - ".github/workflows/test.yml"
275
290
  - ".gitignore"
276
291
  - ".gitmodules"
277
292
  - ".rspec"
278
293
  - ".rubocop.yml"
279
- - ".travis.yml"
280
294
  - ".yardopts"
281
295
  - CHANGELOG.md
282
296
  - Gemfile
@@ -285,6 +299,7 @@ files:
285
299
  - Rakefile
286
300
  - bin/console
287
301
  - chatwork.gemspec
302
+ - gemfiles/faraday_2.gemfile
288
303
  - lib/chatwork.rb
289
304
  - lib/chatwork/base_client.rb
290
305
  - lib/chatwork/chatwork_error.rb
@@ -355,8 +370,12 @@ files:
355
370
  homepage: https://github.com/asonas/chatwork-ruby
356
371
  licenses:
357
372
  - MIT
358
- metadata: {}
359
- post_install_message:
373
+ metadata:
374
+ homepage_uri: https://github.com/asonas/chatwork-ruby
375
+ source_code_uri: https://github.com/asonas/chatwork-ruby
376
+ changelog_uri: https://github.com/asonas/chatwork-ruby/blob/master/CHANGELOG.md
377
+ rubygems_mfa_required: 'true'
378
+ post_install_message:
360
379
  rdoc_options: []
361
380
  require_paths:
362
381
  - lib
@@ -364,15 +383,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
364
383
  requirements:
365
384
  - - ">="
366
385
  - !ruby/object:Gem::Version
367
- version: '0'
386
+ version: 2.6.0
368
387
  required_rubygems_version: !ruby/object:Gem::Requirement
369
388
  requirements:
370
389
  - - ">="
371
390
  - !ruby/object:Gem::Version
372
391
  version: '0'
373
392
  requirements: []
374
- rubygems_version: 3.0.1
375
- signing_key:
393
+ rubygems_version: 3.3.3
394
+ signing_key:
376
395
  specification_version: 4
377
396
  summary: Ruby bindings of ChatWork API
378
397
  test_files:
data/.travis.yml DELETED
@@ -1,31 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.2
5
- - 2.3
6
- - 2.4
7
- - 2.5
8
- - 2.6
9
- - ruby-head
10
- bundler_args: "--jobs=2"
11
- cache: bundler
12
- before_install:
13
- - travis_retry gem update --system || travis_retry gem update --system 2.7.8
14
- - travis_retry gem install bundler --no-document || travis_retry gem install bundler --no-document -v 1.17.3
15
- script:
16
- - bundle exec rake spec
17
- - bundle exec rubocop
18
- branches:
19
- only:
20
- - master
21
- matrix:
22
- allow_failures:
23
- - rvm: ruby-head
24
- include:
25
- - rvm: 2.6
26
- env: RUBYOPT="--jit"
27
- - rvm: ruby-head
28
- env: RUBYOPT="--jit"
29
- env:
30
- global:
31
- secure: Ntdheemdu1GavPR/3kPfQg1tR13FTP0jE9KxsSKcG32VbIzM69l22OXXwYttFexMhA1dMNytv5bKGIszeiO+YjwzDXkcDHF7ZULc24epsGCOVfNax4g47Q+Lgt2kpAsx8V/8/SIpK7VeBhc2nPvhAKPjTZ8ddN2gLHk4wifLRFA=