hospital 0.8.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 48c3347cae93d82d34c613f70e56b1a5da814f04a23342f034eab160de787f3d
4
- data.tar.gz: 4898a00723b7e7142f462a63c4fa1276c16488d6bdf0f8e4c711c0178106fb9f
3
+ metadata.gz: b7abce524070f1b1275fe021c20e42f046a856c460007c30ab859fc1173c6bfd
4
+ data.tar.gz: f5e1eebdaeab9d799524ce3fdbca6efd9e54ae215b5100a77cf3367b08ac4e1a
5
5
  SHA512:
6
- metadata.gz: 6138ab73e2808174cc12eaeb9bf9e35b6909eb5c92071c68ed2a27e34d179ea3cb8f80892832fd0d517e93ac24bba05a77ce9494e3633c64a68ad8d79dd5a72c
7
- data.tar.gz: cff7a3fec97e90b3167dd19024fd8e7e711d4326d683d4666c4c1e202d8a679b3c03a87e9edb12a2207d0c8d9b9e813209ca3e637876ae5d3352affb46fe5190
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' => errors_count,
29
- 'warnings' => warnings_count
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
 
@@ -24,6 +24,10 @@ module StringFormatter
24
24
  "\e[33m#{self}\e[0m"
25
25
  end
26
26
 
27
+ def green
28
+ "\e[32m#{self}\e[0m"
29
+ end
30
+
27
31
  def indented
28
32
  "#{self}"
29
33
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hospital
4
- VERSION = "0.8.1"
4
+ VERSION = "0.8.2"
5
5
  end
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 += diagnosis.errors.count
87
- warcount += diagnosis.warnings.count
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.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander