hospital 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/hospital/formatter/pre.rb +2 -1
- data/lib/hospital/formatter/raw.rb +4 -3
- data/lib/hospital/formatter/shell.rb +2 -1
- data/lib/hospital/string_formatter.rb +4 -0
- data/lib/hospital/version.rb +1 -1
- data/lib/hospital.rb +5 -3
- 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: b7abce524070f1b1275fe021c20e42f046a856c460007c30ab859fc1173c6bfd
|
|
4
|
+
data.tar.gz: f5e1eebdaeab9d799524ce3fdbca6efd9e54ae215b5100a77cf3367b08ac4e1a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 37f5f27286a859bdcb4c54f380ac3f9af6cd9b907310f4434e340ab3e4bce388bcb5369ddfe2f191b5612a5bdc57bbcd9659bbbea5ddcd01d7b8566d055ce3dd
|
|
7
|
+
data.tar.gz: 75c6a04304725ebe87adcfff3239d563b7a1a01b04d8af784c127ed68c259d5af609f8a417dfae54a85af38a7dcc9021fb1bfa5733a2e7516c3f8358998e9d73
|
|
@@ -17,12 +17,13 @@ module Hospital
|
|
|
17
17
|
@buffer << "\n\n## Skipped #{text}"
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
def put_summary errors_count, warnings_count
|
|
20
|
+
def put_summary errors_count, warnings_count, infos_count
|
|
21
21
|
@buffer << <<~END
|
|
22
22
|
\n\n
|
|
23
23
|
#### Summary:
|
|
24
24
|
Errors: #{errors_count}
|
|
25
25
|
Warnings: #{warnings_count}
|
|
26
|
+
Infos: #{infos_count}
|
|
26
27
|
END
|
|
27
28
|
end
|
|
28
29
|
|
|
@@ -23,10 +23,11 @@ module Hospital
|
|
|
23
23
|
def put_diagnosis_skipped text
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
def put_summary errors_count, warnings_count
|
|
26
|
+
def put_summary errors_count, warnings_count, infos_count
|
|
27
27
|
@data['summary'] = {
|
|
28
|
-
'errors'
|
|
29
|
-
'warnings'
|
|
28
|
+
'errors' => errors_count,
|
|
29
|
+
'warnings' => warnings_count,
|
|
30
|
+
'infos' => infos_count
|
|
30
31
|
}
|
|
31
32
|
end
|
|
32
33
|
|
|
@@ -17,12 +17,13 @@ module Hospital
|
|
|
17
17
|
@buffer << "\nSkipped #{text.h2.indented}"
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
def put_summary errors_count, warnings_count
|
|
20
|
+
def put_summary errors_count, warnings_count, infos_count
|
|
21
21
|
@buffer << <<~END
|
|
22
22
|
|
|
23
23
|
#{"Summary:".h1}
|
|
24
24
|
#{"Errors: #{errors_count}".red}
|
|
25
25
|
#{"Warnings: #{warnings_count}".yellow}
|
|
26
|
+
#{"Infos: #{infos_count}".green}
|
|
26
27
|
END
|
|
27
28
|
end
|
|
28
29
|
|
data/lib/hospital/version.rb
CHANGED
data/lib/hospital.rb
CHANGED
|
@@ -76,6 +76,7 @@ module Hospital
|
|
|
76
76
|
def do_checkup_all
|
|
77
77
|
errcount = 0
|
|
78
78
|
warcount = 0
|
|
79
|
+
infocount = 0
|
|
79
80
|
|
|
80
81
|
Hospital.groups.each do |group|
|
|
81
82
|
@out.put_group_header group.header
|
|
@@ -83,8 +84,9 @@ module Hospital
|
|
|
83
84
|
|
|
84
85
|
group.all_checkups.each do |checkup|
|
|
85
86
|
if diagnosis = checkup.diagnosis
|
|
86
|
-
errcount
|
|
87
|
-
warcount
|
|
87
|
+
errcount += diagnosis.errors.count
|
|
88
|
+
warcount += diagnosis.warnings.count
|
|
89
|
+
infocount += diagnosis.infos.count
|
|
88
90
|
|
|
89
91
|
if !checkup.skipped && (!checkup.group.skipped || checkup.precondition)
|
|
90
92
|
@out.put_diagnosis_header "#{diagnosis.name}:"
|
|
@@ -96,7 +98,7 @@ module Hospital
|
|
|
96
98
|
end
|
|
97
99
|
end
|
|
98
100
|
|
|
99
|
-
@out.put_summary errcount, warcount
|
|
101
|
+
@out.put_summary errcount, warcount, infocount
|
|
100
102
|
|
|
101
103
|
@out.result
|
|
102
104
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hospital
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alexander
|
|
@@ -59,7 +59,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
59
59
|
requirements:
|
|
60
60
|
- - ">="
|
|
61
61
|
- !ruby/object:Gem::Version
|
|
62
|
-
version: 3.4.
|
|
62
|
+
version: 3.4.7
|
|
63
63
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
64
|
requirements:
|
|
65
65
|
- - ">="
|