Release v9.0.0
BREAKING CHANGES:
- Drop support for Ruby < 3.2
- Drop legacy API endpoints and the matching DSL on
Castle::Client:Castle::API::Track,Castle::Client#trackCastle::API::Authenticate,Castle::Client#authenticate- Device endpoints:
Castle::API::ApproveDevice,Castle::API::GetDevice,Castle::API::GetDevicesForUser,Castle::API::ReportDevice - Impersonation endpoints:
Castle::API::StartImpersonation,Castle::API::EndImpersonation,Castle::Client#start_impersonation,Castle::Client#end_impersonation - Removed
Castle::ImpersonationFailederror class
- Use
Castle::API::Risk,Castle::API::Filter,Castle::API::Log(and the matchingCastle::Client#risk/#filter/#logmethods) instead. - Drop
castle/support/hanami(only ever supported the long-EOL Hanami 1.x architecture) andcastle/support/padrino(negligible adoption). The 3-line replacement is documented in the README.
Enhancements:
- Add
Castle::API::ListItems::CreateBatch(POST /v1/lists/{list_id}/items/batch) andCastle::Client#create_batch_list_items - Add
Castle::API::Privacy::RequestDataandCastle::API::Privacy::DeleteData(currentPOST/DELETE /v1/privacy/users) plus matchingCastle::Client#request_user_data/#delete_user_data— closes #261. The deprecated path-based variants are intentionally not exposed. - Add support for Ruby 3.4 and Rails 8.0 / 8.1. CI matrix runs nine representative Ruby × Rails combinations across Ruby 3.2/3.3/3.4 and Rails 7.0–8.1; see
.github/workflows/specs.ymlfor the exact list - Migrate CI from CircleCI to GitHub Actions (
specs.ymlandlint.yml); the dormant CircleCI integration and stale checkout key are removed - Replace
appraisalwith hand-maintainedgemfiles/*.gemfile(Rails 7.0, 7.1, 7.2, 8.0, 8.1) - Switch from RVM-style
.ruby-gemsetto asdf-style.tool-versions - Modernize
.rubocop.yml: drop deprecatedprettierinherit, target Ruby 3.2, addrubocop-rake - Drop deprecated
coveralls_reborn; rely onsimplecovdirectly - Drop
byebugdev dependency in favor of stdlibdebug - Add gem metadata (
source_code_uri,changelog_uri,bug_tracker_uri,rubygems_mfa_required) - Drop the dormant Coditsu CI integration
Bug fixes:
- Failover handlers in
Castle::API::Risk/Filter/Logno longer crash withNoMethodErrorwhenoptions[:user]is missing — closes #279.Filteradditionally falls back tomatching_user_id. - The same hardening is applied to the
Castle::Client#filter/#risk/#logdo-not-track path, which previously crashed with the same shape when tracking was disabled and the payload had no:userblock. - A per-call
Castle::Configurationpassed viaCastle::API::Risk.call(payload.merge(config: …))now correctly drives the underlying HTTP connection (host, port, timeouts, SSL) — previously only the request body honored it while the connection was always built from the global singleton. Castle::Core::GetConnectionnow sets bothopen_timeoutandread_timeoutfromrequest_timeout, so slow TCP/TLS handshakes hit the configured budget instead of falling back to Net::HTTP's 60 s default.