Users having to deal with multiple Airship servers (EU/US) on the same machine can't use this gem since you can only configure the server globally, not on a request-basis.
This PR adds this functionality by adding a new optional server parameter to the Client initializer.
Additional notes for reviewers
No breaking change for current users of the Gem
One of the existing specs wasn't testing anything: it's been fixed
Please read commit by commit, otherwise it will be complicated to follow
Here is a description of the commits to help you review the PR:
I've added some specs on Client and PageIterator to prepare my refactoring
To prepare my next change, I've refactored PageIterator to improve readability
I've added a new next_page_path attribute to PageIterator which permits initialising the iteration with a "path" instead of an "url" (preparation for the next commits)
I've changed all the xxx_url methods into xxx_path
Small refactoring on a misleading method name
Finally, add the optional server parameter to the Client initializer ✌️
Bonus: fixed highlights of the README
Testing
I wrote tests covering these changes
I've tested for Ruby version 2.6.0
Airship Contribution Agreement
I've filled out and signed Airship's contribution agreement form.
What does this do and why?
Users having to deal with multiple Airship servers (EU/US) on the same machine can't use this gem since you can only configure the server globally, not on a request-basis.
This PR adds this functionality by adding a new optional
server
parameter to theClient
initializer.Additional notes for reviewers
Here is a description of the commits to help you review the PR:
Client
andPageIterator
to prepare my refactoringPageIterator
to improve readabilitynext_page_path
attribute toPageIterator
which permits initialising the iteration with a "path" instead of an "url" (preparation for the next commits)xxx_url
methods intoxxx_path
server
parameter to the Client initializer ✌️Testing
Airship Contribution Agreement