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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1ffa73986115bdbf55b27bf1663cbe459479d3a4c3e4bc47e5ec4da6336b8f5
4
- data.tar.gz: 842f49ba55d3a07c378aa7f7ee10b2f31faa6e21ccb1e7b4db71f3744095f1f5
3
+ metadata.gz: 664daea82c896eb6e724c17dbaa3f6cabd36456c889baf949e369439080c01e8
4
+ data.tar.gz: 313a0fc6939f31da8933c424b99816f0c79096a2b58885bae95505d4e0464d4e
5
5
  SHA512:
6
- metadata.gz: a8167888963345172236ef575b8d0a321fb9b76d3df7592ad67b18c06418f3ff5ca282158b7e5eb0a2ffd2ebba85e511133d1a34539461da9dffa9b521be1dad
7
- data.tar.gz: cb0df67028656649d384e0e9d073f3073e76ac5a61130f29f75bfc80b7891072ae29544a50231c459f8b261b7de7f6cf1691e7170f2448cbc250333e6fea51b3
6
+ metadata.gz: 646cb2237c5cb18a0a8994f690b25145b68a4e34e92de8eca3259d57a5347c86555088e82a587fd91ae38c211d77884594eac9c30e02d1b0e4f4fa76a335bf21
7
+ data.tar.gz: a372e29aa081cc9fecfa3cf0895fa935329d7d58874d5eef7d19f4e2ed6832adf7a5f09d24c375638d745015de0f38e049d72a449cac6b3567f000145c368e3e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.11.3
2
+
3
+ * Add Initialized healthchecks
4
+
1
5
  # 1.11.2
2
6
 
3
7
  * Fix crash on start due to incorrect method invocation.
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 ||= checks.map(&:new).each_with_object({}) do |check, hash|
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
@@ -1,3 +1,3 @@
1
1
  module GovukAppConfig
2
- VERSION = "1.11.2"
2
+ VERSION = "1.11.3"
3
3
  end
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.2
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-01-04 00:00:00.000000000 Z
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