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

ruby-grape / grape / 33413663831
97%

Build:
DEFAULT BRANCH: master
Ran 31 Aug 2026 04:21PM 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

31 Aug 2026 04:21PM UTC coverage: 96.985%. Remained the same
33413663831

push

github

web-flow
Test the path-normalizer fast path without a regexp (#2874)

`Grape::Util::PathNormalizer.call` runs twice per request — once in
`Versioner::Path#before`, once in `Router#call` — and almost always returns the
path untouched. The guard that decides this matched `%r{%|//}`, which is one
alternation over the whole string:

    return path if path.start_with?('/') && !(path.end_with?('/') || path.match?(%r{%|//}))

Two `String#include?` calls answer the same question and stay in C without
building a match. Measured in one process, on the predicate alone:

    realistic path (41 chars)    regexp 313 ns   ->   include? 217 ns   1.44x
    short path (13 chars)        regexp 194 ns   ->   include? 181 ns   1.07x

The gain grows with path length, which is the direction real APIs go. No
allocation change either way.

One behavioural difference worth naming: `String#include?` does not validate
encoding, while `String#match?` does. A PATH_INFO holding an invalid byte
sequence used to raise `ArgumentError` here; it now passes through and raises
the same `ArgumentError` from `Router#match?` instead, one frame later. A path
served by a forward-match route (a bare Rack app mounted with `mount`), which
never reaches a regexp, now goes through rather than raising. Nothing
percent-encodes to invalid UTF-8, so this needs a client sending raw bytes in
the request target.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

1238 of 1330 branches covered (93.08%)

Branch coverage included in aggregate %.

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

3908 of 3976 relevant lines covered (98.29%)

27278.21 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/hashie.gemfile - 33413663831.1 31 Aug 2026 04:22PM UTC 168
61.75
GitHub Action Run
2 run-4.0-gemfiles/multi_xml_0_8.gemfile - 33413663831.2 31 Aug 2026 04:21PM UTC 168
46.92
GitHub Action Run
3 run-4.0-gemfiles/multi_xml.gemfile - 33413663831.3 31 Aug 2026 04:21PM UTC 168
46.89
GitHub Action Run
4 run-4.0-gemfiles/rails_8_1.gemfile - 33413663831.4 31 Aug 2026 04:22PM UTC 169
95.74
GitHub Action Run
5 run-3.4-gemfiles/rails_8_1.gemfile - 33413663831.5 31 Aug 2026 04:22PM UTC 169
95.74
GitHub Action Run
6 run-4.0-Gemfile - 33413663831.6 31 Aug 2026 04:22PM UTC 168
95.74
GitHub Action Run
7 run-4.0-gemfiles/dry_validation.gemfile - 33413663831.7 31 Aug 2026 04:22PM UTC 168
57.87
GitHub Action Run
8 run-4.0-gemfiles/grape_swagger.gemfile - 33413663831.8 31 Aug 2026 04:22PM UTC 168
55.23
GitHub Action Run
9 run-4.0-gemfiles/rack_3_1.gemfile - 33413663831.9 31 Aug 2026 04:22PM UTC 168
95.74
GitHub Action Run
10 run-4.0-gemfiles/grape_entity.gemfile - 33413663831.10 31 Aug 2026 04:21PM UTC 168
50.25
GitHub Action Run
11 run-4.0-gemfiles/rails_7_2.gemfile - 33413663831.11 31 Aug 2026 04:22PM UTC 169
95.74
GitHub Action Run
12 run-3.4-gemfiles/rack_2_2.gemfile - 33413663831.12 31 Aug 2026 04:22PM UTC 168
95.7
GitHub Action Run
13 run-3.3-gemfiles/rack_3_0.gemfile - 33413663831.13 31 Aug 2026 04:22PM UTC 168
95.74
GitHub Action Run
14 run-4.0-gemfiles/rack_3_0.gemfile - 33413663831.14 31 Aug 2026 04:22PM UTC 168
95.74
GitHub Action Run
15 run-3.4-Gemfile - 33413663831.15 31 Aug 2026 04:22PM UTC 168
95.74
GitHub Action Run
16 run-4.0-gemfiles/rack_2_2.gemfile - 33413663831.16 31 Aug 2026 04:22PM UTC 168
95.7
GitHub Action Run
17 run-3.4-gemfiles/rack_3_0.gemfile - 33413663831.17 31 Aug 2026 04:22PM UTC 168
95.74
GitHub Action Run
18 run-3.3-gemfiles/rails_8_1.gemfile - 33413663831.18 31 Aug 2026 04:22PM UTC 169
95.74
GitHub Action Run
19 run-3.3-Gemfile - 33413663831.19 31 Aug 2026 04:22PM UTC 168
95.74
GitHub Action Run
20 run-3.3-gemfiles/rails_7_2.gemfile - 33413663831.20 31 Aug 2026 04:22PM UTC 169
95.74
GitHub Action Run
21 run-4.0-gemfiles/rails_8_0.gemfile - 33413663831.21 31 Aug 2026 04:22PM UTC 169
95.74
GitHub Action Run
22 run-3.4-gemfiles/rack_3_2.gemfile - 33413663831.22 31 Aug 2026 04:22PM UTC 168
95.74
GitHub Action Run
23 run-4.0-gemfiles/rack_3_2.gemfile - 33413663831.23 31 Aug 2026 04:22PM UTC 168
95.74
GitHub Action Run
24 run-4.0-gemfiles/multi_json_1_20.gemfile - 33413663831.24 31 Aug 2026 04:22PM UTC 168
47.53
GitHub Action Run
25 run-3.3-gemfiles/rails_8_0.gemfile - 33413663831.25 31 Aug 2026 04:22PM UTC 169
95.74
GitHub Action Run
26 run-3.4-gemfiles/rails_7_2.gemfile - 33413663831.26 31 Aug 2026 04:22PM UTC 169
95.74
GitHub Action Run
27 run-3.3-gemfiles/rack_2_2.gemfile - 33413663831.27 31 Aug 2026 04:22PM UTC 168
95.7
GitHub Action Run
28 run-3.3-gemfiles/rack_3_2.gemfile - 33413663831.28 31 Aug 2026 04:22PM UTC 168
95.74
GitHub Action Run
29 run-4.0-gemfiles/multi_json.gemfile - 33413663831.29 31 Aug 2026 04:22PM UTC 168
47.49
GitHub Action Run
30 run-3.4-gemfiles/rails_8_0.gemfile - 33413663831.30 31 Aug 2026 04:22PM UTC 169
95.74
GitHub Action Run
31 run-3.3-gemfiles/rack_3_1.gemfile - 33413663831.31 31 Aug 2026 04:22PM UTC 168
95.74
GitHub Action Run
32 run-3.4-gemfiles/rack_3_1.gemfile - 33413663831.32 31 Aug 2026 04:22PM UTC 168
95.74
GitHub Action Run
Source Files on build 33413663831
  • Tree
  • List 169
  • 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 #33413663831
  • 1a590c74 on github
  • Prev Build on master (#33413427296)
  • Next Build on master (#33413891834)
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