Skip to content

Release v9.0.0

Choose a tag to compare

@bartes bartes released this 26 May 12:45
· 5 commits to master since this release
47c0523

BREAKING CHANGES:

  • Drop support for Ruby < 3.2
  • Drop legacy API endpoints and the matching DSL on Castle::Client:
    • Castle::API::Track, Castle::Client#track
    • Castle::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::ImpersonationFailed error class
  • Use Castle::API::Risk, Castle::API::Filter, Castle::API::Log (and the matching Castle::Client#risk / #filter / #log methods) instead.
  • Drop castle/support/hanami (only ever supported the long-EOL Hanami 1.x architecture) and castle/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) and Castle::Client#create_batch_list_items
  • Add Castle::API::Privacy::RequestData and Castle::API::Privacy::DeleteData (current POST / DELETE /v1/privacy/users) plus matching Castle::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.yml for the exact list
  • Migrate CI from CircleCI to GitHub Actions (specs.yml and lint.yml); the dormant CircleCI integration and stale checkout key are removed
  • Replace appraisal with hand-maintained gemfiles/*.gemfile (Rails 7.0, 7.1, 7.2, 8.0, 8.1)
  • Switch from RVM-style .ruby-gemset to asdf-style .tool-versions
  • Modernize .rubocop.yml: drop deprecated prettier inherit, target Ruby 3.2, add rubocop-rake
  • Drop deprecated coveralls_reborn; rely on simplecov directly
  • Drop byebug dev dependency in favor of stdlib debug
  • 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 / Log no longer crash with NoMethodError when options[:user] is missing — closes #279. Filter additionally falls back to matching_user_id.
  • The same hardening is applied to the Castle::Client#filter / #risk / #log do-not-track path, which previously crashed with the same shape when tracking was disabled and the payload had no :user block.
  • A per-call Castle::Configuration passed via Castle::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::GetConnection now sets both open_timeout and read_timeout from request_timeout, so slow TCP/TLS handshakes hit the configured budget instead of falling back to Net::HTTP's 60 s default.