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

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

Build:
Build:
LAST BUILD BRANCH: refactor/validation-errors-drop-enumerable
DEFAULT BRANCH: master
Ran 23 May 2026 06:39PM UTC
Jobs 38
Files 164
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

23 May 2026 06:39PM UTC coverage: 97.004% (+0.03%) from 96.977%
26340504005

Pull #2741

github

ericproulx
Readability pass: guard clauses, small refactors across lib/

Mostly cosmetic, no behavior change except where noted.

Guard-clause lifts (lift the short-circuit above the if/elsif/else,
let the main flow sit at top indentation):

- `Grape::DSL::Logger#logger`, `DSL::InsideRoute#stream`/`#return_no_content`
- `Grape::Formatter::SerializableHash#serialize`
- `Grape::Middleware::Base#merge_default_options`
- `Grape::Middleware::Error#redispatch`
- `Grape::Middleware::Formatter` (`call!`, `negotiate_content_type`)
- `Grape::Router::Pattern#build_path_from_pattern`
- `Grape::ServeStream::SendfileResponse#respond_to?`
- `Grape::Validations::ParamsScope#configure_declared_params`
- `Grape::Exceptions::ErrorResponse.coerce` (case/when reformatted)

Small extractions:

- `DSL::Entity#entity_class_for_obj`: extract `object_class(object)`
  private helper.
- `DSL::InsideRoute#status`: collapse Symbol/Integer branches and
  extract `default_status` private helper. Error message for an
  unknown status symbol now bubbles up `Rack::Utils.status_code`'s
  own message ("Unrecognized status code :foo_bar") instead of
  Grape's pre-validation message ("Status code :foo_bar is invalid.");
  spec updated.
- `DSL::InsideRoute#stream`: extract `stream_body(value)` private
  helper.
- `DSL::InsideRoute#return_no_content`: drop the redundant `status 204`
  call — `body false` already sets it via the `body` setter.

Minor: `return nil unless` → `return unless` in `Grape::API::Boolean.build`
and `PrimitiveCoercer#call`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pull Request #2741: Readability pass: guard clauses + small refactors across lib/

1082 of 1167 branches covered (92.72%)

Branch coverage included in aggregate %.

48 of 52 new or added lines in 14 files covered. (92.31%)

3516 of 3573 relevant lines covered (98.4%)

31695.45 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
50.0
4.55% lib/grape/serve_stream/sendfile_response.rb
1
93.41
0.0% lib/grape/dsl/request_response.rb
1
77.42
-1.99% lib/grape/formatter/serializable_hash.rb
Jobs
ID Job ID Ran Files Coverage
1 run-3.2-gemfiles/rack_3_1.gemfile - 26340504005.1 23 May 2026 06:40PM UTC 163
95.77
GitHub Action Run
2 run-3.2-Gemfile - 26340504005.2 23 May 2026 06:40PM UTC 163
95.77
GitHub Action Run
3 run-4.0-gemfiles/multi_xml.gemfile - 26340504005.3 23 May 2026 06:40PM UTC 163
36.89
GitHub Action Run
4 run-4.0-gemfiles/rack_3_2.gemfile - 26340504005.4 23 May 2026 06:41PM UTC 163
95.73
GitHub Action Run
5 run-3.4-gemfiles/rails_8_0.gemfile - 26340504005.5 23 May 2026 06:41PM UTC 164
95.73
GitHub Action Run
6 run-3.3-gemfiles/rack_3_1.gemfile - 26340504005.6 23 May 2026 06:40PM UTC 163
95.73
GitHub Action Run
7 run-3.2-gemfiles/rails_8_0.gemfile - 26340504005.7 23 May 2026 06:40PM UTC 164
95.78
GitHub Action Run
8 run-4.0-gemfiles/rails_7_2.gemfile - 26340504005.8 24 May 2026 08:54PM UTC 164
95.73
GitHub Action Run
9 run-3.4-gemfiles/rack_2_2.gemfile - 26340504005.9 23 May 2026 06:40PM UTC 163
95.69
GitHub Action Run
10 run-4.0-gemfiles/rails_8_0.gemfile - 26340504005.10 23 May 2026 06:40PM UTC 164
95.73
GitHub Action Run
11 run-3.3-gemfiles/rails_8_0.gemfile - 26340504005.11 23 May 2026 06:40PM UTC 164
95.73
GitHub Action Run
12 run-3.2-gemfiles/rails_8_1.gemfile - 26340504005.12 23 May 2026 06:40PM UTC 164
95.78
GitHub Action Run
13 run-4.0-gemfiles/dry_validation.gemfile - 26340504005.13 24 May 2026 08:54PM UTC 163
58.52
GitHub Action Run
14 run-3.2-gemfiles/rails_7_2.gemfile - 26340504005.14 23 May 2026 06:40PM UTC 164
95.78
GitHub Action Run
15 run-3.2-gemfiles/rack_2_2.gemfile - 26340504005.15 23 May 2026 06:40PM UTC 163
95.73
GitHub Action Run
16 run-4.0-gemfiles/multi_json.gemfile - 26340504005.16 23 May 2026 06:40PM UTC 163
36.89
GitHub Action Run
17 run-4.0-gemfiles/grape_entity.gemfile - 26340504005.17 23 May 2026 06:41PM UTC 163
50.36
GitHub Action Run
18 run-3.2-gemfiles/rack_3_0.gemfile - 26340504005.18 23 May 2026 06:40PM UTC 163
95.77
GitHub Action Run
19 run-4.0-gemfiles/rack_2_2.gemfile - 26340504005.19 23 May 2026 06:40PM UTC 163
95.69
GitHub Action Run
20 run-3.4-gemfiles/rails_7_2.gemfile - 26340504005.20 23 May 2026 06:40PM UTC 164
95.73
GitHub Action Run
21 run-3.4-gemfiles/rails_8_1.gemfile - 26340504005.21 23 May 2026 06:41PM UTC 164
95.73
GitHub Action Run
22 run-4.0-gemfiles/rack_3_1.gemfile - 26340504005.22 23 May 2026 06:41PM UTC 163
95.73
GitHub Action Run
23 run-3.4-gemfiles/rack_3_1.gemfile - 26340504005.23 24 May 2026 08:54PM UTC 163
95.73
GitHub Action Run
24 run-3.3-gemfiles/rails_7_2.gemfile - 26340504005.24 23 May 2026 06:40PM UTC 164
95.73
GitHub Action Run
25 run-3.4-gemfiles/rack_3_2.gemfile - 26340504005.25 24 May 2026 08:54PM UTC 163
95.73
GitHub Action Run
26 run-3.4-Gemfile - 26340504005.26 23 May 2026 06:40PM UTC 163
95.73
GitHub Action Run
27 run-4.0-gemfiles/grape_swagger.gemfile - 26340504005.27 23 May 2026 06:39PM UTC 163
55.41
GitHub Action Run
28 run-3.3-gemfiles/rack_3_2.gemfile - 26340504005.28 23 May 2026 06:40PM UTC 163
95.73
GitHub Action Run
29 run-3.3-gemfiles/rack_2_2.gemfile - 26340504005.29 23 May 2026 06:40PM UTC 163
95.69
GitHub Action Run
30 run-4.0-gemfiles/rack_3_0.gemfile - 26340504005.30 23 May 2026 06:41PM UTC 163
95.73
GitHub Action Run
31 run-3.3-gemfiles/rack_3_0.gemfile - 26340504005.31 23 May 2026 06:40PM UTC 163
95.73
GitHub Action Run
32 run-3.3-Gemfile - 26340504005.32 23 May 2026 06:40PM UTC 163
95.73
GitHub Action Run
33 run-3.3-gemfiles/rails_8_1.gemfile - 26340504005.33 23 May 2026 06:41PM UTC 164
95.73
GitHub Action Run
34 run-3.2-gemfiles/rack_3_2.gemfile - 26340504005.34 23 May 2026 06:40PM UTC 163
95.77
GitHub Action Run
35 run-4.0-Gemfile - 26340504005.35 23 May 2026 06:40PM UTC 163
95.73
GitHub Action Run
36 run-4.0-gemfiles/hashie.gemfile - 26340504005.36 23 May 2026 06:40PM UTC 163
62.75
GitHub Action Run
37 run-4.0-gemfiles/rails_8_1.gemfile - 26340504005.37 23 May 2026 06:41PM UTC 164
95.73
GitHub Action Run
38 run-3.4-gemfiles/rack_3_0.gemfile - 26340504005.38 23 May 2026 06:41PM UTC 163
95.73
GitHub Action Run
Source Files on build 26340504005
  • Tree
  • List 164
  • Changed 14
  • Source Changed 14
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #26340504005
  • Pull Request #2741
  • PR Base - master (#26292056269)
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