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

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

Build:
Build:
LAST BUILD BRANCH: refactor/de-morgan-conditions
DEFAULT BRANCH: master
Ran 09 May 2026 08:18PM UTC
Jobs 37
Files 157
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

09 May 2026 08:17PM UTC coverage: 96.987% (+0.002%) from 96.985%
25610832363

Pull #2707

github

ericproulx
Tighten five guard conditions via De Morgan / blank? / include?

Five spots where an `if`/`unless` clause used multiple negations
joined by `&&` or `||`. 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?`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pull Request #2707: Tighten five guard conditions via De Morgan / blank? / include?

1083 of 1167 branches covered (92.8%)

Branch coverage included in aggregate %.

10 of 10 new or added lines in 5 files covered. (100.0%)

3423 of 3479 relevant lines covered (98.39%)

32164.89 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/rails_7_2.gemfile - 25610832363.1 09 May 2026 08:18PM UTC 157
95.69
GitHub Action Run
2 run-3.4-gemfiles/rails_8_0.gemfile - 25610832363.2 09 May 2026 08:18PM UTC 157
95.69
GitHub Action Run
3 run-4.0-gemfiles/dry_validation.gemfile - 25610832363.3 09 May 2026 08:19PM UTC 156
58.23
GitHub Action Run
4 run-3.3-gemfiles/rack_3_1.gemfile - 25610832363.4 09 May 2026 08:18PM UTC 156
95.66
GitHub Action Run
5 run-3.2-gemfiles/rails_8_1.gemfile - 25610832363.5 09 May 2026 08:18PM UTC 157
95.71
GitHub Action Run
6 run-3.2-gemfiles/rack_3_0.gemfile - 25610832363.6 09 May 2026 08:18PM UTC 156
95.71
GitHub Action Run
7 run-3.3-gemfiles/rails_7_2.gemfile - 25610832363.7 09 May 2026 08:18PM UTC 157
95.67
GitHub Action Run
8 run-3.3-Gemfile - 25610832363.8 09 May 2026 08:18PM UTC 156
95.66
GitHub Action Run
9 run-3.4-gemfiles/rack_2_2.gemfile - 25610832363.9 09 May 2026 08:19PM UTC 156
95.64
GitHub Action Run
10 run-4.0-gemfiles/rails_8_0.gemfile - 25610832363.10 09 May 2026 08:18PM UTC 157
95.69
GitHub Action Run
11 run-4.0-gemfiles/grape_entity.gemfile - 25610832363.11 09 May 2026 08:19PM UTC 156
50.01
GitHub Action Run
12 run-3.3-gemfiles/rails_8_1.gemfile - 25610832363.12 09 May 2026 08:19PM UTC 157
95.67
GitHub Action Run
13 run-3.2-gemfiles/rails_8_0.gemfile - 25610832363.13 09 May 2026 08:18PM UTC 157
95.71
GitHub Action Run
14 run-4.0-gemfiles/rails_8_1.gemfile - 25610832363.14 09 May 2026 08:19PM UTC 157
95.69
GitHub Action Run
15 run-4.0-Gemfile - 25610832363.15 09 May 2026 08:19PM UTC 156
95.69
GitHub Action Run
16 run-3.2-gemfiles/rack_3_1.gemfile - 25610832363.16 09 May 2026 08:18PM UTC 156
95.71
GitHub Action Run
17 run-4.0-gemfiles/rack_3_0.gemfile - 25610832363.17 09 May 2026 08:19PM UTC 156
95.69
GitHub Action Run
18 run-3.4-gemfiles/rack_3_1.gemfile - 25610832363.18 09 May 2026 08:18PM UTC 156
95.69
GitHub Action Run
19 run-3.4-Gemfile - 25610832363.19 09 May 2026 08:19PM UTC 156
95.69
GitHub Action Run
20 run-3.3-gemfiles/rack_2_2.gemfile - 25610832363.20 09 May 2026 08:19PM UTC 156
95.62
GitHub Action Run
21 run-3.3-gemfiles/rack_3_0.gemfile - 25610832363.21 09 May 2026 08:18PM UTC 156
95.66
GitHub Action Run
22 run-3.3-gemfiles/rails_8_0.gemfile - 25610832363.22 09 May 2026 08:18PM UTC 157
95.67
GitHub Action Run
23 run-4.0-gemfiles/hashie.gemfile - 25610832363.23 09 May 2026 08:19PM UTC 156
62.83
GitHub Action Run
24 run-3.4-gemfiles/rails_8_1.gemfile - 25610832363.24 09 May 2026 08:19PM UTC 157
95.69
GitHub Action Run
25 run-3.4-gemfiles/rack_3_2.gemfile - 25610832363.25 09 May 2026 08:18PM UTC 156
95.69
GitHub Action Run
26 run-4.0-gemfiles/multi_json.gemfile - 25610832363.26 09 May 2026 08:19PM UTC 156
36.07
GitHub Action Run
27 run-3.2-gemfiles/rails_7_2.gemfile - 25610832363.27 09 May 2026 08:18PM UTC 157
95.71
GitHub Action Run
28 run-3.2-gemfiles/rack_3_2.gemfile - 25610832363.28 09 May 2026 08:18PM UTC 156
95.71
GitHub Action Run
29 run-4.0-gemfiles/rack_2_2.gemfile - 25610832363.29 09 May 2026 08:18PM UTC 156
95.64
GitHub Action Run
30 run-3.2-Gemfile - 25610832363.30 09 May 2026 08:18PM UTC 156
95.71
GitHub Action Run
31 run-4.0-gemfiles/rack_3_2.gemfile - 25610832363.31 09 May 2026 08:18PM UTC 156
95.69
GitHub Action Run
32 run-3.4-gemfiles/rack_3_0.gemfile - 25610832363.32 09 May 2026 08:19PM UTC 156
95.69
GitHub Action Run
33 run-3.4-gemfiles/rails_7_2.gemfile - 25610832363.33 09 May 2026 08:18PM UTC 157
95.69
GitHub Action Run
34 run-3.2-gemfiles/rack_2_2.gemfile - 25610832363.34 09 May 2026 08:19PM UTC 156
95.67
GitHub Action Run
35 run-4.0-gemfiles/rack_3_1.gemfile - 25610832363.35 09 May 2026 08:18PM UTC 156
95.69
GitHub Action Run
36 run-4.0-gemfiles/multi_xml.gemfile - 25610832363.36 09 May 2026 08:19PM UTC 156
36.07
GitHub Action Run
37 run-3.3-gemfiles/rack_3_2.gemfile - 25610832363.37 09 May 2026 08:18PM UTC 156
95.66
GitHub Action Run
Source Files on build 25610832363
  • Tree
  • List 157
  • Changed 4
  • Source Changed 4
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #25610832363
  • Pull Request #2707
  • PR Base - master (#25608800647)
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