• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dblock / grape
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: add-agents-md
DEFAULT BRANCH: master
Repo Added 15 Jun 2022 03:04AM UTC
Token vwfxnsYI15eHhSbtL461xDH074PQ5mN6f regen
Build 32 Last
Files 151
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH fix/auth-base-subclass-issue-2669
branch: fix/auth-base-subclass-issue-2669
CHANGE BRANCH
x
Reset
Sync Branches
  • fix/auth-base-subclass-issue-2669
  • add-agents-md
  • fix-badges
  • funding
  • master
  • migrate-danger-pr-comment
  • rack-version-specs
  • simplify-workflow

06 Apr 2026 02:34AM UTC coverage: 96.783%. First build
24016385370

push

github

dblock
Fix UnknownAuthStrategy raised when custom auth strategy inherits from Grape::Middleware::Auth::Base

When a custom auth strategy class inherits from Grape::Middleware::Auth::Base
and is registered via Grape::Middleware::Auth::Strategies.add, it would raise
Grape::Exceptions::UnknownAuthStrategy with a blank strategy name upon being
instantiated by StrategyInfo#create.

The root cause: PR #2563 moved the strategy lookup from request-time (_call)
to initialization-time (initialize). When StrategyInfo#create instantiates
the custom class via auth_class.new(app) (without options), the inherited
initialize tries to look up options[:type] which is nil, causing the error.

The fix: guard the strategy lookup so it only runs when :type is present in
options. This preserves compile-time validation for the outer middleware
wrapper while allowing subclasses to be instantiated as actual strategies.

Fixes #2669.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

1073 of 1164 branches covered (92.18%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

3349 of 3405 relevant lines covered (98.36%)

33087.89 hits per line

Relevant lines Covered
Build:
Build:
3405 RELEVANT LINES 3349 COVERED LINES
33087.89 HITS PER LINE
Source Files on fix/auth-base-subclass-issue-2669
  • Tree
  • List 151
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
24016385370 fix/auth-base-subclass-issue-2669 Fix UnknownAuthStrategy raised when custom auth strategy inherits from Grape::Middleware::Auth::Base When a custom auth strategy class inherits from Grape::Middleware::Auth::Base and is registered via Grape::Middleware::Auth::Strategies.add, it w... push 06 Apr 2026 02:34AM UTC dblock github
96.78
See All Builds (19)

Badge your Repo: grape

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

Refresh
  • Settings
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc