This repository was archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
Update faraday dependency to support faraday 2.x #42
Merged
Bossa573
merged 2 commits into
AfterShip:master
from
JoinRaylo:update-faraday-dependency
Dec 13, 2022
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ Gem::Specification.new do |s| | |
s.licenses = ['MIT'] | ||
s.summary = 'Formerly known as aftership_ruby and a wrapper for AfterShip API. Support the latest V3/V4 API' | ||
s.description = 'Developed for easy integration with AfterShip' | ||
s.required_ruby_version = '>= 2.3.0' | ||
s.required_ruby_version = '>= 2.6' | ||
|
||
s.author = ['AfterShip Limited'] | ||
s.email = ['[email protected]'] | ||
|
@@ -15,8 +15,7 @@ Gem::Specification.new do |s| | |
s.require_paths = ['lib'] | ||
s.requirements << 'none' | ||
|
||
s.add_dependency 'faraday', '~> 1.0', '>= 1.0.1' | ||
s.add_dependency 'faraday_middleware', '~> 1.0' | ||
s.add_dependency 'faraday', '>= 2.0.0' | ||
|
||
s.add_development_dependency 'pry' | ||
s.add_development_dependency 'rspec', '~> 2.14.1' | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
require 'faraday' | ||
require 'faraday_middleware' | ||
|
||
module AfterShip | ||
module V4 | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
require 'spec_helper' | ||
|
||
describe AfterShip::V4::Base do | ||
let(:http_verb_method) { 'get' } | ||
let(:http_verb_method) { :get } | ||
let(:end_point) { 'trackings' } | ||
let(:params) { { courier: 'usps' } } | ||
let(:query) { { courier: 'usps' } } | ||
let(:body) { { emails: ['[email protected]'] } } | ||
subject { described_class.new(http_verb_method, end_point, params, body) } | ||
subject { described_class.new(http_verb_method, end_point, query, body) } | ||
|
||
its(:body) { should(eq(body)) } | ||
its(:params) { should(eq(params)) } | ||
its(:query) { should(eq(query)) } | ||
its(:end_point) { should(eq(end_point)) } | ||
its(:http_verb_method) { should(eq(http_verb_method)) } | ||
|
||
|
@@ -24,7 +24,7 @@ | |
#HTTPI.logger.should_receive(:warn).with("the emails field should be an array").once | ||
#HTTPI.logger.should_receive(:warn).with('the smses field should be an array').once | ||
|
||
#HTTPI.should_receive(:send).with(:get, kind_of(HTTPI::Request)).and_return(response) | ||
# HTTPI.should_receive(:send).with(:get, kind_of(HTTPI::Request)).and_return(response) | ||
subject.call | ||
end | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.