Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require Ruby 3.0.0 or higher #19

Merged
merged 2 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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