Skip to content

Keep within_namespace as part of our internal api #2595

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 23, 2025

Conversation

ericproulx
Copy link
Contributor

Clarify within_namespace visibility; remove legacy namespace_start/namespace_end

Motivation

  • Keep within_namespace as a private, internal helper for scoping settings safely.
  • Remove references to legacy namespace_start/namespace_end to simplify internals and tests.

Changes

  • within_namespace remains private in Grape::DSL::Settings and continues to be used internally by DSL methods (e.g., namespace, version, scope).
  • Clean up and refactor related code/comments; adjust specs to exercise namespacing behavior without relying on legacy helpers.
  • Minor updates in lib/grape/dsl/settings.rb and corresponding specs.

Impact

  • No public API change; typical namespace usage is unaffected.
  • If any external code was calling internal helpers directly, that usage is unsupported and may need to rely on public DSL (namespace, group, resources, etc.).

Tests

  • Specs updated to reflect internal scoping behavior while keeping within_namespace private; removed legacy helper references.

…publicly. Also remove `namespace_start` and `namespace_end`
@ericproulx ericproulx force-pushed the private_within_namespace branch from 5340722 to 79e1da7 Compare August 21, 2025 13:34
@ericproulx ericproulx marked this pull request as ready for review August 21, 2025 13:34
@ericproulx ericproulx requested a review from dblock August 21, 2025 13:34
@dblock dblock merged commit 829c254 into master Aug 23, 2025
93 checks passed
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.

2 participants