Repository navigation
Modernize dependencies, add MIT license, and automate releases - #11
Merged
Merged
Conversation
Bring the gem's dependency chain up to date and add the plumbing needed to publish it. Dependencies: - Require omniauth ~> 2.0 and omniauth-oauth2 ~> 1.9 (oauth2 2.0.25), up from an unpinned omniauth-oauth2 that resolved to omniauth 1.9 / oauth2 1.4. This is breaking for host applications, hence the 0.1.0 bump. - Pin the token endpoint to auth_scheme: :request_body. oauth2 2.0 changed its default to :basic_auth, which would have moved client_id/client_secret out of the token request body and changed what ShipBob receives. - Ruby >= 3.2, Bundler 4, rake ~> 13.0, rspec ~> 3.13. The 3.2 floor comes from multi_xml and public_suffix in the resolved set. - Move development dependencies from the gemspec to the Gemfile and drop bundler as a development dependency. Strategy and specs: - Build the channel endpoint from the api_url option added in #10, via a channel_url helper that tolerates a trailing slash on the configured value. - Grow the suite from 3 to 19 examples covering the request phase, the token exchange, the redirect_uri override from #7 and the auth hash, against both the production and sandbox hosts. - Log channel lookup failures instead of discarding them silently. Packaging and release: - Add LICENSE.txt (MIT) and declare it in the gemspec. - Stop packaging bin/ as gem executables and keep development files out of the built gem. - Replace Travis CI with GitHub Actions, testing Ruby 3.2 through 3.4. - Add a Release workflow: pushing a v* tag reruns the matrix, verifies the tag against version.rb, publishes via RubyGems trusted publishing and opens a GitHub release from CHANGELOG.md. - Fix bin/console requiring a non-existent omniauth/fdc file. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
The gem still worked, but its dependency chain was from 2020 and the toolchain no longer
ran on a modern Ruby — the pinned Bundler 1.17.3 crashes on Ruby 3.2+ (
untaintwasremoved). This brings the dependencies current, adds a license, and automates releases.
~> 1.9Version goes to 0.1.0 — requiring OmniAuth 2 is breaking for host applications.
The one behavior change worth reviewing closely
oauth22.0.0 flipped the defaultauth_schemefrom:request_bodyto:basic_auth,which silently moves
client_id/client_secretout of the token request body and into anAuthorization header. The strategy now pins
auth_scheme: :request_bodyso ShipBob's/connect/tokenkeeps receiving exactly what it received before, with a spec asserting it.Configurable API endpoint
Builds on the
api_urloption from #10 with achannel_urlhelper, so the channel lookupfollows the configured host and a trailing slash on
api_urlno longer produces//channel. Sandbox configuration from the README works unchanged.Tests
3 → 19 examples. The old specs only asserted two option strings; they would have passed
straight through the
auth_schemechange above. The new ones drive the real request phase,token exchange and callback through
rack-test+webmock, including:authstage.shipbob.comwhilethe channel lookup hits
sandbox-api.shipbob.com/2.0redirect_urifrom override callback url method to avoid sending query params from given… #7, which an OmniAuth 2 upgrade could easilyhave regressed
Releases
Travis (
rvm: 2.4.4) is replaced by two workflows.ci.ymlruns the matrix on push/PR andis exposed via
workflow_call;release.ymlconsumes it so nothing publishes untested.Cutting a release is a tag push:
Auth is RubyGems trusted publishing (OIDC), not a stored API key — necessary because
the gemspec sets
rubygems_mfa_required, andgem pushwith an API key would prompt for anOTP and hang in CI.
The workflow also fails fast if the tag and
version.rbdisagree. Without that guard,tagging
v0.1.1against aversion.rbof0.1.0would publish 0.1.0 and then try tocreate a second tag.
Before releases will work
Create, with owner
dropstream, repositoryomniauth-shipbob, workflowrelease.yml, environmentrelease. Until this exists the publish step fails auth.commit, so the first
v*tag must already containrelease.yml.Notes
multi_xml 0.9.1andpublic_suffix 7.0.5in theresolved set both require
>= 3.2, so a 3.1 job would fail atbundle installratherthan on our code. 3.1 has also been EOL since March 2025.
LICENSE.txt(MIT,Copyright (c) 2019-2026 Dropstream) and declares it in thegemspec. Flagging the license choice explicitly in case Dropstream standardizes on
something else.
README.md,CHANGELOG.md,LICENSE.txt, the gemspecand
lib/— previouslybin/setupandbin/consolewere at risk of being installed asexecutables on consumers' PATH.
omniauth-2.1.0,rack-3.0.4.1,rake-tw-13.0) aresuperseded by this and can be closed.
Verification
bundle exec rake→ 19 examples, 0 failures on Ruby 3.4.8 / Bundler 4.0.18gem buildwarning-free; clean-roomgem installof the built gem loads and reportsauth_scheme=request_bodyactionlintwas not available locally, so the action schemasare unverified until the first run
🤖 Generated with Claude Code