govuk_app_config 1.5.1 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +10 -6
- data/govuk_app_config.gemspec +1 -0
- data/lib/govuk_app_config/govuk_healthcheck/active_record.rb +3 -3
- data/lib/govuk_app_config/govuk_healthcheck/checkup.rb +3 -1
- data/lib/govuk_app_config/govuk_healthcheck/sidekiq_redis.rb +3 -3
- data/lib/govuk_app_config/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 209a3832e7995ecd4fae908416ca9656849489c3b2dd9f287c175029d3c2a683
|
4
|
+
data.tar.gz: 5c12231bddd44f7fff7dd32c6b21484bc1ff7fef9bb3b7d54bf3abcf266bb46b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 820ef2c5342d0fc44d64d756bef5732789e65fefb0053b45ca961af214b523401348c2887cf46c93b43734a414b2a276eeb8916c79e85e1143e54dafd2710a61
|
7
|
+
data.tar.gz: 6fc2796951741d81cbe57712cd4de98d77976e046cecfbd68096b5f7726dbcadf1a6817f5afd557c6d80bee9f8cdaa6e4ad93aa7a628cb17b58a4414065b3877
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -110,25 +110,26 @@ GovukStatsd.time("account.activate") { @account.activate! }
|
|
110
110
|
Set up a route in your rack-compatible Ruby application, and pick the built-in
|
111
111
|
or custom checks you wish to perform.
|
112
112
|
|
113
|
-
Custom checks must be
|
113
|
+
Custom checks must be a class which implements
|
114
114
|
[this interface](spec/lib/govuk_healthcheck/shared_interface.rb):
|
115
|
+
|
115
116
|
```ruby
|
116
|
-
|
117
|
-
def
|
117
|
+
class CustomCheck
|
118
|
+
def name
|
118
119
|
:custom_check
|
119
120
|
end
|
120
121
|
|
121
|
-
def
|
122
|
+
def status
|
122
123
|
ThingChecker.everything_okay? ? OK : CRITICAL
|
123
124
|
end
|
124
125
|
|
125
126
|
# Optional
|
126
|
-
def
|
127
|
+
def message
|
127
128
|
"This is an optional custom message"
|
128
129
|
end
|
129
130
|
|
130
131
|
# Optional
|
131
|
-
def
|
132
|
+
def details
|
132
133
|
{
|
133
134
|
extra: "This is an optional details hash",
|
134
135
|
}
|
@@ -150,6 +151,9 @@ This will check:
|
|
150
151
|
- Database connectivity (via ActiveRecord)
|
151
152
|
- Your custom healthcheck
|
152
153
|
|
154
|
+
Each check class gets instanced each time the health check end point is called.
|
155
|
+
This allows you to cache any complex queries speeding up performance.
|
156
|
+
|
153
157
|
## Rails logging
|
154
158
|
|
155
159
|
In Rails applications, the application will be configured to send JSON-formatted
|
data/govuk_app_config.gemspec
CHANGED
@@ -20,8 +20,10 @@ module GovukHealthcheck
|
|
20
20
|
|
21
21
|
private
|
22
22
|
|
23
|
+
attr_reader :checks
|
24
|
+
|
23
25
|
def component_statuses
|
24
|
-
@component_statuses ||=
|
26
|
+
@component_statuses ||= checks.map(&:new).each_with_object({}) do |check, hash|
|
25
27
|
hash[check.name] = build_component_status(check)
|
26
28
|
end
|
27
29
|
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.
|
4
|
+
version: 1.6.0
|
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: 2018-06-
|
11
|
+
date: 2018-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: statsd-ruby
|
@@ -136,6 +136,20 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: pry
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
139
153
|
description: Base configuration for GOV.UK applications
|
140
154
|
email:
|
141
155
|
- govuk-dev@digital.cabinet-office.gov.uk
|