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

ruby-grape / grape / 29192506145 / 25
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: fix/base-only-rescue-handlers
DEFAULT BRANCH: master
Ran 12 Jul 2026 12:25PM UTC
Files 167
Run time 7s
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

12 Jul 2026 12:22PM UTC coverage: 95.206% (+0.006%) from 95.2%
29192506145.25

Pull #2793

github

ericproulx
Add Grape::Mountable marker to identify a Grape app

Grape distinguished a mounted Grape app from a bare Rack app by duck-typing
on an incidental internal method (`respond_to?(:inheritable_setting)`).
That is brittle: Grape::API and Grape::API::Instance share no common
ancestor and don't even respond to the same methods (mount_instance vs
inheritable_setting/endpoints), so there was no single predicate and the
checks keyed on a settings method that has nothing to do with mountability.

Introduce a Grape::Mountable marker extended by both Grape::API and
Grape::API::Instance, giving one explicit `is_a?(Grape::Mountable)`
predicate. Route the identity checks through it: Endpoint#bare_rack_app?
(used for forward_match) and the mount branch in DSL::Routing.

Capability checks that go on to call a stage-specific method are left as
respond_to? on purpose (a Mountable does not respond to every such method):
`respond_to?(:mount_instance)` still gates the remountable-class stage,
`respond_to?(:endpoints)` still guards reading endpoints, and the settings
inheritance check still guards calling inheritable_setting.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pull Request #2793: Add Grape::Mountable marker to identify a Grape app

1101 of 1220 branches covered (90.25%)

Branch coverage included in aggregate %.

3546 of 3661 relevant lines covered (96.86%)

970.42 hits per line

Source Files on job run-4.0-gemfiles/rack_3_2.gemfile - 29192506145.25
  • Tree
  • List 167
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 29192506145
  • 673db3a8 on github
  • Prev Job for on refactor/mountable-marker (#28782563800.3)
  • Next Job for on refactor/mountable-marker (#29198513526.7)
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