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

ruby-grape / grape / 33554135201
97%
master: 99%

Build:
Build:
LAST BUILD BRANCH: update_rubocop_1_90
DEFAULT BRANCH: master
Ran 01 Sep 2026 08:14PM UTC
Jobs 32
Files 169
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

01 Sep 2026 08:14PM UTC coverage: 96.95% (-0.001%) from 96.951%
33554135201

Pull #2880

github

ericproulx
Remove the versioner's pattern option

`Versioner::Path#version_from_first_segment` runs on every request of a
path-versioned API and tested the candidate segment against `pattern`:

    return unless potential_version.match?(pattern)

`pattern` defaulted to `/.*/i`, so unless an API supplied its own, that regexp
ran on every request to answer a question it could not answer with no.

Nothing supplies one. The option dates from the original versioner, added in
August 2010, where it was the whole mechanism:

    def default_options = { pattern: /.*/i }

    def before
      potential_version = env['PATH_INFO'].split('/')[1]
      if potential_version =~ options[:pattern]
        env['api.version'] = potential_version
        env['PATH_INFO'] = truncated_path
      end
    end

There was no declared version list then, so a regexp was the only way to decide
whether the first segment was a version. `versions:` took that job over — a
segment is checked against what the API declared, and an unrecognized one
answers 404 — and `pattern` was left behind. It was never connected to the
`version` DSL that arrived later: `DSL::Routing#version` does not accept the
keyword and `Endpoint#build_stack` never passed one, so the only way to reach
it was to insert the middleware yourself, which also meant forgoing what
`version` does for routing.

Fifteen years on, the two specs that kept it alive are still the two from that
2010 commit, asserting on the same `/v1/awesome` and `/awesome/radical`.

Remove the option, its delegator, the per-request test and those specs. Passing
`pattern:` now raises `ArgumentError: unknown keyword: :pattern` when the
middleware is built rather than being silently accepted, and
`Versioner::Base::DEFAULT_OPTIONS` no longer carries the key.

One behaviour goes with it, documented in UPGRADING: a hand-wired versioner
could use `pattern` to distinguish "this segment is not a version at all" —
leave `api.version` unset and let the request through ... (continued)
Pull Request #2880: Remove the versioner's pattern option

1236 of 1330 branches covered (92.93%)

Branch coverage included in aggregate %.

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

3913 of 3981 relevant lines covered (98.29%)

27277.15 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/rails_8_0.gemfile - 33554135201.1 01 Sep 2026 08:15PM UTC 169
95.71
GitHub Action Run
2 run-4.0-gemfiles/rack_3_0.gemfile - 33554135201.2 01 Sep 2026 08:14PM UTC 168
95.7
GitHub Action Run
3 run-3.4-gemfiles/rack_3_0.gemfile - 33554135201.3 01 Sep 2026 08:15PM UTC 168
95.7
GitHub Action Run
4 run-3.3-gemfiles/rack_2_2.gemfile - 33554135201.4 01 Sep 2026 08:14PM UTC 168
95.66
GitHub Action Run
5 run-3.4-gemfiles/rails_7_2.gemfile - 33554135201.5 01 Sep 2026 08:15PM UTC 169
95.71
GitHub Action Run
6 run-4.0-gemfiles/hashie.gemfile - 33554135201.6 01 Sep 2026 08:14PM UTC 168
61.81
GitHub Action Run
7 run-3.4-Gemfile - 33554135201.7 01 Sep 2026 08:14PM UTC 168
95.7
GitHub Action Run
8 run-4.0-gemfiles/grape_entity.gemfile - 33554135201.8 01 Sep 2026 08:14PM UTC 168
50.31
GitHub Action Run
9 run-4.0-gemfiles/rack_2_2.gemfile - 33554135201.9 01 Sep 2026 08:14PM UTC 168
95.66
GitHub Action Run
10 run-3.4-gemfiles/rack_2_2.gemfile - 33554135201.10 01 Sep 2026 08:15PM UTC 168
95.66
GitHub Action Run
11 run-4.0-gemfiles/multi_json.gemfile - 33554135201.11 01 Sep 2026 08:14PM UTC 168
47.41
GitHub Action Run
12 run-4.0-gemfiles/grape_swagger.gemfile - 33554135201.12 01 Sep 2026 08:14PM UTC 168
55.23
GitHub Action Run
13 run-4.0-gemfiles/dry_validation.gemfile - 33554135201.13 01 Sep 2026 08:14PM UTC 168
57.91
GitHub Action Run
14 run-3.3-gemfiles/rails_8_1.gemfile - 33554135201.14 01 Sep 2026 08:15PM UTC 169
95.7
GitHub Action Run
15 run-3.4-gemfiles/rails_8_1.gemfile - 33554135201.15 01 Sep 2026 08:14PM UTC 169
95.71
GitHub Action Run
16 run-3.4-gemfiles/rack_3_1.gemfile - 33554135201.16 01 Sep 2026 08:15PM UTC 168
95.7
GitHub Action Run
17 run-3.3-gemfiles/rack_3_0.gemfile - 33554135201.17 01 Sep 2026 08:15PM UTC 168
95.7
GitHub Action Run
18 run-3.3-gemfiles/rails_8_0.gemfile - 33554135201.18 01 Sep 2026 08:14PM UTC 169
95.7
GitHub Action Run
19 run-4.0-gemfiles/multi_xml_0_8.gemfile - 33554135201.19 01 Sep 2026 08:14PM UTC 168
46.96
GitHub Action Run
20 run-4.0-gemfiles/rack_3_1.gemfile - 33554135201.20 01 Sep 2026 08:14PM UTC 168
95.7
GitHub Action Run
21 run-3.3-gemfiles/rack_3_2.gemfile - 33554135201.21 01 Sep 2026 08:15PM UTC 168
95.7
GitHub Action Run
22 run-4.0-gemfiles/multi_json_1_20.gemfile - 33554135201.22 01 Sep 2026 08:14PM UTC 168
47.45
GitHub Action Run
23 run-4.0-gemfiles/multi_xml.gemfile - 33554135201.23 01 Sep 2026 08:14PM UTC 168
46.92
GitHub Action Run
24 run-4.0-gemfiles/rails_7_2.gemfile - 33554135201.24 01 Sep 2026 08:14PM UTC 169
95.71
GitHub Action Run
25 run-3.4-gemfiles/rails_8_0.gemfile - 33554135201.25 01 Sep 2026 08:15PM UTC 169
95.71
GitHub Action Run
26 run-4.0-gemfiles/rack_3_2.gemfile - 33554135201.26 01 Sep 2026 08:14PM UTC 168
95.7
GitHub Action Run
27 run-4.0-Gemfile - 33554135201.27 01 Sep 2026 08:15PM UTC 168
95.7
GitHub Action Run
28 run-3.4-gemfiles/rack_3_2.gemfile - 33554135201.28 01 Sep 2026 08:15PM UTC 168
95.7
GitHub Action Run
29 run-4.0-gemfiles/rails_8_1.gemfile - 33554135201.29 01 Sep 2026 08:14PM UTC 169
95.71
GitHub Action Run
30 run-3.3-Gemfile - 33554135201.30 01 Sep 2026 08:14PM UTC 168
95.7
GitHub Action Run
31 run-3.3-gemfiles/rails_7_2.gemfile - 33554135201.31 01 Sep 2026 08:14PM UTC 169
95.7
GitHub Action Run
32 run-3.3-gemfiles/rack_3_1.gemfile - 33554135201.32 01 Sep 2026 08:14PM UTC 168
95.7
GitHub Action Run
Source Files on build 33554135201
  • Tree
  • List 169
  • Changed 2
  • Source Changed 2
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #33554135201
  • Pull Request #2880
  • PR Base - master (#33553778244)
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