govuk_app_config 1.11.2 → 1.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/docs/healthchecks.md +8 -0
- data/lib/govuk_app_config/govuk_healthcheck/checkup.rb +5 -1
- data/lib/govuk_app_config/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 664daea82c896eb6e724c17dbaa3f6cabd36456c889baf949e369439080c01e8
|
4
|
+
data.tar.gz: 313a0fc6939f31da8933c424b99816f0c79096a2b58885bae95505d4e0464d4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 646cb2237c5cb18a0a8994f690b25145b68a4e34e92de8eca3259d57a5347c86555088e82a587fd91ae38c211d77884594eac9c30e02d1b0e4f4fa76a335bf21
|
7
|
+
data.tar.gz: a372e29aa081cc9fecfa3cf0895fa935329d7d58874d5eef7d19f4e2ed6832adf7a5f09d24c375638d745015de0f38e049d72a449cac6b3567f000145c368e3e
|
data/CHANGELOG.md
CHANGED
data/docs/healthchecks.md
CHANGED
@@ -58,6 +58,14 @@ get "/healthcheck", to: GovukHealthcheck.rack_response(
|
|
58
58
|
)
|
59
59
|
```
|
60
60
|
|
61
|
+
It also accepts objects, so classes can be initialized:
|
62
|
+
|
63
|
+
```ruby
|
64
|
+
get "/healthcheck", to: GovukHealthcheck.rack_response(
|
65
|
+
InitializedCheck.new(:param),
|
66
|
+
)
|
67
|
+
```
|
68
|
+
|
61
69
|
## Built-in Checks
|
62
70
|
|
63
71
|
A convention used when naming these classes is that it should end with `Check`
|
@@ -23,11 +23,15 @@ module GovukHealthcheck
|
|
23
23
|
attr_reader :checks
|
24
24
|
|
25
25
|
def component_statuses
|
26
|
-
@component_statuses ||=
|
26
|
+
@component_statuses ||= all_components.each_with_object({}) do |check, hash|
|
27
27
|
hash[check.name] = build_component_status(check)
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
+
def all_components
|
32
|
+
checks.map { |check| check.instance_of?(Class) ? check.new : check }
|
33
|
+
end
|
34
|
+
|
31
35
|
def worst_status
|
32
36
|
if status?(CRITICAL)
|
33
37
|
CRITICAL
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_app_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.11.
|
4
|
+
version: 1.11.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-xray-sdk
|