Skip to content

Release 9.2.0: slim down default context, drop ClientId service and CASTLE_API_SECRET auto-load#287

Open
bartes wants to merge 3 commits into
developfrom
9.1.1
Open

Release 9.2.0: slim down default context, drop ClientId service and CASTLE_API_SECRET auto-load#287
bartes wants to merge 3 commits into
developfrom
9.1.1

Conversation

@bartes

@bartes bartes commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

The default request context built by Castle::Context::GetDefault now carries only headers, ip and library; the client_id, active, user_agent and locale fields are removed. The configuration also no longer auto-loads the API secret from the environment.

Changes

  • Default context is now { headers:, ip:, library: }.
  • Remove the internal Castle::ClientId::Extract service (class + spec) and its lib/castle.rb require.
  • Castle::Context::GetDefault#initialize now takes only request (the cookies argument and unused ivars are gone); Context::Prepare is updated accordingly. The cookies option on Castle::Client.from_request / Castle::Context::Prepare.call is retained but no longer used.
  • Stop reading Castle.api_secret from the CASTLE_API_SECRET environment variable on Configuration#reset; it now defaults to '' and must be set explicitly.
  • Update the affected specs.
  • Bump VERSION to 9.2.0, refresh Gemfile.lock, and add the CHANGELOG entry.

bartes added 2 commits June 1, 2026 13:46
Reduce the default request context to headers, ip and library, and remove
the now-unused Castle::ClientId::Extract service plus the cookies plumbing
in Castle::Context::GetDefault. The dropped context fields (client_id,
active, user_agent, locale) are already derivable from headers.
The default configuration no longer auto-loads Castle.api_secret from the
CASTLE_API_SECRET environment variable; set it explicitly instead. Bump the
version to 9.2.0 since this changes the public configuration behavior.
@bartes bartes closed this Jun 9, 2026
@bartes bartes deleted the 9.1.1 branch June 9, 2026 12:32
@bartes bartes changed the title Release 9.1.1: slim down default context, drop ClientId service Release 9.2.0: slim down default context, drop ClientId service and CASTLE_API_SECRET auto-load Jun 9, 2026
@bartes bartes restored the 9.1.1 branch June 9, 2026 12:35
@bartes bartes reopened this Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant