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

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

Build:
Build:
LAST BUILD BRANCH: robust_mounted_app_comparison
DEFAULT BRANCH: master
Ran 14 May 2026 01:38PM UTC
Jobs 37
Files 160
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:38PM UTC coverage: 97.031% (-0.02%) from 97.051%
25863213752

Pull #2716

github

ericproulx
Refactor DSL::Routing#version: guard clause, explicit kwargs, value object

Three 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.

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.

3. Store a `Grape::DSL::VersionOptions` value object (built on
   `Data.define`) on the inheritable setting instead of a Hash. The
   public `.version` DSL still accepts and resolves kwargs the same
   way — the value object is an internal-only representation. Internal
   readers (`Path`, `Endpoint#build_stack`, `API::Instance#cascade?`)
   read fields by accessor; the versioner middleware boundary still
   takes a Hash, so we call `.to_h` on the way in. The middleware's
   own `DEFAULT_OPTIONS[:version_options]` is left untouched so
   direct-mount callers (some middleware specs) still get the same
   safe defaults.

`version_options` is read for exactly these five keys across the
codebase: `: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 updated:

- `spec/shared/versioning_examples.rb`: 14 call sites changed
  `**macro_options` → `**macro_options.except(:format)`. The `:format`
  key 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`: dropped
  `format: :json` from 8 direct `.version` calls (never read on the
  lib side).
- `spec/grape/dsl/routing_spec.rb`: the `:version_options` assertion
  now expects a `VersionOptions` instance with the full default set.
- `spec/g... (continued)
Pull Request #2716: Refactor DSL::Routing#version: guard clause + explicit kwargs

1072 of 1155 branches covered (92.81%)

Branch coverage included in aggregate %.

27 of 27 new or added lines in 6 files covered. (100.0%)

3471 of 3527 relevant lines covered (98.41%)

32100.5 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-3.3-gemfiles/rack_3_2.gemfile - 25863213752.1 14 May 2026 01:39PM UTC 159
95.72
GitHub Action Run
2 run-3.4-gemfiles/rails_8_0.gemfile - 25863213752.2 14 May 2026 01:39PM UTC 160
95.74
GitHub Action Run
3 run-3.3-gemfiles/rails_8_0.gemfile - 25863213752.3 14 May 2026 01:39PM UTC 160
95.72
GitHub Action Run
4 run-3.2-gemfiles/rack_3_0.gemfile - 25863213752.4 14 May 2026 01:39PM UTC 159
95.76
GitHub Action Run
5 run-3.4-gemfiles/rails_8_1.gemfile - 25863213752.5 14 May 2026 01:39PM UTC 160
95.74
GitHub Action Run
6 run-4.0-gemfiles/rails_7_2.gemfile - 25863213752.6 14 May 2026 01:39PM UTC 160
95.74
GitHub Action Run
7 run-4.0-gemfiles/hashie.gemfile - 25863213752.7 14 May 2026 01:39PM UTC 159
62.75
GitHub Action Run
8 run-3.4-gemfiles/rack_3_0.gemfile - 25863213752.8 14 May 2026 01:40PM UTC 159
95.74
GitHub Action Run
9 run-3.3-Gemfile - 25863213752.9 14 May 2026 01:39PM UTC 159
95.72
GitHub Action Run
10 run-3.2-gemfiles/rack_3_2.gemfile - 25863213752.10 14 May 2026 01:39PM UTC 159
95.76
GitHub Action Run
11 run-4.0-gemfiles/multi_xml.gemfile - 25863213752.11 14 May 2026 01:39PM UTC 159
36.31
GitHub Action Run
12 run-4.0-gemfiles/dry_validation.gemfile - 25863213752.12 14 May 2026 01:40PM UTC 159
58.25
GitHub Action Run
13 run-3.3-gemfiles/rails_8_1.gemfile - 25863213752.13 14 May 2026 01:39PM UTC 160
95.72
GitHub Action Run
14 run-4.0-gemfiles/rack_3_0.gemfile - 25863213752.14 14 May 2026 01:39PM UTC 159
95.74
GitHub Action Run
15 run-3.3-gemfiles/rack_2_2.gemfile - 25863213752.15 14 May 2026 01:39PM UTC 159
95.68
GitHub Action Run
16 run-3.3-gemfiles/rack_3_0.gemfile - 25863213752.16 14 May 2026 01:40PM UTC 159
95.72
GitHub Action Run
17 run-3.2-gemfiles/rails_7_2.gemfile - 25863213752.17 14 May 2026 01:39PM UTC 160
95.77
GitHub Action Run
18 run-3.4-gemfiles/rails_7_2.gemfile - 25863213752.18 14 May 2026 01:39PM UTC 160
95.74
GitHub Action Run
19 run-3.2-gemfiles/rack_2_2.gemfile - 25863213752.19 14 May 2026 01:39PM UTC 159
95.72
GitHub Action Run
20 run-4.0-gemfiles/multi_json.gemfile - 25863213752.20 14 May 2026 01:38PM UTC 159
36.31
GitHub Action Run
21 run-4.0-gemfiles/grape_entity.gemfile - 25863213752.21 14 May 2026 01:39PM UTC 159
50.16
GitHub Action Run
22 run-4.0-gemfiles/rack_3_1.gemfile - 25863213752.22 14 May 2026 01:39PM UTC 159
95.74
GitHub Action Run
23 run-4.0-gemfiles/rails_8_0.gemfile - 25863213752.23 14 May 2026 01:39PM UTC 160
95.74
GitHub Action Run
24 run-3.3-gemfiles/rack_3_1.gemfile - 25863213752.24 14 May 2026 01:39PM UTC 159
95.72
GitHub Action Run
25 run-3.2-Gemfile - 25863213752.25 14 May 2026 01:39PM UTC 159
95.76
GitHub Action Run
26 run-4.0-Gemfile - 25863213752.26 14 May 2026 01:39PM UTC 159
95.74
GitHub Action Run
27 run-3.2-gemfiles/rails_8_0.gemfile - 25863213752.27 14 May 2026 01:39PM UTC 160
95.77
GitHub Action Run
28 run-3.4-gemfiles/rack_3_2.gemfile - 25863213752.28 14 May 2026 01:39PM UTC 159
95.74
GitHub Action Run
29 run-3.2-gemfiles/rack_3_1.gemfile - 25863213752.29 14 May 2026 01:39PM UTC 159
95.76
GitHub Action Run
30 run-3.3-gemfiles/rails_7_2.gemfile - 25863213752.30 14 May 2026 01:40PM UTC 160
95.72
GitHub Action Run
31 run-4.0-gemfiles/rails_8_1.gemfile - 25863213752.31 14 May 2026 01:40PM UTC 160
95.74
GitHub Action Run
32 run-3.4-gemfiles/rack_2_2.gemfile - 25863213752.32 14 May 2026 01:39PM UTC 159
95.7
GitHub Action Run
33 run-3.4-Gemfile - 25863213752.33 14 May 2026 01:39PM UTC 159
95.74
GitHub Action Run
34 run-3.2-gemfiles/rails_8_1.gemfile - 25863213752.34 14 May 2026 01:39PM UTC 160
95.77
GitHub Action Run
35 run-4.0-gemfiles/rack_2_2.gemfile - 25863213752.35 14 May 2026 01:39PM UTC 159
95.7
GitHub Action Run
36 run-4.0-gemfiles/rack_3_2.gemfile - 25863213752.36 14 May 2026 01:39PM UTC 159
95.74
GitHub Action Run
37 run-3.4-gemfiles/rack_3_1.gemfile - 25863213752.37 14 May 2026 01:39PM UTC 159
95.74
GitHub Action Run
Source Files on build 25863213752
  • Tree
  • List 160
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #25863213752
  • 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