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

ruby-grape / grape / 25718401504 / 10
97%
master: 97%

Build:
DEFAULT BRANCH: master
Ran 12 May 2026 06:54AM UTC
Files 157
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

12 May 2026 06:49AM UTC coverage: 95.706% (+0.02%) from 95.684%
25718401504.10

push

github

web-flow
Tighten six guard conditions via De Morgan / blank? / present? / include? (#2707)

Six spots where an `if`/`unless` clause used multiple negations
joined by `&&` or `||`, or `&.any?` on a Hash. Each rewrite expresses
the positive shape of the predicate and keeps `if` over `unless`
where natural. Same behaviour, same allocation profile (one form
even reuses a previously-recomputed `Hash#except` result).

* `Grape::API::Boolean.build` —
  `val != true && val != false` → frozen `VALUES` constant +
  `unless VALUES.include?(val)`.

* `Grape::Request#make_params` —
  `routing_args&.any? { |k, _| k != :version && k != :route_info }` +
  separate `routing_args.except(:version, :route_info)` two lines
  later → compute `except` once, gate on `filtered.blank?`.

* `Grape::Validations::ParamsScope#check_incompatible_option_values`
  (early guard) —
  `return unless default && !default.is_a?(Proc)` →
  `return if default.nil? || default.is_a?(Proc)`.

* `Grape::Validations::ParamsScope#check_incompatible_option_values`
  (raise condition) —
  `!Array(default).all? { |v| values.include?(v) }` →
  `Array(default).any? { |v| !values.include?(v) }`.

* `Grape::Validations::Validators::Base#scrub` —
  `unless value.respond_to?(:valid_encoding?) && !value.valid_encoding?`
  → `if !value.respond_to?(:valid_encoding?) || value.valid_encoding?`.

* `Grape::DSL::Routing#route` —
  `route_options&.any?` → `route_options.present?`.

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

1068 of 1177 branches covered (90.74%)

Branch coverage included in aggregate %.

3412 of 3504 relevant lines covered (97.37%)

1003.74 hits per line

Source Files on job run-4.0-gemfiles/rack_2_2.gemfile - 25718401504.10
  • Tree
  • List 157
  • Changed 5
  • Source Changed 5
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 25718401504
  • fb395c1d on github
  • Prev Job for on master (#25643371840.22)
  • Next Job for on master (#25718782466.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