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 +4 -4
- data/lib/soar_status/status.rb +10 -4
- data/lib/soar_status/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f5e81b82b76979edf35995f44727277a3e755dae
|
|
4
|
+
data.tar.gz: a0a83efc91e5a500947e8cac8a57430529d58ca5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fc1701cfa3b327c23677346e3bf74154583dd6a798e3e39341f188994f8b539e2e2686094d43d4e847f09aca7b510fe909ff7ed186d4a93c257cbf4e716643e1
|
|
7
|
+
data.tar.gz: 717ca31950b42e39c211fb8ce8fbe3da2b8e52ea9b1d55750ab6f63bd958cb6a92c1926d335c5b9747e122bbc23c0be8bc07e992440b934617ca09217eb9cb58
|
data/lib/soar_status/status.rb
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
44
|
-
|
|
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
|
data/lib/soar_status/version.rb
CHANGED
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:
|
|
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:
|
|
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.
|
|
115
|
+
rubygems_version: 2.6.12
|
|
116
116
|
signing_key:
|
|
117
117
|
specification_version: 4
|
|
118
118
|
summary: Status aggregation for service components
|