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

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

Build:
Build:
LAST BUILD BRANCH: robust_mounted_app_comparison
DEFAULT BRANCH: master
Ran 05 Jul 2026 07:01PM UTC
Files 166
Run time 6s
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

05 Jul 2026 07:00PM UTC coverage: 47.619% (-0.02%) from 47.642%
28751482172.11

Pull #2783

github

ericproulx
Read a route's version, anchor and requirements from its pattern

`version`, `anchor` and `requirements` are the attributes that shape the
matcher — they are passed to `Grape::Router::Pattern` to build the
mustermann pattern. They were also passed a second time to
`Grape::Router::Route` and stored as ivars, purely to back the readers.

Expose them on `Pattern` instead (`attr_reader`) and delegate the
`BaseRoute` readers to `@pattern`, alongside the existing `path`/`origin`
delegation. `to_routes` no longer passes them to `Route.new`. Metadata
that does not shape matching — `namespace`, `prefix`, `settings` — stays
as route keyword arguments.

grape-swagger already passes these to `Pattern.new` and none of them to
`Route.new`, so its routes' readers become correct rather than `nil`.

Also collapse `extract_capture` to a guard plus a single merge. With the
`format` keyword gone (#2782) it just adds an optional `version`
constraint to `requirements`, so the intermediate accumulator was noise.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pull Request #2783: Read a route's version, anchor and requirements from its pattern

162 of 1220 branches covered (13.28%)

Branch coverage included in aggregate %.

2158 of 3652 relevant lines covered (59.09%)

1.02 hits per line

Source Files on job run-4.0-gemfiles/multi_json_1_20.gemfile - 28751482172.11
  • Tree
  • List 166
  • Changed 3
  • Source Changed 3
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 28751482172
  • 2e367f12 on github
  • Prev Job for on route_match_params_via_pattern (#28751276321.23)
  • Next Job for on route_match_params_via_pattern (#28752623211.6)
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