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

ruby-grape / grape / 35231135084
100%

Build:
DEFAULT BRANCH: master
Ran 17 Sep 2026 02:04PM UTC
Jobs 32
Files 169
Run time 2min
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

17 Sep 2026 02:04PM UTC coverage: 99.11% (-0.01%) from 99.123%
35231135084

push

github

web-flow
Look for a 405 neighbour only on paths the method has no route on (#2920)

When the routes for a request's method all miss its path, `#neighbours`
walks `@union` -- one greedy route per path -- for a route to answer 405
with. A 404 therefore walks two unions: its method's, then every path.

Most of that second walk cannot succeed. `collect_route_config_per_pattern`
groups routes by `pattern_regexp` and hands each group's greedy route the
pattern those routes share, so once the union for a method has missed a
path, the greedy route of every path that method has a route on has missed
it too. `compile!` now works out, per method, the greedy routes of the paths
it has no route on and compiles those into a union of their own; after a
miss, only that one is walked. In an API where every path answers GET, a GET
leaves nothing to walk.

The subset is built from the same members as `@union`, in the same order, so
a path resolves to the same greedy route either way and the 405 and its Allow
header are unchanged. A method with no routes of its own covers no path and
still walks all of `@union` -- which is also what auto-OPTIONS does, unless
OPTIONS routes are declared. Methods that leave the same paths uncovered, PUT
and DELETE on a member say, share one union. And once a route has matched and
cascaded the neighbour is never read, so it is no longer looked up.

A subset of `@union` numbers its groups differently from `@union` itself, so
each neighbour union carries the group of each of its routes rather than
reading `regexp_capture_group`.

Measured on Ruby 4.0.6 without YJIT, median of 5 interleaved rounds against an
extract of master, on a CRUD-shaped API: GET and POST on each collection, GET,
PUT and DELETE on each member, varied resource names, prefix + path version +
`format :json`. At 10 / 100 / 250 resources:

  GET 404    +74.6%  +97.9%  +93.5%
  POST 404   +24.3%  +40.4%  +31.3%
  POST 405    +5.8%  +27.7%  +21.3%

POST gains less because it has no rout... (continued)

1389 of 1439 branches covered (96.53%)

Branch coverage included in aggregate %.

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

4177 of 4177 relevant lines covered (100.0%)

27186.9 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/multi_xml.gemfile - 35231135084.1 17 Sep 2026 02:04PM UTC 167
46.35
GitHub Action Run
2 run-3.4-gemfiles/rack_3_1.gemfile - 35231135084.2 17 Sep 2026 02:04PM UTC 168
97.79
GitHub Action Run
3 run-4.0-gemfiles/rack_3_1.gemfile - 35231135084.3 17 Sep 2026 02:04PM UTC 168
97.77
GitHub Action Run
4 run-4.0-gemfiles/rack_2_2.gemfile - 35231135084.4 17 Sep 2026 02:04PM UTC 168
97.75
GitHub Action Run
5 run-3.3-gemfiles/rack_3_0.gemfile - 35231135084.5 17 Sep 2026 02:05PM UTC 168
97.81
GitHub Action Run
6 run-4.0-gemfiles/multi_json.gemfile - 35231135084.6 17 Sep 2026 02:04PM UTC 167
46.62
GitHub Action Run
7 run-4.0-gemfiles/rails_7_2.gemfile - 35231135084.7 17 Sep 2026 02:04PM UTC 169
97.79
GitHub Action Run
8 run-4.0-gemfiles/dry_validation.gemfile - 35231135084.8 17 Sep 2026 02:04PM UTC 167
56.91
GitHub Action Run
9 run-4.0-gemfiles/rails_8_0.gemfile - 35231135084.9 17 Sep 2026 02:04PM UTC 169
97.77
GitHub Action Run
10 run-3.4-gemfiles/rack_3_2.gemfile - 35231135084.10 17 Sep 2026 02:04PM UTC 168
97.79
GitHub Action Run
11 run-4.0-gemfiles/rack_3_0.gemfile - 35231135084.11 17 Sep 2026 02:04PM UTC 168
97.77
GitHub Action Run
12 run-4.0-gemfiles/grape_swagger.gemfile - 35231135084.12 17 Sep 2026 02:04PM UTC 167
54.1
GitHub Action Run
13 run-3.3-gemfiles/rails_8_0.gemfile - 35231135084.13 17 Sep 2026 02:04PM UTC 169
97.79
GitHub Action Run
14 run-3.3-gemfiles/rails_7_2.gemfile - 35231135084.14 17 Sep 2026 02:04PM UTC 169
97.81
GitHub Action Run
15 run-4.0-gemfiles/rails_8_1.gemfile - 35231135084.15 17 Sep 2026 02:04PM UTC 169
97.77
GitHub Action Run
16 run-3.3-gemfiles/rack_3_1.gemfile - 35231135084.16 17 Sep 2026 02:04PM UTC 168
97.81
GitHub Action Run
17 run-3.4-gemfiles/rails_7_2.gemfile - 35231135084.17 17 Sep 2026 02:04PM UTC 169
97.77
GitHub Action Run
18 run-4.0-gemfiles/grape_entity.gemfile - 35231135084.18 17 Sep 2026 02:04PM UTC 167
49.62
GitHub Action Run
19 run-4.0-gemfiles/multi_json_1_20.gemfile - 35231135084.19 17 Sep 2026 02:04PM UTC 167
46.65
GitHub Action Run
20 run-3.4-gemfiles/rack_3_0.gemfile - 35231135084.20 17 Sep 2026 02:04PM UTC 168
97.77
GitHub Action Run
21 run-4.0-gemfiles/multi_xml_0_8.gemfile - 35231135084.21 17 Sep 2026 02:04PM UTC 167
46.38
GitHub Action Run
22 run-4.0-gemfiles/hashie.gemfile - 35231135084.22 17 Sep 2026 02:04PM UTC 167
60.73
GitHub Action Run
23 run-4.0-Gemfile - 35231135084.23 17 Sep 2026 02:04PM UTC 168
97.79
GitHub Action Run
24 run-3.4-Gemfile - 35231135084.24 17 Sep 2026 02:05PM UTC 168
97.77
GitHub Action Run
25 run-3.3-Gemfile - 35231135084.25 17 Sep 2026 02:04PM UTC 168
97.79
GitHub Action Run
26 run-4.0-gemfiles/rack_3_2.gemfile - 35231135084.26 17 Sep 2026 02:04PM UTC 168
97.79
GitHub Action Run
27 run-3.4-gemfiles/rack_2_2.gemfile - 35231135084.27 17 Sep 2026 02:05PM UTC 168
97.74
GitHub Action Run
28 run-3.3-gemfiles/rails_8_1.gemfile - 35231135084.28 17 Sep 2026 02:05PM UTC 169
97.79
GitHub Action Run
29 run-3.3-gemfiles/rack_3_2.gemfile - 35231135084.29 17 Sep 2026 02:04PM UTC 168
97.81
GitHub Action Run
30 run-3.4-gemfiles/rails_8_1.gemfile - 35231135084.30 17 Sep 2026 02:04PM UTC 169
97.77
GitHub Action Run
31 run-3.3-gemfiles/rack_2_2.gemfile - 35231135084.31 17 Sep 2026 02:05PM UTC 168
97.75
GitHub Action Run
32 run-3.4-gemfiles/rails_8_0.gemfile - 35231135084.32 17 Sep 2026 02:04PM UTC 169
97.77
GitHub Action Run
Source Files on build 35231135084
  • Tree
  • List 169
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #35231135084
  • 66f875c7 on github
  • Prev Build on master (#35027698358)
  • Next Build on master (#35237531125)
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