soar_status 0.1.0 → 1.1.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
  SHA1:
3
- metadata.gz: eccbb5631922917199e695d074e7d8d10d1252bb
4
- data.tar.gz: 284f38c2db0c6eb5b74f718e4875297133c8b2dc
3
+ metadata.gz: f5e81b82b76979edf35995f44727277a3e755dae
4
+ data.tar.gz: a0a83efc91e5a500947e8cac8a57430529d58ca5
5
5
  SHA512:
6
- metadata.gz: fbaf331fa4d5c5c906166158fa576f20c14c2a1cb286b515ee31c0a1129d2b9ccb3767fb00a779368dbc22c0502d6defab44efa0e6a966bac9a59dc6ea0e916e
7
- data.tar.gz: 178374054d1428fdb72976f3c74d2925a853936803190bd871e3e81662be49664846694c0967391df44b7da11aa222c854900c0e950dfce07c178a0a210b30f3
6
+ metadata.gz: fc1701cfa3b327c23677346e3bf74154583dd6a798e3e39341f188994f8b539e2e2686094d43d4e847f09aca7b510fe909ff7ed186d4a93c257cbf4e716643e1
7
+ data.tar.gz: 717ca31950b42e39c211fb8ce8fbe3da2b8e52ea9b1d55750ab6f63bd958cb6a92c1926d335c5b9747e122bbc23c0be8bc07e992440b934617ca09217eb9cb58
@@ -1,11 +1,12 @@
1
1
  module SoarStatus
2
2
  class Status
3
+
3
4
  @@detailed_status_providers = {}
4
5
  @@release = {}
5
6
  @@detailed_status_providers = {}
6
- @@functional_status_provider = nil
7
7
  @@configuration = {}
8
8
  @@environment = {}
9
+ @functional_status_providers = []
9
10
 
10
11
  def self.configuration=(configuration)
11
12
  @@configuration = configuration
@@ -36,12 +37,17 @@ module SoarStatus
36
37
  end
37
38
 
38
39
  def self.register_functional_status_provider(provider)
39
- @@functional_status_provider = provider
40
+ @functional_status_providers << provider
41
+ end
42
+
43
+ def self.functional_status_providers
44
+ @functional_status_providers
40
45
  end
41
46
 
42
47
  def self.functional_status
43
- return @@functional_status_provider.functional_status if @@functional_status_provider
44
- 'no registered functional status provider'
48
+ return 'no registered functional status provider' if @functional_status_providers.empty?
49
+ return '0' if @functional_status_providers.any? { |provider| provider.functional_status != '100' }
50
+ '100'
45
51
  end
46
52
 
47
53
  def self.detailed_status
@@ -1,3 +1,3 @@
1
1
  module SoarStatus
2
- VERSION = "0.1.0"
2
+ VERSION = "1.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soar_status
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Barney de Villiers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-18 00:00:00.000000000 Z
11
+ date: 2017-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  version: '0'
113
113
  requirements: []
114
114
  rubyforge_project:
115
- rubygems_version: 2.5.1
115
+ rubygems_version: 2.6.12
116
116
  signing_key:
117
117
  specification_version: 4
118
118
  summary: Status aggregation for service components