Skip to content

Commit

Permalink
Merge pull request #19 from nipe0324/require-ruby-3.0.0-or-higher
Browse files Browse the repository at this point in the history
Require Ruby 3.0.0 or higher
  • Loading branch information
ohakutsu authored Oct 13, 2023
2 parents ea78c89 + 4fe390d commit be06228
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions lib/qiita/client.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require "uri"
require "qiita/resource_based_methods"
require "qiita/version"

Expand Down Expand Up @@ -152,7 +151,7 @@ def process(request_method, path, params, headers)
Qiita::Response.new(
connection.send(
request_method,
URI.escape(path),
path,
params,
headers,
)
Expand Down
2 changes: 1 addition & 1 deletion qiita.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
16 changes: 6 additions & 10 deletions spec/qiita/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def stub_api_request
end

let(:client) do
described_class.new(options)
described_class.new(**options)
end

let(:options) do
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit be06228

Please sign in to comment.