Repository navigation
Avoid auth-sanitizer top-level namespaces - #721
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #721 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 14 15 +1
Lines 553 559 +6
Branches 169 169
=========================================
+ Hits 553 559 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Coverage Report for CI Build 26186350871Coverage remained the same at 100.0%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
There was a problem hiding this comment.
Pull request overview
This PR updates the oauth2 gem’s integration with auth-sanitizer to avoid introducing top-level Auth / AuthSanitizer constants when require "oauth2" is executed, by loading auth-sanitizer through an internal isolated loader under the OAuth2 namespace.
Changes:
- Add
OAuth2::AUTH_SANITIZERinternal loader to isolateauth-sanitizerconstants. - Update references and docs from
Auth::SanitizertoOAuth2::AUTH_SANITIZER, while preservingOAuth2::FilteredAttributes. - Bump dependency minimum (
auth-sanitizer >= 0.1.3) and bump gem version to2.0.20, with corresponding lockfile and specs updates.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/oauth2/auth_sanitizer_spec.rb | Adds spec ensuring requiring oauth2 doesn’t define top-level Auth / AuthSanitizer, and preserves the alias contract. |
| spec/auth/sanitizer/thing_filter_spec.rb | Updates specs to reference sanitizer classes/modules via OAuth2::AUTH_SANITIZER. |
| oauth2.gemspec | Tightens auth-sanitizer dependency to require >= 0.1.3. |
| lib/oauth2/version.rb | Bumps gem version to 2.0.20. |
| lib/oauth2/filtered_attributes.rb | Keeps OAuth2::FilteredAttributes as an alias, now pointing to OAuth2::AUTH_SANITIZER. |
| lib/oauth2/client.rb | Updates logger filtering implementation and YARD docs to use OAuth2::AUTH_SANITIZER. |
| lib/oauth2/auth_sanitizer.rb | Introduces isolated loader implementation for auth-sanitizer under OAuth2::AUTH_SANITIZER. |
| lib/oauth2.rb | Switches from requiring auth/sanitizer to requiring the internal isolated loader and rewires label provider. |
| Gemfile.lock | Locks oauth2 at 2.0.20 and auth-sanitizer at 0.1.3. |
| CHANGELOG.md | Documents the change under [Unreleased]. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Testing
Fixes #720