hospital 0.8.3 → 0.8.4
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 -2
- data/lib/hospital/formatter/raw.rb +6 -4
- data/lib/hospital/formatter/shell.rb +2 -2
- data/lib/hospital/version.rb +1 -1
- data/lib/hospital.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a1074319a2f7179076d1ddf35612df2167dfd2ca66e6e77a488c65727090fff4
|
|
4
|
+
data.tar.gz: 7e1532336e49b8b73c01ee6a519698714fcff224970a5a9f4c23504272b48ba9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 07633f2b838a3d8bef495212dd3da16953b29ffc94579a4cf9fe94c5ff0d8a8ff5165207eff071999810afc7ba12bf8c8b32c8d12245c6bc08c5071709369b5a
|
|
7
|
+
data.tar.gz: 1d70ff1ea84cfe57c6f8ee32a573105737a78189eeefa980e313d2105d585e5a32279d607afbbd125d21555f0984053754a119270f34363568a89aa3c42af5e8
|
|
@@ -13,8 +13,8 @@ module Hospital
|
|
|
13
13
|
@buffer << "\n\n## Checking #{text}"
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
def put_diagnosis_skipped text
|
|
17
|
-
@buffer << "\n\n## Skipped #{text}"
|
|
16
|
+
def put_diagnosis_skipped text, verbose: false
|
|
17
|
+
@buffer << "\n\n## Skipped #{text}" if verbose
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def put_summary errors_count, warnings_count, infos_count
|
|
@@ -7,20 +7,24 @@ module Hospital
|
|
|
7
7
|
class Raw < Base
|
|
8
8
|
|
|
9
9
|
def initialize
|
|
10
|
-
@data
|
|
10
|
+
@data = {}
|
|
11
11
|
@current_group = nil
|
|
12
12
|
@current_diagnosis = nil
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def put_group_header text
|
|
16
16
|
@current_group = text
|
|
17
|
+
@data[@current_group] ||= {}
|
|
17
18
|
end
|
|
18
19
|
|
|
19
20
|
def put_diagnosis_header text
|
|
20
21
|
@current_diagnosis = text
|
|
22
|
+
@data[@current_group][@current_diagnosis] ||= []
|
|
21
23
|
end
|
|
22
24
|
|
|
23
|
-
def put_diagnosis_skipped text
|
|
25
|
+
def put_diagnosis_skipped text, verbose: false
|
|
26
|
+
# don't overwrite existing entry (in case of name collision)
|
|
27
|
+
@data[@current_group][text] ||= { 'skipped' => true }
|
|
24
28
|
end
|
|
25
29
|
|
|
26
30
|
def put_summary errors_count, warnings_count, infos_count
|
|
@@ -32,8 +36,6 @@ module Hospital
|
|
|
32
36
|
end
|
|
33
37
|
|
|
34
38
|
def put_diagnosis_result result
|
|
35
|
-
@data[@current_group] ||= {}
|
|
36
|
-
@data[@current_group][@current_diagnosis] ||= []
|
|
37
39
|
@data[@current_group][@current_diagnosis] << {
|
|
38
40
|
'type' => result.type,
|
|
39
41
|
'message' => result.message
|
|
@@ -13,8 +13,8 @@ module Hospital
|
|
|
13
13
|
@buffer << "\nChecking #{text.h2.indented}"
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
def put_diagnosis_skipped text
|
|
17
|
-
@buffer << "\nSkipped #{text.h2.indented}"
|
|
16
|
+
def put_diagnosis_skipped text, verbose: false
|
|
17
|
+
@buffer << "\nSkipped #{text.h2.indented}" if verbose
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def put_summary errors_count, warnings_count, infos_count
|
data/lib/hospital/version.rb
CHANGED
data/lib/hospital.rb
CHANGED
|
@@ -115,8 +115,9 @@ module Hospital
|
|
|
115
115
|
if !checkup.skipped && (!checkup.group.skipped || checkup.precondition)
|
|
116
116
|
@out.put_diagnosis_header "#{diagnosis.name}:"
|
|
117
117
|
diagnosis.put_results @out
|
|
118
|
-
elsif
|
|
119
|
-
|
|
118
|
+
elsif !checkup.skipped
|
|
119
|
+
# checkup was skipped due to group precondition failure
|
|
120
|
+
@out.put_diagnosis_skipped "#{diagnosis.name}:", verbose: verbose
|
|
120
121
|
end
|
|
121
122
|
end
|
|
122
123
|
end
|