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

ruby-grape / grape / 24050758336 / 8
97%
master: 97%

Build:
DEFAULT BRANCH: master
Ran 06 Apr 2026 08:58PM UTC
Files 151
Run time 8s
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 08:53PM UTC coverage: 95.616% (+0.03%) from 95.591%
24050758336.8

push

github

web-flow
Fix UnknownAuthStrategy raised when custom auth strategy inherits from Grape::Middleware::Auth::Base (#2674)

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 %.

3312 of 3400 relevant lines covered (97.41%)

1034.66 hits per line

Source Files on job run-3.4-gemfiles/rails_8_0.gemfile - 24050758336.8
  • Tree
  • List 151
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 24050758336
  • 46384819 on github
  • Prev Job for on master (#24050692906.34)
  • Next Job for on master (#24050845896.15)
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