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

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

Build:
Build:
LAST BUILD BRANCH: refactor/de-morgan-conditions
DEFAULT BRANCH: master
Ran 09 May 2026 08:20PM 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:20PM UTC coverage: 97.007% (+0.02%) from 96.985%
25610885355

Pull #2707

github

ericproulx
Tighten six guard conditions via De Morgan / blank? / present? / include?

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>
Pull Request #2707: Tighten five guard conditions via De Morgan / blank? / include?

1082 of 1165 branches covered (92.88%)

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%)

32165.44 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/rails_7_2.gemfile - 25610885355.1 09 May 2026 08:20PM UTC 157
95.71
GitHub Action Run
2 run-3.2-gemfiles/rails_7_2.gemfile - 25610885355.2 09 May 2026 08:21PM UTC 157
95.73
GitHub Action Run
3 run-3.2-gemfiles/rails_8_0.gemfile - 25610885355.3 09 May 2026 08:20PM UTC 157
95.73
GitHub Action Run
4 run-3.4-gemfiles/rails_7_2.gemfile - 25610885355.4 09 May 2026 08:20PM UTC 157
95.71
GitHub Action Run
5 run-3.4-Gemfile - 25610885355.5 09 May 2026 08:21PM UTC 156
95.7
GitHub Action Run
6 run-3.3-gemfiles/rack_3_1.gemfile - 25610885355.6 09 May 2026 08:20PM UTC 156
95.68
GitHub Action Run
7 run-3.4-gemfiles/rails_8_0.gemfile - 25610885355.7 09 May 2026 08:21PM UTC 157
95.71
GitHub Action Run
8 run-3.3-gemfiles/rails_8_1.gemfile - 25610885355.8 09 May 2026 08:21PM UTC 157
95.69
GitHub Action Run
9 run-3.3-gemfiles/rails_7_2.gemfile - 25610885355.9 09 May 2026 08:21PM UTC 157
95.69
GitHub Action Run
10 run-3.3-gemfiles/rack_3_0.gemfile - 25610885355.10 09 May 2026 08:20PM UTC 156
95.68
GitHub Action Run
11 run-3.4-gemfiles/rails_8_1.gemfile - 25610885355.11 09 May 2026 08:21PM UTC 157
95.71
GitHub Action Run
12 run-3.2-gemfiles/rack_3_0.gemfile - 25610885355.12 09 May 2026 08:20PM UTC 156
95.73
GitHub Action Run
13 run-3.2-gemfiles/rack_3_2.gemfile - 25610885355.13 09 May 2026 08:20PM UTC 156
95.73
GitHub Action Run
14 run-3.3-gemfiles/rails_8_0.gemfile - 25610885355.14 09 May 2026 08:20PM UTC 157
95.69
GitHub Action Run
15 run-3.2-gemfiles/rails_8_1.gemfile - 25610885355.15 09 May 2026 08:21PM UTC 157
95.73
GitHub Action Run
16 run-4.0-gemfiles/rack_2_2.gemfile - 25610885355.16 09 May 2026 08:20PM UTC 156
95.66
GitHub Action Run
17 run-4.0-Gemfile - 25610885355.17 09 May 2026 08:20PM UTC 156
95.7
GitHub Action Run
18 run-4.0-gemfiles/rack_3_0.gemfile - 25610885355.18 09 May 2026 08:21PM UTC 156
95.7
GitHub Action Run
19 run-4.0-gemfiles/rack_3_2.gemfile - 25610885355.19 09 May 2026 08:20PM UTC 156
95.7
GitHub Action Run
20 run-3.3-Gemfile - 25610885355.20 09 May 2026 08:21PM UTC 156
95.68
GitHub Action Run
21 run-4.0-gemfiles/rails_8_0.gemfile - 25610885355.21 09 May 2026 08:21PM UTC 157
95.71
GitHub Action Run
22 run-3.4-gemfiles/rack_3_0.gemfile - 25610885355.22 09 May 2026 08:21PM UTC 156
95.7
GitHub Action Run
23 run-4.0-gemfiles/hashie.gemfile - 25610885355.23 09 May 2026 08:20PM UTC 156
62.83
GitHub Action Run
24 run-4.0-gemfiles/dry_validation.gemfile - 25610885355.24 09 May 2026 08:20PM UTC 156
58.23
GitHub Action Run
25 run-3.4-gemfiles/rack_3_2.gemfile - 25610885355.25 09 May 2026 08:21PM UTC 156
95.7
GitHub Action Run
26 run-4.0-gemfiles/grape_entity.gemfile - 25610885355.26 09 May 2026 08:21PM UTC 156
50.01
GitHub Action Run
27 run-4.0-gemfiles/multi_json.gemfile - 25610885355.27 09 May 2026 08:21PM UTC 156
36.07
GitHub Action Run
28 run-3.4-gemfiles/rack_2_2.gemfile - 25610885355.28 09 May 2026 08:20PM UTC 156
95.66
GitHub Action Run
29 run-3.3-gemfiles/rack_3_2.gemfile - 25610885355.29 09 May 2026 08:20PM UTC 156
95.68
GitHub Action Run
30 run-3.3-gemfiles/rack_2_2.gemfile - 25610885355.30 09 May 2026 08:20PM UTC 156
95.64
GitHub Action Run
31 run-3.4-gemfiles/rack_3_1.gemfile - 25610885355.31 09 May 2026 08:21PM UTC 156
95.7
GitHub Action Run
32 run-3.2-gemfiles/rack_3_1.gemfile - 25610885355.32 09 May 2026 08:20PM UTC 156
95.73
GitHub Action Run
33 run-3.2-Gemfile - 25610885355.33 09 May 2026 08:20PM UTC 156
95.73
GitHub Action Run
34 run-4.0-gemfiles/multi_xml.gemfile - 25610885355.34 09 May 2026 08:21PM UTC 156
36.07
GitHub Action Run
35 run-4.0-gemfiles/rack_3_1.gemfile - 25610885355.35 09 May 2026 08:21PM UTC 156
95.7
GitHub Action Run
36 run-4.0-gemfiles/rails_8_1.gemfile - 25610885355.36 09 May 2026 08:21PM UTC 157
95.71
GitHub Action Run
37 run-3.2-gemfiles/rack_2_2.gemfile - 25610885355.37 09 May 2026 08:20PM UTC 156
95.69
GitHub Action Run
Source Files on build 25610885355
  • Tree
  • List 157
  • Changed 5
  • Source Changed 5
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #25610885355
  • 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