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 Faraday v2 #22

Merged
merged 1 commit into from
Oct 24, 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
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
## Unreleased

- Require Faraday v2

## v1.4.0

- Migrate CI/CD platform from Travis CI to GitHub Actions
- Requires Ruby 3.0.0 or higher
- Require Ruby 3.0.0 or higher

## v1.3.5

Expand Down
1 change: 0 additions & 1 deletion lib/qiita.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
require "active_support/core_ext/string/inflections"
require "active_support/core_ext/string/strip"
require "faraday"
require "faraday_middleware"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

require "json"
require "rack/utils"
require "rainbow"
Expand Down
5 changes: 2 additions & 3 deletions qiita.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]

spec.add_dependency "activesupport"
spec.add_dependency "faraday", "~> 0.9"
spec.add_dependency "faraday_middleware"
spec.add_dependency 'faraday', '>= 2', '< 3'
spec.add_dependency "rack"
spec.add_dependency "rainbow"
spec.add_dependency "rouge"
Expand All @@ -27,5 +26,5 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "pry"
spec.add_development_dependency "rake"
spec.add_development_dependency "rspec"
spec.add_development_dependency "webmock", "1.20.4"
spec.add_development_dependency "webmock"
end
8 changes: 8 additions & 0 deletions spec/qiita/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,10 @@ def stub_api_request
204
end

let(:response_hash) do
nil
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Returns empty body response if 204 status code.

bblimke/webmock#190

And, Qiita PUT and DELETE APIs return a empty body.

JSON Schema(en): https://qiita.com/api/v2/schema?locale=en


include_examples "valid condition"
include_examples "sends request with JSON-encoded body"
end
Expand All @@ -362,6 +366,10 @@ def stub_api_request
204
end

let(:response_hash) do
nil
end

include_examples "valid condition"
include_examples "sends request with URL query"
end
Expand Down