fitting 4.0.0 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +59 -3
- data/lib/fitting/doc/json_schema.rb +0 -4
- data/lib/fitting/doc.rb +7 -7
- data/lib/fitting/nocov.rb +4 -0
- data/lib/fitting/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2ee2d75d894fdf2bba32957175322c532007e0ac56afcd1e35f6f2787c63c9c
|
4
|
+
data.tar.gz: 551bc32b2c060397915283b26d970d360954eb3dae25c0e15f26992fe3393e1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06e9c8a1fa3062cb34a9ecb655393691cf856ed28a7605949284b7fb6acb3c0efa9d3d7e7eafc6c7a41ffd7923659816dc8b985b1934e8cf353ae8603365d1ae
|
7
|
+
data.tar.gz: b99972509015910ae7d70a10d65f316e96ac2556230e2b3ed0d6ca33311c68cbb95c7f80c0c59c82eef6f470fcc66e4e0bd247efd811555bfe6091e953c55b95
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -312,7 +312,7 @@ APIs:
|
|
312
312
|
It is not necessary to immediately describe each host in detail, you can only specify its name and skip it until you are ready to documented it
|
313
313
|
|
314
314
|
```yaml
|
315
|
-
|
315
|
+
SkipValidation:
|
316
316
|
- host: api.cluster.dyte.in
|
317
317
|
```
|
318
318
|
|
@@ -321,7 +321,7 @@ SkipAPIs:
|
|
321
321
|
If you want to skip a specific prefix in the host
|
322
322
|
|
323
323
|
```yaml
|
324
|
-
|
324
|
+
SkipValidation:
|
325
325
|
- host: api.cluster.dyte.in
|
326
326
|
prefix: /admin/api
|
327
327
|
```
|
@@ -331,7 +331,7 @@ SkipAPIs:
|
|
331
331
|
If you want to skip a specific request in the host
|
332
332
|
|
333
333
|
```yaml
|
334
|
-
|
334
|
+
SkipValidation:
|
335
335
|
- host: api.cluster.dyte.in
|
336
336
|
method: GET
|
337
337
|
path: /api/v1/cars
|
@@ -341,6 +341,20 @@ SkipAPIs:
|
|
341
341
|
|
342
342
|
It is not necessary to immediately test each doc in detail, you can only specify its name and skip it until you are ready to test it
|
343
343
|
|
344
|
+
#### host
|
345
|
+
```yaml
|
346
|
+
NoCov:
|
347
|
+
- host: sso.test
|
348
|
+
```
|
349
|
+
|
350
|
+
#### method
|
351
|
+
```yaml
|
352
|
+
NoCov:
|
353
|
+
- host: sso.test
|
354
|
+
method: GET
|
355
|
+
```
|
356
|
+
|
357
|
+
#### path
|
344
358
|
```yaml
|
345
359
|
NoCov:
|
346
360
|
- host: sso.test
|
@@ -348,6 +362,48 @@ NoCov:
|
|
348
362
|
path: /users/{userId}
|
349
363
|
```
|
350
364
|
|
365
|
+
#### code
|
366
|
+
```yaml
|
367
|
+
NoCov:
|
368
|
+
- host: sso.test
|
369
|
+
method: GET
|
370
|
+
path: /users/{userId}
|
371
|
+
code: 200
|
372
|
+
```
|
373
|
+
|
374
|
+
#### content-type
|
375
|
+
```yaml
|
376
|
+
NoCov:
|
377
|
+
- host: sso.test
|
378
|
+
method: GET
|
379
|
+
path: /users/{userId}
|
380
|
+
code: 200
|
381
|
+
content-type: application/json
|
382
|
+
```
|
383
|
+
|
384
|
+
#### combination
|
385
|
+
```yaml
|
386
|
+
NoCov:
|
387
|
+
- host: sso.test
|
388
|
+
method: GET
|
389
|
+
path: /users/{userId}
|
390
|
+
code: 200
|
391
|
+
content-type: application/json
|
392
|
+
combination: oneOf.0
|
393
|
+
```
|
394
|
+
|
395
|
+
#### combination_next
|
396
|
+
```yaml
|
397
|
+
NoCov:
|
398
|
+
- host: sso.test
|
399
|
+
method: GET
|
400
|
+
path: /users/{userId}
|
401
|
+
code: 200
|
402
|
+
content-type: application/json
|
403
|
+
combination: oneOf.0
|
404
|
+
combination_next: oneOf.0.required.users
|
405
|
+
```
|
406
|
+
|
351
407
|
### Debug
|
352
408
|
|
353
409
|
If you find bug, you can debug it or create task in this github project with new file `coverage/fitting.debug.yml`
|
data/lib/fitting/doc.rb
CHANGED
@@ -80,16 +80,16 @@ module Fitting
|
|
80
80
|
raise NotFound
|
81
81
|
end
|
82
82
|
|
83
|
-
def self.report(
|
83
|
+
def self.report(actions)
|
84
84
|
all = 0
|
85
85
|
cov = 0
|
86
|
-
|
87
|
-
|
88
|
-
if
|
89
|
-
|
90
|
-
elsif
|
86
|
+
actions.each do |action|
|
87
|
+
action.to_hash.values.first.each do |cover_line|
|
88
|
+
if cover_line == nil
|
89
|
+
next
|
90
|
+
elsif cover_line == 0
|
91
91
|
all += 1
|
92
|
-
elsif
|
92
|
+
elsif cover_line > 0
|
93
93
|
all += 1
|
94
94
|
cov += 1
|
95
95
|
end
|
data/lib/fitting/nocov.rb
CHANGED
@@ -29,6 +29,10 @@ module Fitting
|
|
29
29
|
raise NotFound.new("host: #{@host}, method: #{@method}, path: #{@path}")
|
30
30
|
end
|
31
31
|
|
32
|
+
if res == nil
|
33
|
+
raise NotFound.new("host: #{@host}, method: #{@method}, path: #{@path}")
|
34
|
+
end
|
35
|
+
|
32
36
|
res_code = res.responses.find { |response| response.step_key == @code.to_s }
|
33
37
|
|
34
38
|
if @content_type == nil
|
data/lib/fitting/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fitting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- d.efimov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json-schema
|