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

ruby-grape / grape / 28378346436 / 30
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: robust_mounted_app_comparison
DEFAULT BRANCH: master
Ran 29 Jun 2026 02:13PM UTC
Files 167
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

29 Jun 2026 02:11PM UTC coverage: 95.14% (+0.007%) from 95.133%
28378346436.30

Pull #2773

github

ericproulx
Fix middleware build crash when a top-level ::Options is in scope

Grape::Middleware::Base#initialize used self.class.const_defined?(:Options),
whose default inherit: true reaches top-level constants on Object. When any
loaded gem defines a global ::Options (e.g. the `options` gem, a transitive
dependency of progress_bar), the guard returned true for every middleware
subclass, but `self.class::Options` then raised NameError because the `::`
resolution operator does not fall back to Object. This took down the whole
middleware stack for third-party middleware that does not declare its own
Options (e.g. grape_logging's RequestLogger).

Resolve the constant via a new options_const_owner helper that walks the
ancestry with const_defined?(name, false) and stops at Object, so middleware
inheritance (e.g. Versioner::Path -> Versioner::Base) keeps working without
matching unrelated globals. Apply the same fix to the DEFAULT_OPTIONS path,
which had the identical defect.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pull Request #2773: Fix middleware build crash when a top-level ::Options constant is in scope

1105 of 1228 branches covered (89.98%)

Branch coverage included in aggregate %.

3535 of 3649 relevant lines covered (96.88%)

963.58 hits per line

Source Files on job run-3.3-gemfiles/rails_8_1.gemfile - 28378346436.30
  • Tree
  • List 167
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 28378346436
  • cb4b958e on github
  • Prev Job for on fix-options-const-defined-object-fallback (#28321497933.16)
  • Next Job for on fix-options-const-defined-object-fallback (#28378915412.32)
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