fitting 2.18.2 → 2.18.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/fitting.gemspec +2 -0
- data/lib/fitting/report/console.rb +32 -12
- data/lib/fitting/version.rb +1 -1
- data/lib/tasks/fitting.rake +1 -0
- metadata +22 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 140967f23d0706212f16a4239f33e409fbb0430e7e7295850501426992909eed
|
4
|
+
data.tar.gz: 1178f1070ea69b6a1ed9e76cb7904c11a23e6d41652eba2fa587353c0e1cb6ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7649a6fa86471ab46d38e67ec1ae9bd30141802a8169f966558db9fadd1db22fc904c2ff185870937831e93411aaf81fb44dffd16a9f87ac7e71c3cc40108c2b
|
7
|
+
data.tar.gz: 9787db0e0c9bbd3f2f3b23fc0d10996642774838f41d974f3f90421b69a5d425c663d9675915a4275031d371f462aeeb799c71e2b819c2abe82df7faa1f2d1a9
|
data/CHANGELOG.md
CHANGED
data/fitting.gemspec
CHANGED
@@ -20,7 +20,9 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.required_ruby_version = '>= 2.6.0'
|
22
22
|
spec.add_runtime_dependency 'json-schema', '~> 2.6', '>= 2.6.2'
|
23
|
+
spec.add_runtime_dependency 'terminal-table', '~> 3.0', '>= 3.0.2'
|
23
24
|
spec.add_runtime_dependency 'tomograph', '~> 3.1', '>= 3.1.0'
|
25
|
+
|
24
26
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
25
27
|
spec.add_development_dependency 'byebug', '~> 11.1', '>= 11.1.3'
|
26
28
|
spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6'
|
@@ -1,30 +1,50 @@
|
|
1
|
+
require 'terminal-table'
|
2
|
+
|
1
3
|
module Fitting
|
2
4
|
module Report
|
3
5
|
class Console
|
4
6
|
def initialize(tests_without_prefixes, prefixes_details)
|
5
7
|
@tests_without_prefixes = tests_without_prefixes
|
6
8
|
@prefixes_details = prefixes_details
|
9
|
+
|
7
10
|
@good = true
|
8
11
|
@tests_without_actions = []
|
9
12
|
@tests_without_responses = []
|
10
13
|
end
|
11
14
|
|
12
15
|
def output
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
16
|
+
tables = []
|
17
|
+
|
18
|
+
@prefixes_details.each do |prefix_details|
|
19
|
+
title = prefix_details[:name]
|
20
|
+
@tests_without_actions += prefix_details[:actions][:tests_without_actions] # непонятно что такое
|
21
|
+
|
22
|
+
next if prefix_details[:actions][:actions_details].count.zero?
|
23
|
+
|
24
|
+
tables << Terminal::Table.new do |t|
|
25
|
+
t.title = title
|
26
|
+
t.headings = %w[method path cover]
|
27
|
+
|
28
|
+
prefix_details[:actions][:actions_details].each do |action|
|
29
|
+
@tests_without_responses += action[:responses][:tests_without_responses]
|
30
|
+
|
31
|
+
path_details = action[:responses][:responses_details].map do |responses_detail|
|
32
|
+
@good = false if responses_detail[:combinations][:cover_percent] != '100%'
|
33
|
+
[responses_detail[:combinations][:cover_percent], responses_detail[:method]]
|
34
|
+
end.join(' ')
|
35
|
+
|
36
|
+
t.add_row [action[:method], action[:path], path_details]
|
23
37
|
end
|
24
|
-
|
38
|
+
|
39
|
+
t.style = { all_separators: true, border: :unicode }
|
25
40
|
end
|
26
41
|
end
|
27
|
-
|
42
|
+
|
43
|
+
tables
|
44
|
+
end
|
45
|
+
|
46
|
+
def output_sum
|
47
|
+
doc_res = ''
|
28
48
|
doc_res += "tests_without_prefixes: #{@tests_without_prefixes.size}\n"
|
29
49
|
doc_res += "tests_without_actions: #{@tests_without_actions.size}\n"
|
30
50
|
doc_res += "tests_without_responses: #{@tests_without_responses.size}\n"
|
data/lib/fitting/version.rb
CHANGED
data/lib/tasks/fitting.rake
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: 2.18.
|
4
|
+
version: 2.18.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- d.efimov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json-schema
|
@@ -30,6 +30,26 @@ dependencies:
|
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.6.2
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: terminal-table
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '3.0'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 3.0.2
|
43
|
+
type: :runtime
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '3.0'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 3.0.2
|
33
53
|
- !ruby/object:Gem::Dependency
|
34
54
|
name: tomograph
|
35
55
|
requirement: !ruby/object:Gem::Requirement
|