hospital 0.7.10 → 0.8.1

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: a06c38e981463303d94deca5fe98c56c3d65c7a4f37048cc93834cbd69570765
4
- data.tar.gz: a057f6b1f4f9a9d54648a85582c8d93e38bdc9f3a5f5b744c87e7f75db53ddda
3
+ metadata.gz: 48c3347cae93d82d34c613f70e56b1a5da814f04a23342f034eab160de787f3d
4
+ data.tar.gz: 4898a00723b7e7142f462a63c4fa1276c16488d6bdf0f8e4c711c0178106fb9f
5
5
  SHA512:
6
- metadata.gz: b050d6b46e171ddab75edc3bd3aa3d0f32f6b24bd3a7fa084f99ef8347dff0574db548e444499f944e970df34c6ae7dac0e393913942cdcb6981174ce222533f
7
- data.tar.gz: ba3d61318dcd3bfec2b97f5709c90cce61f482eeb392347b1f19145c8ff07a24ee47a71efc132c9507869a82608b6a3fe68e7233fc02a908253200761cf0578d
6
+ metadata.gz: 6138ab73e2808174cc12eaeb9bf9e35b6909eb5c92071c68ed2a27e34d179ea3cb8f80892832fd0d517e93ac24bba05a77ce9494e3633c64a68ad8d79dd5a72c
7
+ data.tar.gz: cff7a3fec97e90b3167dd19024fd8e7e711d4326d683d4666c4c1e202d8a679b3c03a87e9edb12a2207d0c8d9b9e813209ca3e637876ae5d3352affb46fe5190
@@ -62,24 +62,28 @@ class Hospital::Diagnosis
62
62
  end
63
63
 
64
64
  def put out
65
- out.put_diagnosis_result output
65
+ out.put_diagnosis_result self
66
66
  end
67
67
  end
68
68
 
69
69
  class Info < Result
70
70
  def prefix; '🟢' end
71
+ def type; 'info' end
71
72
  end
72
73
 
73
74
  class Warning < Result
74
75
  def prefix; '🟠' end
76
+ def type; 'warning' end
75
77
  end
76
78
 
77
79
  class Skip < Result
78
80
  def prefix; '🟠' end
81
+ def type; 'skip' end
79
82
  end
80
83
 
81
84
  class Error < Result
82
85
  def prefix; '🔴' end
86
+ def type; 'error' end
83
87
  end
84
88
 
85
89
  def add_info message
@@ -26,8 +26,8 @@ module Hospital
26
26
  END
27
27
  end
28
28
 
29
- def put_diagnosis_result text
30
- @buffer << "\n#{text}"
29
+ def put_diagnosis_result result
30
+ @buffer << "\n#{result.output}"
31
31
  end
32
32
 
33
33
  end
@@ -30,10 +30,13 @@ module Hospital
30
30
  }
31
31
  end
32
32
 
33
- def put_diagnosis_result text
33
+ def put_diagnosis_result result
34
34
  @data[@current_group] ||= {}
35
35
  @data[@current_group][@current_diagnosis] ||= []
36
- @data[@current_group][@current_diagnosis] << text
36
+ @data[@current_group][@current_diagnosis] << {
37
+ 'type' => result.type,
38
+ 'message' => result.message
39
+ }
37
40
  end
38
41
 
39
42
  def result
@@ -26,8 +26,8 @@ module Hospital
26
26
  END
27
27
  end
28
28
 
29
- def put_diagnosis_result text
30
- @buffer << "\n#{text.indented}"
29
+ def put_diagnosis_result result
30
+ @buffer << "\n#{result.output.indented}"
31
31
  end
32
32
 
33
33
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hospital
4
- VERSION = "0.7.10"
4
+ VERSION = "0.8.1"
5
5
  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.7.10
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander
@@ -59,14 +59,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - ">="
61
61
  - !ruby/object:Gem::Version
62
- version: 2.7.8
62
+ version: 3.4.7
63
63
  required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
68
  requirements: []
69
- rubygems_version: 3.6.7
69
+ rubygems_version: 3.6.9
70
70
  specification_version: 4
71
71
  summary: A framwork for app self-checks
72
72
  test_files: []