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

ruby-grape / grape / 25137726391 / 4
97%
master: 97%

Build:
DEFAULT BRANCH: master
Ran 29 Apr 2026 10:45PM UTC
Files 154
Run time 6s
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

29 Apr 2026 10:43PM UTC coverage: 95.656% (-0.004%) from 95.66%
25137726391.4

push

github

web-flow
Lift trailing if/else into guard clauses (#2695)

Four methods ended in an `if/else` where one branch was a one-line
special-case detour and the other was the main flow. The `else`
existed only as a syntactic counterpart to `if`, pushing multi-line
main paths down an extra indentation level.

- `Grape::DSL::Parameters#requires` — `if opts[:using]` is the
  shortcut form; the main flow is `validate_attributes` + scope/push.
- `Grape::DSL::Parameters#optional` — same shape.
- `Grape::DSL::Parameters#declared_param?` — `if lateral?` delegates
  to `@parent`; the main flow is the `.any?` check.
- `Grape::API.configure` — `unless block_given?` returns the config
  reader; the main flow yields and returns `self`.

Each now uses a `return … if …` guard, leaving the main flow at the
method's top indentation. No behavior change; all 2,236 specs pass.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

1053 of 1161 branches covered (90.7%)

Branch coverage included in aggregate %.

3307 of 3397 relevant lines covered (97.35%)

1007.68 hits per line

Source Files on job run-4.0-gemfiles/rack_3_2.gemfile - 25137726391.4
  • Tree
  • List 154
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 25137726391
  • d234bfa5 on github
  • Prev Job for on master (#24756585669.18)
  • Next Job for on master (#25254882190.2)
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