Skip to content

Support Ruby 3.4 / 4.0 and fix CI - #629

Open
bhawsartanmay wants to merge 4 commits into
NetSweet:masterfrom
bhawsartanmay:ruby-4-support
Open

bhawsartanmay wants to merge 4 commits into
NetSweet:masterfrom
bhawsartanmay:ruby-4-support

Conversation

@bhawsartanmay

@bhawsartanmay bhawsartanmay commented Sep 24, 2026 •

Copy link
Copy Markdown

Summary

Gets the gem and its test suite working on Ruby 3.4 and 4.0, and gets CI green again.

On Ruby 4.0.5 the suite previously failed to boot (rake 12 needs ostruct); once booting, 97 examples failed. With this PR: 1218 examples, 0 failures on Ruby 3.0 – 4.0.

Changes

  • Stdlib gems no longer bundled by default — base64, logger and ostruct are used by the library (Passports::Token, Configuration#logger, MatrixOptionList) but were never required. They are now required in lib/netsuite.rb and declared as runtime dependencies.
  • Remove Object#blank? usage — Configuration#auth_header and DeleteList#success? called ActiveSupport's blank?, so they only worked when something else (e.g. Rails) had loaded it. This was the cause of 91 of the 97 failures. (Overlaps with Remove dependence on Object#blank? monkey patch #607.)
  • Utilities.netsuite_data_center_urls — the hardcoded 2017_2 WSDL has been retired by NetSuite (https://webservices.netsuite.com/wsdl/v2017_2_0/netsuite.wsdl now 302s to a not-found page), so this method fails for all users. Switched to 2025_1, verified against the live endpoint.
  • Login spec — the token-auth spec changed api_version, which resets the WSDL and made it fetch the retired remote WSDL. It now uses the local fixture.
  • Rake — relaxed to >= 12.3.3 (rake 12 requires ostruct). (Overlaps with Update rake requirement from ~> 12.3.3 to ~> 13.2.1 #610.)
  • CI
    • Matrix: added 3.3, 3.4, 4.0; dropped EOL 2.3 – 2.7. On those, resolved savon/httpi versions reference Rack::Utils::HeaderHash, removed in Rack 3, so they fail independently of this change.
    • fail-fast: false so one Ruby doesn't cancel the rest.
    • Added workflow_dispatch for manual runs.
  • HISTORY.md entries under Unreleased.

required_ruby_version is left unchanged.

Testing

- Require base64, logger and ostruct explicitly and declare them as
  runtime dependencies; they are no longer default gems on Ruby 4.0
- Replace ActiveSupport-only `blank?` calls in Configuration#auth_header
  and DeleteList#success? so the gem works outside Rails
- Point netsuite_data_center_urls at the 2025_1 WSDL; 2017_2 has been
  retired by NetSuite and now redirects to a 404 page
- Use the local WSDL fixture in the token-auth login spec instead of
  fetching a remote WSDL
- Allow rake >= 12.3.3 (rake 12 requires ostruct)
- Add Ruby 3.3, 3.4 and 4.0 to the CI matrix; disable fail-fast
Their resolved savon/httpi versions reference Rack::Utils::HeaderHash,
which was removed in Rack 3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant