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

ruby-grape / grape / 28746341902 / 21
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: robust_mounted_app_comparison
DEFAULT BRANCH: master
Ran 05 Jul 2026 03:53PM UTC
Files 167
Run time 4s
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 03:52PM UTC coverage: 95.186% (+0.005%) from 95.181%
28746341902.21

push

github

ericproulx
Promote route metadata to Route keyword arguments

`version`, `namespace`, `prefix`, `requirements`, `anchor` and `settings`
were computed in `Endpoint#prepare_default_route_attributes`, merged into
the route options Hash, and read back through `Grape::Router::BaseRoute`'s
`def_delegators :@options`. They are route metadata, not part of the
user-declared options bag grape-swagger consumes.

They are now passed to `Grape::Router::Route` as explicit keyword
arguments and exposed as plain readers on `BaseRoute`. `Endpoint#to_routes`
computes each as a local and passes `config.route_options` straight
through, so `prepare_default_route_attributes` (and the intermediate
`default_route_options`/`complete_route_options`) is gone. `Route`
forwards the attributes to `super` via `**route_attributes` to keep its
signature lean.

`route.options` now carries only what was declared for the route; the
`@options` delegation is down to `description` plus the documentation
`DSL_METHODS`. The readers are unchanged, so grape-swagger (which reads
`route.prefix` and `route.settings`) is unaffected. `requirements` and
`anchor` can still be declared as route options, so any explicit value
stays in `route.options`; the effective value comes from the reader.

Also drop the vestigial `:format` member from the endpoint's `Options`.
Nothing ever passed `format:` to `Grape::Endpoint.new`, so `config.format`
was always `nil`; the format capture comes from the path suffix built by
`Grape::Path`, not from `Pattern`'s `format`. `Pattern#initialize` keeps
`format:` (now optional) since it remains a valid capture constraint used
by external callers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

1105 of 1226 branches covered (90.13%)

Branch coverage included in aggregate %.

3542 of 3656 relevant lines covered (96.88%)

974.91 hits per line

Source Files on job run-3.3-gemfiles/rails_7_2.gemfile - 28746341902.21
  • Tree
  • List 167
  • Changed 5
  • Source Changed 5
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 28746341902
  • eee4b94c on github
  • Prev Job for on route_attributes_kwargs (#28708868356.27)
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