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

ruby-grape / grape / 28924669170 / 11
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: robust_mounted_app_comparison
DEFAULT BRANCH: master
Ran 08 Jul 2026 07:15AM UTC
Files 166
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

08 Jul 2026 07:14AM UTC coverage: 95.205% (+0.006%) from 95.199%
28924669170.11

Pull #2788

github

ericproulx
Compare the base API, not to_s, when refreshing a mounted app

`refresh_already_mounted` deduplicates endpoints for the "same" mounted
app by comparing `endpoint.mounted_app.to_s == app.to_s`. That only works
by accident: `mount` turns every mounted Grape API into a throwaway
`mount_instance` (a fresh `Class.new(@base_parent)` per mount), so two
mounts of the same API are distinct objects, and `Grape::API::Instance`
delegates `to_s` to its `@base` (the original API). The comparison is
really "same base API", done through a string proxy -- brittle (two APIs
that happen to share a name collide) and unclear.

Expose the base API via a reader and compare it by identity instead. Plain
Rack apps have no base and are mounted as-is, so they fall back to object
identity.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pull Request #2788: Compare the base API, not to_s, when refreshing a mounted app

1104 of 1224 branches covered (90.2%)

Branch coverage included in aggregate %.

3542 of 3656 relevant lines covered (96.88%)

974.14 hits per line

Source Files on job run-3.3-gemfiles/rack_3_0.gemfile - 28924669170.11
  • Tree
  • List 166
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 28924669170
  • 0aee2c21 on github
  • Prev Job for on robust_mounted_app_comparison (#28782563800.17)
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