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

ruby-grape / grape / 33320359178
97%
master: 100%

Build:
Build:
LAST BUILD BRANCH: fix/cascade-reader
DEFAULT BRANCH: master
Ran 30 Aug 2026 03:45PM UTC
Jobs 32
Files 168
Run time 1min
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

30 Aug 2026 03:40PM UTC coverage: 96.969% (-0.001%) from 96.97%
33320359178

Pull #2871

github

ericproulx
Keep `refresh_already_mounted` out of `mount`'s public signature

`mount` accepted an undocumented `refresh_already_mounted` option that
replaced any endpoint already mounted for the same base API instead of
adding a second one. The behaviour is essential — `Grape::API.refresh_mount_step`
replays every earlier mount when a class-level method runs after one, and
replaying without it duplicates the endpoint (a single `format :json` after
a mount turns 1 endpoint into 3) — but the decision belongs to the replay,
not to the call.

Its only legitimate caller, the private `refresh_mounted_api`, always passed
true, so the option existed solely to carry a constant from a private method
through a public one. Move the replacement into `refresh_mounted_api`, which
is possible because a mounted API's throwaway instance and the class that was
written share a base, the same signal `same_mounted_app?` already keys on.
Passing the option to `mount` warns and still works.

Two things fall out of no longer threading an internal flag through the
signature:

`mounts.respond_to?(:each_pair)` becomes `mounts.is_a?(Hash)`. A Struct and
an OpenStruct answer `each_pair` without being able to express an app => path
mapping, so a Rack app that happened to be one was read as a mapping and
mounted its own field value as a path. The normalisation is shared with the
endpoint replacement rather than written twice.

`*opts` becomes `opts = {}`. The splat could only ever hold one element, so
every read spelled `opts.any? ? opts.first[:key] : default`. It stays
positional: `mount` must declare no keywords, or Ruby routes the brace-less
Hash of `mount App => '/path'` to them and the mount itself goes missing.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Pull Request #2871: Keep `refresh_already_mounted` out of `mount`'s public signature

1230 of 1322 branches covered (93.04%)

Branch coverage included in aggregate %.

15 of 15 new or added lines in 1 file covered. (100.0%)

3889 of 3957 relevant lines covered (98.28%)

27175.63 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/rack_3_2.gemfile - 33320359178.1 30 Aug 2026 03:48PM UTC 167
95.71
GitHub Action Run
2 run-3.4-gemfiles/rack_3_0.gemfile - 33320359178.2 30 Aug 2026 03:47PM UTC 167
95.71
GitHub Action Run
3 run-4.0-gemfiles/rack_2_2.gemfile - 33320359178.3 30 Aug 2026 03:47PM UTC 167
95.68
GitHub Action Run
4 run-3.4-gemfiles/rack_3_1.gemfile - 33320359178.4 30 Aug 2026 03:45PM UTC 167
95.71
GitHub Action Run
5 run-3.3-gemfiles/rails_7_2.gemfile - 33320359178.5 30 Aug 2026 03:46PM UTC 168
95.72
GitHub Action Run
6 run-3.3-gemfiles/rack_3_2.gemfile - 33320359178.6 30 Aug 2026 03:47PM UTC 167
95.71
GitHub Action Run
7 run-3.3-gemfiles/rack_2_2.gemfile - 33320359178.7 30 Aug 2026 03:48PM UTC 167
95.68
GitHub Action Run
8 run-4.0-gemfiles/grape_swagger.gemfile - 33320359178.8 30 Aug 2026 03:45PM UTC 167
55.34
GitHub Action Run
9 run-4.0-Gemfile - 33320359178.9 30 Aug 2026 03:48PM UTC 167
95.71
GitHub Action Run
10 run-4.0-gemfiles/rack_3_1.gemfile - 33320359178.10 30 Aug 2026 03:47PM UTC 167
95.71
GitHub Action Run
11 run-3.4-gemfiles/rails_8_0.gemfile - 33320359178.11 30 Aug 2026 03:45PM UTC 168
95.72
GitHub Action Run
12 run-4.0-gemfiles/multi_xml.gemfile - 33320359178.12 30 Aug 2026 03:46PM UTC 167
46.9
GitHub Action Run
13 run-3.4-gemfiles/rack_2_2.gemfile - 33320359178.13 30 Aug 2026 03:48PM UTC 167
95.68
GitHub Action Run
14 run-4.0-gemfiles/rack_3_0.gemfile - 33320359178.14 30 Aug 2026 03:46PM UTC 167
95.71
GitHub Action Run
15 run-4.0-gemfiles/multi_xml_0_8.gemfile - 33320359178.15 30 Aug 2026 03:48PM UTC 167
46.94
GitHub Action Run
16 run-4.0-gemfiles/rails_7_2.gemfile - 33320359178.16 30 Aug 2026 03:48PM UTC 168
95.72
GitHub Action Run
17 run-3.4-gemfiles/rails_8_1.gemfile - 33320359178.17 30 Aug 2026 03:48PM UTC 168
95.72
GitHub Action Run
18 run-4.0-gemfiles/multi_json.gemfile - 33320359178.18 30 Aug 2026 03:48PM UTC 167
47.47
GitHub Action Run
19 run-3.4-gemfiles/rack_3_2.gemfile - 33320359178.19 30 Aug 2026 03:46PM UTC 167
95.71
GitHub Action Run
20 run-4.0-gemfiles/dry_validation.gemfile - 33320359178.20 30 Aug 2026 03:47PM UTC 167
57.94
GitHub Action Run
21 run-3.3-Gemfile - 33320359178.21 30 Aug 2026 03:47PM UTC 167
95.71
GitHub Action Run
22 run-4.0-gemfiles/hashie.gemfile - 33320359178.22 30 Aug 2026 03:45PM UTC 167
61.84
GitHub Action Run
23 run-3.3-gemfiles/rails_8_1.gemfile - 33320359178.23 30 Aug 2026 03:45PM UTC 168
95.72
GitHub Action Run
24 run-4.0-gemfiles/multi_json_1_20.gemfile - 33320359178.24 30 Aug 2026 03:46PM UTC 167
47.51
GitHub Action Run
25 run-3.4-Gemfile - 33320359178.25 30 Aug 2026 03:45PM UTC 167
95.71
GitHub Action Run
26 run-3.3-gemfiles/rack_3_1.gemfile - 33320359178.26 30 Aug 2026 03:46PM UTC 167
95.71
GitHub Action Run
27 run-4.0-gemfiles/rails_8_0.gemfile - 33320359178.27 30 Aug 2026 03:45PM UTC 168
95.7
GitHub Action Run
28 run-4.0-gemfiles/rails_8_1.gemfile - 33320359178.28 30 Aug 2026 03:46PM UTC 168
95.72
GitHub Action Run
29 run-4.0-gemfiles/grape_entity.gemfile - 33320359178.29 30 Aug 2026 03:46PM UTC 167
50.14
GitHub Action Run
30 run-3.4-gemfiles/rails_7_2.gemfile - 33320359178.30 30 Aug 2026 03:45PM UTC 168
95.72
GitHub Action Run
31 run-3.3-gemfiles/rack_3_0.gemfile - 33320359178.31 30 Aug 2026 03:45PM UTC 167
95.71
GitHub Action Run
32 run-3.3-gemfiles/rails_8_0.gemfile - 33320359178.32 30 Aug 2026 03:45PM UTC 168
95.72
GitHub Action Run
Source Files on build 33320359178
  • Tree
  • List 168
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #33320359178
  • Pull Request #2871
  • PR Base - master (#33320244018)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc