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

ruby-grape / grape / 33728651997
97%

Build:
DEFAULT BRANCH: master
Ran 03 Sep 2026 07:33AM 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

03 Sep 2026 07:32AM UTC coverage: 96.965%. Remained the same
33728651997

push

github

web-flow
Look registrations up in a plain Hash instead of an indifferent one (#2891)

`Grape::Util::Registry` backs the format, parser, error-formatter, versioner,
validator and params-builder registries with a `HashWithIndifferentAccess`,
because registration and lookup disagree on spelling: `register` derives the
short name as a String (`klass.name.demodulize.underscore`), while the readers
arrive with a Symbol.

Three of those registries are read on the request path — `Grape::Formatter`
once per response, `Grape::Parser` once per parsed body,
`Grape::ParamsBuilder` once per params build — so `convert_key` ran on every
one of those lookups to answer a question that only ever had one answer.

Store both spellings instead, the same way `Grape::ContentTypes` does since
#2883:

    registry[short_name] = registry[short_name.to_sym] = klass

    HWIA[:json]     109.4 ns  ->  Hash[:json]     34.3 ns   3.19x
    HWIA['json']    117.7 ns  ->  Hash['json']    61.1 ns   1.93x

End to end, median of 5 interleaved runs against master (Ruby 4.0.5): **+2.8%**
on a minimal versioned GET, **+2.8%** with params and validations.

Nothing in the library removes a registration — only the suite does, through
the `Deregister` helper it mixes into `Grape::Util::Registry`. That helper now
deletes both spellings, which keeps undoing a registration where it is
actually needed instead of widening the public surface for it.

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

1238 of 1332 branches covered (92.94%)

Branch coverage included in aggregate %.

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

3937 of 4005 relevant lines covered (98.3%)

27126.1 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-3.4-gemfiles/rack_2_2.gemfile - 33728651997.1 03 Sep 2026 07:33AM UTC 168
95.69
GitHub Action Run
2 run-4.0-gemfiles/rack_3_0.gemfile - 33728651997.2 03 Sep 2026 07:33AM UTC 168
95.72
GitHub Action Run
3 run-4.0-gemfiles/hashie.gemfile - 33728651997.3 03 Sep 2026 07:33AM UTC 168
61.85
GitHub Action Run
4 run-3.4-gemfiles/rack_3_2.gemfile - 33728651997.4 03 Sep 2026 07:33AM UTC 168
95.72
GitHub Action Run
5 run-4.0-gemfiles/rack_2_2.gemfile - 33728651997.5 03 Sep 2026 07:33AM UTC 168
95.69
GitHub Action Run
6 run-4.0-gemfiles/multi_json_1_20.gemfile - 33728651997.6 03 Sep 2026 07:33AM UTC 168
47.57
GitHub Action Run
7 run-4.0-gemfiles/rails_8_0.gemfile - 33728651997.7 03 Sep 2026 07:33AM UTC 169
95.73
GitHub Action Run
8 run-3.3-Gemfile - 33728651997.8 03 Sep 2026 07:33AM UTC 168
95.72
GitHub Action Run
9 run-3.4-gemfiles/rails_8_0.gemfile - 33728651997.9 03 Sep 2026 07:34AM UTC 169
95.73
GitHub Action Run
10 run-3.3-gemfiles/rack_3_2.gemfile - 33728651997.10 03 Sep 2026 07:33AM UTC 168
95.72
GitHub Action Run
11 run-4.0-gemfiles/multi_xml_0_8.gemfile - 33728651997.11 03 Sep 2026 07:33AM UTC 168
47.03
GitHub Action Run
12 run-4.0-gemfiles/rails_7_2.gemfile - 33728651997.12 03 Sep 2026 07:33AM UTC 169
95.73
GitHub Action Run
13 run-3.3-gemfiles/rack_2_2.gemfile - 33728651997.13 03 Sep 2026 07:33AM UTC 168
95.68
GitHub Action Run
14 run-3.3-gemfiles/rails_8_0.gemfile - 33728651997.14 03 Sep 2026 07:33AM UTC 169
95.73
GitHub Action Run
15 run-4.0-gemfiles/multi_xml.gemfile - 33728651997.15 03 Sep 2026 07:33AM UTC 168
46.99
GitHub Action Run
16 run-4.0-Gemfile - 33728651997.16 03 Sep 2026 07:33AM UTC 168
95.72
GitHub Action Run
17 run-3.3-gemfiles/rack_3_1.gemfile - 33728651997.17 03 Sep 2026 07:33AM UTC 168
95.72
GitHub Action Run
18 run-3.4-gemfiles/rails_8_1.gemfile - 33728651997.18 03 Sep 2026 07:33AM UTC 169
95.73
GitHub Action Run
19 run-4.0-gemfiles/grape_swagger.gemfile - 33728651997.19 03 Sep 2026 07:33AM UTC 168
55.28
GitHub Action Run
20 run-4.0-gemfiles/rails_8_1.gemfile - 33728651997.20 03 Sep 2026 07:33AM UTC 169
95.73
GitHub Action Run
21 run-4.0-gemfiles/multi_json.gemfile - 33728651997.21 03 Sep 2026 07:33AM UTC 168
47.53
GitHub Action Run
22 run-3.4-gemfiles/rack_3_1.gemfile - 33728651997.22 03 Sep 2026 07:33AM UTC 168
95.72
GitHub Action Run
23 run-4.0-gemfiles/grape_entity.gemfile - 33728651997.23 03 Sep 2026 07:33AM UTC 168
50.4
GitHub Action Run
24 run-3.3-gemfiles/rails_8_1.gemfile - 33728651997.24 03 Sep 2026 07:33AM UTC 169
95.73
GitHub Action Run
25 run-3.4-Gemfile - 33728651997.25 03 Sep 2026 07:33AM UTC 168
95.72
GitHub Action Run
26 run-4.0-gemfiles/rack_3_1.gemfile - 33728651997.26 03 Sep 2026 07:33AM UTC 168
95.72
GitHub Action Run
27 run-4.0-gemfiles/dry_validation.gemfile - 33728651997.27 03 Sep 2026 07:33AM UTC 168
57.83
GitHub Action Run
28 run-3.3-gemfiles/rack_3_0.gemfile - 33728651997.28 03 Sep 2026 07:33AM UTC 168
95.72
GitHub Action Run
29 run-3.3-gemfiles/rails_7_2.gemfile - 33728651997.29 03 Sep 2026 07:33AM UTC 169
95.73
GitHub Action Run
30 run-3.4-gemfiles/rails_7_2.gemfile - 33728651997.30 03 Sep 2026 07:33AM UTC 169
95.73
GitHub Action Run
31 run-4.0-gemfiles/rack_3_2.gemfile - 33728651997.31 03 Sep 2026 07:33AM UTC 168
95.72
GitHub Action Run
32 run-3.4-gemfiles/rack_3_0.gemfile - 33728651997.32 03 Sep 2026 07:33AM UTC 168
95.72
GitHub Action Run
Source Files on build 33728651997
  • 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 #33728651997
  • 44ef2559 on github
  • Prev Build on master (#33726996561)
  • Next Build on master (#33755485219)
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