diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml index 5407641..b072daa 100644 --- a/.github/workflows/rspec.yml +++ b/.github/workflows/rspec.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v3 - uses: ruby/setup-ruby@v1 with: - ruby-version: '2.3.1' + ruby-version: '3.0.0' bundler-cache: true - run: gem install bundler -v '< 2.0' - run: bundle install diff --git a/CHANGELOG.md b/CHANGELOG.md index d8676a7..b6ed8c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Unreleased - Migrate CI/CD platform from Travis CI to GitHub Actions +- Requires Ruby 3.0.0 or higher ## v1.3.5 diff --git a/README.md b/README.md index 42ff77b..a14643c 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Qiita API v2 client library and CLI tool, written in Ruby. ## Install -Note: requires Ruby 2.0.0 or higher. +Note: requires Ruby 3.0.0 or higher. ```bash gem install qiita diff --git a/lib/qiita/client.rb b/lib/qiita/client.rb index 31e90d6..251916c 100644 --- a/lib/qiita/client.rb +++ b/lib/qiita/client.rb @@ -1,4 +1,3 @@ -require "uri" require "qiita/resource_based_methods" require "qiita/version" @@ -152,7 +151,7 @@ def process(request_method, path, params, headers) Qiita::Response.new( connection.send( request_method, - URI.escape(path), + path, params, headers, ) diff --git a/qiita.gemspec b/qiita.gemspec index ba81bdd..a1845e0 100644 --- a/qiita.gemspec +++ b/qiita.gemspec @@ -22,7 +22,7 @@ Gem::Specification.new do |spec| spec.add_dependency "rainbow" spec.add_dependency "rouge" spec.add_dependency "slop", "< 4.0.0" - spec.add_development_dependency "bundler", "~> 1.6" + spec.add_development_dependency "bundler", "~> 2.2" spec.add_development_dependency "json_schema" spec.add_development_dependency "pry" spec.add_development_dependency "rake" diff --git a/spec/qiita/client_spec.rb b/spec/qiita/client_spec.rb index f28ca3e..2f94279 100644 --- a/spec/qiita/client_spec.rb +++ b/spec/qiita/client_spec.rb @@ -49,7 +49,7 @@ def stub_api_request end let(:client) do - described_class.new(options) + described_class.new(**options) end let(:options) do @@ -116,11 +116,7 @@ def stub_api_request describe ".new" do subject do - described_class.new(*arguments) - end - - let(:arguments) do - [options] + described_class.new(**options) end let(:options) do @@ -133,9 +129,9 @@ def stub_api_request end end - context "without any arguments" do - let(:arguments) do - [] + context "without any options" do + let(:options) do + {} end include_examples "returns a Qiita::Client" end @@ -281,7 +277,7 @@ def stub_api_request end let(:requested_url) do - "https://#{requested_host}#{URI.escape(path)}" + "https://#{requested_host}#{CGI.escape(path)}" end it "sends request with escaped path" do