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

ruby-grape / grape / 33254343101
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: mount-refresh-internal
DEFAULT BRANCH: master
Ran 29 Aug 2026 01:10PM 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

29 Aug 2026 01:10PM UTC coverage: 96.987% (-0.001%) from 96.988%
33254343101

push

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>

1235 of 1326 branches covered (93.14%)

Branch coverage included in aggregate %.

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

3884 of 3952 relevant lines covered (98.28%)

27215.87 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/rack_3_1.gemfile - 33254343101.1 29 Aug 2026 01:10PM UTC 167
95.73
GitHub Action Run
2 run-4.0-Gemfile - 33254343101.2 29 Aug 2026 01:11PM UTC 167
95.73
GitHub Action Run
3 run-4.0-gemfiles/multi_json.gemfile - 33254343101.3 29 Aug 2026 01:11PM UTC 167
47.44
GitHub Action Run
4 run-4.0-gemfiles/rails_8_0.gemfile - 33254343101.4 29 Aug 2026 01:10PM UTC 168
95.74
GitHub Action Run
5 run-3.3-gemfiles/rails_8_1.gemfile - 33254343101.5 29 Aug 2026 01:10PM UTC 168
95.73
GitHub Action Run
6 run-3.4-gemfiles/rails_8_0.gemfile - 33254343101.6 29 Aug 2026 01:11PM UTC 168
95.74
GitHub Action Run
7 run-3.4-gemfiles/rails_8_1.gemfile - 33254343101.7 29 Aug 2026 01:10PM UTC 168
95.74
GitHub Action Run
8 run-3.4-gemfiles/rack_2_2.gemfile - 33254343101.8 29 Aug 2026 01:10PM UTC 167
95.69
GitHub Action Run
9 run-4.0-gemfiles/dry_validation.gemfile - 33254343101.9 29 Aug 2026 01:10PM UTC 167
57.91
GitHub Action Run
10 run-4.0-gemfiles/multi_json_1_20.gemfile - 33254343101.10 29 Aug 2026 01:11PM UTC 167
47.48
GitHub Action Run
11 run-3.3-gemfiles/rack_3_2.gemfile - 33254343101.11 29 Aug 2026 01:10PM UTC 167
95.73
GitHub Action Run
12 run-3.4-gemfiles/rack_3_0.gemfile - 33254343101.12 29 Aug 2026 01:10PM UTC 167
95.73
GitHub Action Run
13 run-4.0-gemfiles/rack_3_0.gemfile - 33254343101.13 29 Aug 2026 01:11PM UTC 167
95.73
GitHub Action Run
14 run-3.3-gemfiles/rack_3_0.gemfile - 33254343101.14 29 Aug 2026 01:10PM UTC 167
95.73
GitHub Action Run
15 run-3.4-gemfiles/rack_3_2.gemfile - 33254343101.15 29 Aug 2026 01:11PM UTC 167
95.73
GitHub Action Run
16 run-4.0-gemfiles/grape_swagger.gemfile - 33254343101.16 29 Aug 2026 01:11PM UTC 167
55.16
GitHub Action Run
17 run-4.0-gemfiles/rails_8_1.gemfile - 33254343101.17 29 Aug 2026 01:11PM UTC 168
95.74
GitHub Action Run
18 run-4.0-gemfiles/rack_2_2.gemfile - 33254343101.18 29 Aug 2026 01:11PM UTC 167
95.69
GitHub Action Run
19 run-4.0-gemfiles/multi_xml_0_8.gemfile - 33254343101.19 29 Aug 2026 01:10PM UTC 167
46.91
GitHub Action Run
20 run-3.3-Gemfile - 33254343101.20 29 Aug 2026 01:10PM UTC 167
95.73
GitHub Action Run
21 run-3.3-gemfiles/rack_3_1.gemfile - 33254343101.21 29 Aug 2026 01:11PM UTC 167
95.73
GitHub Action Run
22 run-3.3-gemfiles/rails_8_0.gemfile - 33254343101.22 29 Aug 2026 01:11PM UTC 168
95.73
GitHub Action Run
23 run-3.3-gemfiles/rails_7_2.gemfile - 33254343101.23 29 Aug 2026 01:10PM UTC 168
95.73
GitHub Action Run
24 run-3.4-gemfiles/rack_3_1.gemfile - 33254343101.24 29 Aug 2026 01:11PM UTC 167
95.73
GitHub Action Run
25 run-4.0-gemfiles/hashie.gemfile - 33254343101.25 29 Aug 2026 01:10PM UTC 167
61.89
GitHub Action Run
26 run-4.0-gemfiles/rack_3_2.gemfile - 33254343101.26 29 Aug 2026 01:10PM UTC 167
95.73
GitHub Action Run
27 run-3.3-gemfiles/rack_2_2.gemfile - 33254343101.27 29 Aug 2026 01:10PM UTC 167
95.69
GitHub Action Run
28 run-4.0-gemfiles/rails_7_2.gemfile - 33254343101.28 29 Aug 2026 01:11PM UTC 168
95.74
GitHub Action Run
29 run-3.4-gemfiles/rails_7_2.gemfile - 33254343101.29 29 Aug 2026 01:11PM UTC 168
95.74
GitHub Action Run
30 run-4.0-gemfiles/multi_xml.gemfile - 33254343101.30 29 Aug 2026 01:11PM UTC 167
46.87
GitHub Action Run
31 run-3.4-Gemfile - 33254343101.31 29 Aug 2026 01:10PM UTC 167
95.73
GitHub Action Run
32 run-4.0-gemfiles/grape_entity.gemfile - 33254343101.32 29 Aug 2026 01:11PM UTC 167
50.08
GitHub Action Run
Source Files on build 33254343101
  • Tree
  • List 168
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #33254343101
  • be000f95 on github
  • Prev Build on master (#33120993402)
  • Next Build on mount-refresh-internal (#33254367352)
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