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

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

Build:
Build:
LAST BUILD BRANCH: robust_mounted_app_comparison
DEFAULT BRANCH: master
Ran 26 May 2026 06:52PM UTC
Jobs 38
Files 164
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

26 May 2026 06:49PM UTC coverage: 97.025% (+0.03%) from 96.998%
26468360905

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/

1081 of 1165 branches covered (92.79%)

Branch coverage included in aggregate %.

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

3518 of 3575 relevant lines covered (98.41%)

31700.64 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-4.0-gemfiles/multi_json.gemfile - 26468360905.1 26 May 2026 06:53PM UTC 163
36.96
GitHub Action Run
2 run-4.0-gemfiles/grape_swagger.gemfile - 26468360905.2 26 May 2026 06:55PM UTC 163
55.48
GitHub Action Run
3 run-3.4-gemfiles/rails_8_1.gemfile - 26468360905.3 26 May 2026 06:54PM UTC 164
95.75
GitHub Action Run
4 run-3.2-gemfiles/rails_8_1.gemfile - 26468360905.4 26 May 2026 06:55PM UTC 164
95.8
GitHub Action Run
5 run-3.4-Gemfile - 26468360905.5 26 May 2026 06:54PM UTC 163
95.75
GitHub Action Run
6 run-3.2-gemfiles/rack_3_0.gemfile - 26468360905.6 26 May 2026 06:55PM UTC 163
95.79
GitHub Action Run
7 run-3.3-gemfiles/rack_3_2.gemfile - 26468360905.7 26 May 2026 06:54PM UTC 163
95.75
GitHub Action Run
8 run-4.0-gemfiles/multi_xml.gemfile - 26468360905.8 26 May 2026 06:54PM UTC 163
36.96
GitHub Action Run
9 run-4.0-gemfiles/hashie.gemfile - 26468360905.9 26 May 2026 06:55PM UTC 163
62.81
GitHub Action Run
10 run-4.0-gemfiles/rack_3_2.gemfile - 26468360905.10 26 May 2026 06:53PM UTC 163
95.75
GitHub Action Run
11 run-4.0-gemfiles/rack_3_1.gemfile - 26468360905.11 26 May 2026 06:53PM UTC 163
95.75
GitHub Action Run
12 run-3.4-gemfiles/rack_2_2.gemfile - 26468360905.12 26 May 2026 06:53PM UTC 163
95.71
GitHub Action Run
13 run-3.2-gemfiles/rack_2_2.gemfile - 26468360905.13 26 May 2026 06:55PM UTC 163
95.75
GitHub Action Run
14 run-4.0-gemfiles/rack_2_2.gemfile - 26468360905.14 26 May 2026 06:53PM UTC 163
95.71
GitHub Action Run
15 run-3.3-Gemfile - 26468360905.15 26 May 2026 06:53PM UTC 163
95.75
GitHub Action Run
16 run-4.0-gemfiles/rails_7_2.gemfile - 26468360905.16 26 May 2026 06:55PM UTC 164
95.75
GitHub Action Run
17 run-3.2-Gemfile - 26468360905.17 26 May 2026 06:55PM UTC 163
95.79
GitHub Action Run
18 run-4.0-gemfiles/rack_3_0.gemfile - 26468360905.18 26 May 2026 06:52PM UTC 163
95.75
GitHub Action Run
19 run-3.4-gemfiles/rails_8_0.gemfile - 26468360905.19 26 May 2026 06:53PM UTC 164
95.75
GitHub Action Run
20 run-4.0-gemfiles/dry_validation.gemfile - 26468360905.20 26 May 2026 06:54PM UTC 163
58.58
GitHub Action Run
21 run-3.2-gemfiles/rails_8_0.gemfile - 26468360905.21 26 May 2026 06:54PM UTC 164
95.8
GitHub Action Run
22 run-4.0-gemfiles/grape_entity.gemfile - 26468360905.22 26 May 2026 06:53PM UTC 163
50.42
GitHub Action Run
23 run-3.3-gemfiles/rails_8_1.gemfile - 26468360905.23 26 May 2026 06:55PM UTC 164
95.75
GitHub Action Run
24 run-3.3-gemfiles/rack_3_1.gemfile - 26468360905.24 26 May 2026 06:55PM UTC 163
95.75
GitHub Action Run
25 run-3.4-gemfiles/rack_3_1.gemfile - 26468360905.25 26 May 2026 06:55PM UTC 163
95.75
GitHub Action Run
26 run-3.3-gemfiles/rack_2_2.gemfile - 26468360905.26 26 May 2026 06:55PM UTC 163
95.71
GitHub Action Run
27 run-3.2-gemfiles/rack_3_1.gemfile - 26468360905.27 26 May 2026 06:55PM UTC 163
95.79
GitHub Action Run
28 run-3.3-gemfiles/rails_7_2.gemfile - 26468360905.28 26 May 2026 06:54PM UTC 164
95.75
GitHub Action Run
29 run-3.4-gemfiles/rails_7_2.gemfile - 26468360905.29 26 May 2026 06:53PM UTC 164
95.75
GitHub Action Run
30 run-4.0-gemfiles/rails_8_1.gemfile - 26468360905.30 26 May 2026 06:54PM UTC 164
95.75
GitHub Action Run
31 run-4.0-gemfiles/rails_8_0.gemfile - 26468360905.31 26 May 2026 06:54PM UTC 164
95.75
GitHub Action Run
32 run-3.3-gemfiles/rails_8_0.gemfile - 26468360905.32 26 May 2026 06:54PM UTC 164
95.75
GitHub Action Run
33 run-3.4-gemfiles/rack_3_2.gemfile - 26468360905.33 26 May 2026 06:54PM UTC 163
95.75
GitHub Action Run
34 run-3.2-gemfiles/rails_7_2.gemfile - 26468360905.34 26 May 2026 06:54PM UTC 164
95.8
GitHub Action Run
35 run-3.4-gemfiles/rack_3_0.gemfile - 26468360905.35 26 May 2026 06:55PM UTC 163
95.75
GitHub Action Run
36 run-4.0-Gemfile - 26468360905.36 26 May 2026 06:54PM UTC 163
95.75
GitHub Action Run
37 run-3.2-gemfiles/rack_3_2.gemfile - 26468360905.37 26 May 2026 06:53PM UTC 163
95.79
GitHub Action Run
38 run-3.3-gemfiles/rack_3_0.gemfile - 26468360905.38 26 May 2026 06:55PM UTC 163
95.75
GitHub Action Run
Source Files on build 26468360905
  • 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 #26468360905
  • Pull Request #2741
  • PR Base - master (#26418525997)
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