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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: acf56757fc3fe3dca52c0ffc19624debab877fd8f9ea71ffa891ab19674c1a65
4
- data.tar.gz: c2238a9ad8374f72075aa07b48323910bfb670ab57f95dfff6ca12dace14faaf
3
+ metadata.gz: b2ee2d75d894fdf2bba32957175322c532007e0ac56afcd1e35f6f2787c63c9c
4
+ data.tar.gz: 551bc32b2c060397915283b26d970d360954eb3dae25c0e15f26992fe3393e1e
5
5
  SHA512:
6
- metadata.gz: 3e2a972498110e3c2b8ea625d0b7e73f5a127209b94e3f4373cf49a3cd38eb5c04483e876dc07bcb9b71ee3c90c7b5900e8fe31fc73ce39aec597bf70fad7e88
7
- data.tar.gz: debb064c3590bc59c5a783d3546d4de6f75727ab4aa354d3e40f6548f7b72cc8ae9b05a1d009dab55aa0eba900a0e783979265c38dfda89b483f64c3e0f2d6ee
6
+ metadata.gz: 06e9c8a1fa3062cb34a9ecb655393691cf856ed28a7605949284b7fb6acb3c0efa9d3d7e7eafc6c7a41ffd7923659816dc8b985b1934e8cf353ae8603365d1ae
7
+ data.tar.gz: b99972509015910ae7d70a10d65f316e96ac2556230e2b3ed0d6ca33311c68cbb95c7f80c0c59c82eef6f470fcc66e4e0bd247efd811555bfe6091e953c55b95
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Change log
2
2
 
3
+ ### 4.0.1 - 2023-02-16
4
+
5
+ * patch
6
+ * fix more info error if not found nocov
7
+ * fix deep nocov
8
+ * fix deep check result coverage for console
9
+
3
10
  ### 4.0.0 - 2023-02-03
4
11
 
5
12
  * features
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
- SkipAPIs:
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
- SkipAPIs:
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
- SkipAPIs:
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`
@@ -79,10 +79,6 @@ module Fitting
79
79
  end_index
80
80
  end
81
81
 
82
- def nocover!
83
- @step_cover_size = nil
84
- end
85
-
86
82
  def to_hash
87
83
  @step_key
88
84
  end
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(docs)
83
+ def self.report(actions)
84
84
  all = 0
85
85
  cov = 0
86
- docs.each do |provid|
87
- provid.to_hash.values.first.each do |prov|
88
- if prov == nil
89
- break
90
- elsif prov == 0
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 prov > 0
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
@@ -1,3 +1,3 @@
1
1
  module Fitting
2
- VERSION = '4.0.0'.freeze
2
+ VERSION = '4.0.1'.freeze
3
3
  end
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.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-03 00:00:00.000000000 Z
11
+ date: 2023-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json-schema