Skip to content

Commit 2a0b7cb

Browse files
committed
2.5.0
Convenience features for OpenapiFirst::Test::Coverage - Add option to skip certain responses in coverage calculation ```ruby require 'openapi_first' OpenapiFirst::Test.setup do |s| test.register('openapi/openapi.yaml') test.skip_response_coverage { it.status == '401' } end ``` - OpenapiFirst::Test.report_coverage now includes fractional digits when returning a coverage value to avoid reporting "0% / no requests made" even though some requests have been made. - Show details about invalid requests / responses in coverage report
1 parent 7eacd3a commit 2a0b7cb

4 files changed

Lines changed: 35 additions & 21 deletions

File tree

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,20 @@
22

33
## Unreleased
44

5-
- OpenapiFirst::Test.report_coverage now includes fractional digits when returning a coverage value to avoid reporting "0% / no requests made" even though some requests have been made.
5+
## 2.5.0
6+
7+
### New feature
68
- Add option to skip certain responses in coverage calculation
9+
```ruby
10+
require 'openapi_first'
11+
OpenapiFirst::Test.setup do |s|
12+
test.register('openapi/openapi.yaml')
13+
test.skip_response_coverage { it.status == '401' }
14+
end
15+
```
16+
17+
### Minor changes
18+
- OpenapiFirst::Test.report_coverage now includes fractional digits when returning a coverage value to avoid reporting "0% / no requests made" even though some requests have been made.
719
- Show details about invalid requests / responses in coverage report
820

921
## 2.4.0

Gemfile.lock

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
openapi_first (2.4.0)
4+
openapi_first (2.5.0)
55
hana (~> 1.3)
66
json_schemer (>= 2.1, < 3.0)
77
openapi_parameters (>= 0.3.3, < 2.0)
@@ -10,23 +10,23 @@ PATH
1010
GEM
1111
remote: https://rubygems.org/
1212
specs:
13-
actionpack (8.0.1)
14-
actionview (= 8.0.1)
15-
activesupport (= 8.0.1)
13+
actionpack (8.0.2)
14+
actionview (= 8.0.2)
15+
activesupport (= 8.0.2)
1616
nokogiri (>= 1.8.5)
1717
rack (>= 2.2.4)
1818
rack-session (>= 1.0.1)
1919
rack-test (>= 0.6.3)
2020
rails-dom-testing (~> 2.2)
2121
rails-html-sanitizer (~> 1.6)
2222
useragent (~> 0.16)
23-
actionview (8.0.1)
24-
activesupport (= 8.0.1)
23+
actionview (8.0.2)
24+
activesupport (= 8.0.2)
2525
builder (~> 3.1)
2626
erubi (~> 1.11)
2727
rails-dom-testing (~> 2.2)
2828
rails-html-sanitizer (~> 1.6)
29-
activesupport (8.0.1)
29+
activesupport (8.0.2)
3030
base64
3131
benchmark (>= 0.3)
3232
bigdecimal
@@ -39,15 +39,15 @@ GEM
3939
securerandom (>= 0.3)
4040
tzinfo (~> 2.0, >= 2.0.5)
4141
uri (>= 0.13.1)
42-
ast (2.4.2)
42+
ast (2.4.3)
4343
base64 (0.2.0)
4444
benchmark (0.4.0)
4545
bigdecimal (3.1.9)
4646
builder (3.3.0)
4747
concurrent-ruby (1.3.5)
4848
connection_pool (2.5.0)
4949
crass (1.0.6)
50-
diff-lcs (1.6.0)
50+
diff-lcs (1.6.1)
5151
docile (1.4.1)
5252
drb (2.2.1)
5353
erubi (1.13.1)
@@ -66,17 +66,18 @@ GEM
6666
loofah (2.24.0)
6767
crass (~> 1.0.2)
6868
nokogiri (>= 1.12.0)
69-
minitest (5.25.4)
70-
nokogiri (1.18.4-arm64-darwin)
69+
minitest (5.25.5)
70+
nokogiri (1.18.6-arm64-darwin)
7171
racc (~> 1.4)
72-
nokogiri (1.18.4-x86_64-linux-gnu)
72+
nokogiri (1.18.6-x86_64-linux-gnu)
7373
racc (~> 1.4)
7474
openapi_parameters (0.4.0)
7575
rack (>= 2.2)
7676
parallel (1.26.3)
77-
parser (3.3.7.1)
77+
parser (3.3.7.2)
7878
ast (~> 2.4.1)
7979
racc
80+
prism (1.4.0)
8081
racc (1.8.1)
8182
rack (3.1.12)
8283
rack-session (2.1.0)
@@ -109,7 +110,7 @@ GEM
109110
diff-lcs (>= 1.2.0, < 2.0)
110111
rspec-support (~> 3.13.0)
111112
rspec-support (3.13.2)
112-
rubocop (1.73.0)
113+
rubocop (1.74.0)
113114
json (~> 2.3)
114115
language_server-protocol (~> 3.17.0.2)
115116
lint_roller (~> 1.1.0)
@@ -120,8 +121,9 @@ GEM
120121
rubocop-ast (>= 1.38.0, < 2.0)
121122
ruby-progressbar (~> 1.7)
122123
unicode-display_width (>= 2.4.0, < 4.0)
123-
rubocop-ast (1.38.1)
124-
parser (>= 3.3.1.0)
124+
rubocop-ast (1.43.0)
125+
parser (>= 3.3.7.2)
126+
prism (~> 1.4)
125127
rubocop-performance (1.24.0)
126128
lint_roller (~> 1.1)
127129
rubocop (>= 1.72.1, < 2.0)

benchmarks/Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ..
33
specs:
4-
openapi_first (2.4.0)
4+
openapi_first (2.5.0)
55
hana (~> 1.3)
66
json_schemer (>= 2.1, < 3.0)
77
openapi_parameters (>= 0.3.3, < 2.0)
@@ -33,7 +33,7 @@ GEM
3333
nio4r (2.7.4)
3434
openapi_parameters (0.4.0)
3535
rack (>= 2.2)
36-
openapi_parser (2.2.3)
36+
openapi_parser (2.2.4)
3737
optparse (0.6.0)
3838
profile-viewer (0.0.4)
3939
optparse
@@ -59,7 +59,7 @@ GEM
5959
rack-session (>= 2.0.0, < 3)
6060
tilt (~> 2.0)
6161
tilt (2.6.0)
62-
vernier (1.5.0)
62+
vernier (1.6.0)
6363
webrick (1.9.1)
6464

6565
PLATFORMS

lib/openapi_first/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module OpenapiFirst
4-
VERSION = '2.4.0'
4+
VERSION = '2.5.0'
55
end

0 commit comments

Comments
 (0)