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

dblock / grape / 24016385370 / 14
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: add-agents-md
DEFAULT BRANCH: master
Ran 06 Apr 2026 02:35AM UTC
Files 150
Run time 6s
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

06 Apr 2026 02:34AM UTC coverage: 95.612%. First build
24016385370.14

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>

1050 of 1162 branches covered (90.36%)

Branch coverage included in aggregate %.

3308 of 3396 relevant lines covered (97.41%)

1035.42 hits per line

Source Files on job run-4.0-Gemfile - 24016385370.14
  • Tree
  • List 150
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 24016385370
  • d5102621 on github
  • Delete
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