hospital 0.7.9 → 0.8.0

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: 822d10bcb1a2f666a38bc8dafb9f25230ee2bf0b370d7f246dd493ddec5fc372
4
- data.tar.gz: 9ed8ea15e695e87baeb4cddff5dabea3224d2f57937813eef77fb579fbdefdd8
3
+ metadata.gz: 9325322bec284d9f411a06d411344fc55292bb5eaf16f73c670d7bd03edc201a
4
+ data.tar.gz: d7dff49cb09300160553d81d061d731e7421778e0459f0c21cd99681c0c9c1ab
5
5
  SHA512:
6
- metadata.gz: 0465b9c3046dbc07412b9afa990e26c858b2f884d85b34b9d2fc1a76eb0c4801268cf3bdcc3737783bde2eda02cea476792e378a812be391ce85760320dc24b8
7
- data.tar.gz: a9a5ee2728a40cb543551904a873db859137dd672a7f54e925e1ad6cfc16f92bf3a82c410fff3a05ed6c441e452d28cb4f4ad7445769ac1d213aedc0e66780f9
6
+ metadata.gz: 0e75ee94f22e74399e15a20439a791667fe2c987ca2cd32d0c66a7f8764d248f2c6861a32a45f81e136d33d75a38588cb3df1703c65e86d42cc9b243d954ba5b
7
+ data.tar.gz: 9d399b529d41c00dcc4b37f1e27d8a60d51c1ee49ba80ac73ebf2fd100cd7a43c2a5252a141678415621f992a39dac3afe3d9139fca8cb211516e3b2800fdbe1
@@ -30,6 +30,7 @@ module Hospital
30
30
  end
31
31
  rescue StandardError => e
32
32
  diagnosis.add_error "Unrescued exception in #{klass}.checkup:\n#{e.full_message}.\nThis is a bug inside the checkup method that should be fixed!"
33
+ diagnosis
33
34
  end
34
35
 
35
36
  def success?
@@ -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.9"
4
+ VERSION = "0.8.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hospital
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.9
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2025-04-09 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: require_all
@@ -53,7 +52,6 @@ metadata:
53
52
  homepage_uri: https://github.com/giantmonkey/hospital
54
53
  source_code_uri: https://github.com/giantmonkey/hospital
55
54
  changelog_uri: https://github.com/giantmonkey/hospital/blob/main/CHANGELOG.md
56
- post_install_message:
57
55
  rdoc_options: []
58
56
  require_paths:
59
57
  - lib
@@ -61,15 +59,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
61
59
  requirements:
62
60
  - - ">="
63
61
  - !ruby/object:Gem::Version
64
- version: 2.7.8
62
+ version: 3.4.8
65
63
  required_rubygems_version: !ruby/object:Gem::Requirement
66
64
  requirements:
67
65
  - - ">="
68
66
  - !ruby/object:Gem::Version
69
67
  version: '0'
70
68
  requirements: []
71
- rubygems_version: 3.1.6
72
- signing_key:
69
+ rubygems_version: 3.6.9
73
70
  specification_version: 4
74
71
  summary: A framwork for app self-checks
75
72
  test_files: []