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

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

Build:
Build:
LAST BUILD BRANCH: robust_mounted_app_comparison
DEFAULT BRANCH: master
Ran 14 May 2026 01:30PM UTC
Jobs 37
Files 159
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

14 May 2026 01:29PM UTC coverage: 97.031% (-0.02%) from 97.051%
25862770726

Pull #2716

github

ericproulx
Refactor DSL::Routing#version: guard clause + explicit kwargs

Two changes that touch the same method:

1. Lift the body out of `if args.any? ... end` into a
   `return @versions&.last if args.empty?` guard, so the main flow sits
   at top indentation instead of one level inside an `if`.

2. Replace `**options` with explicit kwargs `(using:, cascade:,
   parameter:, strict:, vendor:)` and bake the defaults into the
   signature (matching `Versioner::Base::DEFAULT_OPTIONS`). The
   per-call `reverse_merge(using: :path)` is gone, and
   `version_options` now stores a fully-resolved hash instead of a
   sparse one. `Versioner::Base::DEFAULT_OPTIONS` is left untouched so
   anyone mounting the middleware directly (some middleware specs do)
   still gets the same safe defaults.

`version_options` is read for exactly these five keys across the
codebase, and nothing else: `:using` (endpoint.rb, path.rb), and
`:cascade`/`:parameter`/`:strict`/`:vendor` (Versioner::Base#initialize,
plus `:cascade` in API::Instance#cascade?). Any other kwarg passed to
`.version` was previously swallowed by the splat with no effect.

Spec fixtures that passed `format:` to `.version` are updated:

- `spec/shared/versioning_examples.rb`: `**macro_options` →
  `**macro_options.except(:format)` at the 14 call sites. `:format`
  stays in `macro_options` so the test helper (`versioned_helpers.rb`)
  can still build the `HTTP_ACCEPT` header.
- `spec/grape/exceptions/invalid_accept_header_spec.rb`: drop
  `format: :json` from 8 direct `.version` calls (it was never read
  on the lib side, and these tests build their Accept header inline).
- `spec/grape/dsl/routing_spec.rb`: the `:version_options` assertion
  now expects the full resolved hash.

No production behaviour change beyond `.version` raising
`ArgumentError` for genuinely unknown kwargs (previously silently
ignored).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pull Request #2716: Lift DSL::Routing#version body into a guard clause

1076 of 1159 branches covered (92.84%)

Branch coverage included in aggregate %.

23 of 23 new or added lines in 5 files covered. (100.0%)

3467 of 3523 relevant lines covered (98.41%)

32139.39 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-3.4-Gemfile - 25862770726.1 14 May 2026 01:30PM UTC 158
95.74
GitHub Action Run
2 run-3.4-gemfiles/rack_3_0.gemfile - 25862770726.2 14 May 2026 01:30PM UTC 158
95.74
GitHub Action Run
3 run-3.3-Gemfile - 25862770726.3 14 May 2026 01:30PM UTC 158
95.72
GitHub Action Run
4 run-4.0-gemfiles/rack_2_2.gemfile - 25862770726.4 14 May 2026 01:30PM UTC 158
95.7
GitHub Action Run
5 run-4.0-gemfiles/hashie.gemfile - 25862770726.5 14 May 2026 01:30PM UTC 158
62.73
GitHub Action Run
6 run-3.4-gemfiles/rails_7_2.gemfile - 25862770726.6 14 May 2026 01:30PM UTC 159
95.74
GitHub Action Run
7 run-3.3-gemfiles/rack_3_2.gemfile - 25862770726.7 14 May 2026 01:30PM UTC 158
95.72
GitHub Action Run
8 run-3.3-gemfiles/rails_7_2.gemfile - 25862770726.8 14 May 2026 01:30PM UTC 159
95.72
GitHub Action Run
9 run-4.0-gemfiles/rails_8_0.gemfile - 25862770726.9 14 May 2026 01:30PM UTC 159
95.74
GitHub Action Run
10 run-3.2-gemfiles/rails_8_1.gemfile - 25862770726.10 14 May 2026 01:30PM UTC 159
95.77
GitHub Action Run
11 run-3.2-Gemfile - 25862770726.11 14 May 2026 01:30PM UTC 158
95.76
GitHub Action Run
12 run-3.2-gemfiles/rack_2_2.gemfile - 25862770726.12 14 May 2026 01:30PM UTC 158
95.72
GitHub Action Run
13 run-3.2-gemfiles/rack_3_0.gemfile - 25862770726.13 14 May 2026 01:30PM UTC 158
95.76
GitHub Action Run
14 run-3.3-gemfiles/rack_3_0.gemfile - 25862770726.14 14 May 2026 01:30PM UTC 158
95.72
GitHub Action Run
15 run-3.2-gemfiles/rails_8_0.gemfile - 25862770726.15 14 May 2026 01:30PM UTC 159
95.77
GitHub Action Run
16 run-4.0-gemfiles/multi_json.gemfile - 25862770726.16 14 May 2026 01:30PM UTC 158
36.24
GitHub Action Run
17 run-4.0-gemfiles/dry_validation.gemfile - 25862770726.17 14 May 2026 01:30PM UTC 158
58.23
GitHub Action Run
18 run-3.4-gemfiles/rack_2_2.gemfile - 25862770726.18 14 May 2026 01:30PM UTC 158
95.7
GitHub Action Run
19 run-4.0-gemfiles/rack_3_2.gemfile - 25862770726.19 14 May 2026 01:30PM UTC 158
95.74
GitHub Action Run
20 run-3.3-gemfiles/rack_2_2.gemfile - 25862770726.20 14 May 2026 01:30PM UTC 158
95.68
GitHub Action Run
21 run-3.2-gemfiles/rack_3_2.gemfile - 25862770726.21 14 May 2026 01:30PM UTC 158
95.76
GitHub Action Run
22 run-3.3-gemfiles/rails_8_1.gemfile - 25862770726.22 14 May 2026 01:30PM UTC 159
95.72
GitHub Action Run
23 run-4.0-Gemfile - 25862770726.23 14 May 2026 01:30PM UTC 158
95.74
GitHub Action Run
24 run-3.2-gemfiles/rails_7_2.gemfile - 25862770726.24 14 May 2026 01:30PM UTC 159
95.77
GitHub Action Run
25 run-3.4-gemfiles/rails_8_1.gemfile - 25862770726.25 14 May 2026 01:30PM UTC 159
95.74
GitHub Action Run
26 run-3.4-gemfiles/rack_3_1.gemfile - 25862770726.26 14 May 2026 01:30PM UTC 158
95.74
GitHub Action Run
27 run-3.3-gemfiles/rack_3_1.gemfile - 25862770726.27 14 May 2026 01:30PM UTC 158
95.72
GitHub Action Run
28 run-3.4-gemfiles/rack_3_2.gemfile - 25862770726.28 14 May 2026 01:30PM UTC 158
95.74
GitHub Action Run
29 run-4.0-gemfiles/multi_xml.gemfile - 25862770726.29 14 May 2026 01:30PM UTC 158
36.24
GitHub Action Run
30 run-3.2-gemfiles/rack_3_1.gemfile - 25862770726.30 14 May 2026 01:30PM UTC 158
95.76
GitHub Action Run
31 run-4.0-gemfiles/rack_3_1.gemfile - 25862770726.31 14 May 2026 01:30PM UTC 158
95.74
GitHub Action Run
32 run-3.4-gemfiles/rails_8_0.gemfile - 25862770726.32 14 May 2026 01:30PM UTC 159
95.74
GitHub Action Run
33 run-4.0-gemfiles/grape_entity.gemfile - 25862770726.33 14 May 2026 01:30PM UTC 158
50.12
GitHub Action Run
34 run-3.3-gemfiles/rails_8_0.gemfile - 25862770726.34 14 May 2026 01:30PM UTC 159
95.72
GitHub Action Run
35 run-4.0-gemfiles/rack_3_0.gemfile - 25862770726.35 14 May 2026 01:30PM UTC 158
95.74
GitHub Action Run
36 run-4.0-gemfiles/rails_8_1.gemfile - 25862770726.36 14 May 2026 01:30PM UTC 159
95.74
GitHub Action Run
37 run-4.0-gemfiles/rails_7_2.gemfile - 25862770726.37 14 May 2026 01:30PM UTC 159
95.74
GitHub Action Run
Source Files on build 25862770726
  • Tree
  • List 159
  • 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 #25862770726
  • Pull Request #2716
  • PR Base - master (#25854383996)
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