govuk_app_config 4.6.3 → 4.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +5 -26
- data/CHANGELOG.md +12 -0
- data/govuk_app_config.gemspec +2 -2
- data/lib/govuk_app_config/govuk_error/configuration.rb +3 -0
- data/lib/govuk_app_config/govuk_prometheus_exporter.rb +33 -6
- data/lib/govuk_app_config/version.rb +1 -1
- data/lib/govuk_app_config.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c84b163006231db6d8f341b3083b366fdf7d114cf4f67aaa4be852d7f376d854
|
4
|
+
data.tar.gz: 122d0c3cf3d370effd13d844184a9441ec4f8ec7caaab6ca73b0d0049583ffb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05e999f65208c0e8967dcc8a71b06faa9969fa8d9c974501f8d9b899ceee1b5ddfa57242f357c8299ca0e9137c949d5ffa6fd418a57cfe7cb8b9152b57b84311
|
7
|
+
data.tar.gz: daff1bad6a9d6c0c558b1c6c1039c1fc8b98e66e081f847e14b49fd3bcfc5ac12e93902eaf5dc671a0ac72eeb0562868896fd8f6f1ef001e5807afc0adf5a751
|
data/.github/workflows/ci.yml
CHANGED
@@ -24,33 +24,12 @@ jobs:
|
|
24
24
|
runs-on: ubuntu-latest
|
25
25
|
steps:
|
26
26
|
- run: echo "All matrix tests have passed 🚀"
|
27
|
-
|
28
|
-
|
27
|
+
|
28
|
+
publish:
|
29
29
|
needs: test
|
30
|
-
runs-on: ubuntu-latest
|
31
30
|
if: ${{ github.ref == 'refs/heads/main' }}
|
32
31
|
permissions:
|
33
32
|
contents: write
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
with:
|
38
|
-
rubygems: latest
|
39
|
-
- env:
|
40
|
-
GEM_HOST_API_KEY: ${{ secrets.ALPHAGOV_RUBYGEMS_API_KEY }}
|
41
|
-
GEM_NAME: govuk_app_config
|
42
|
-
run: |
|
43
|
-
VERSION=$(ruby -e "puts eval(File.read('$GEM_NAME.gemspec')).version")
|
44
|
-
GEM_VERSION=$(gem list --exact --remote $GEM_NAME)
|
45
|
-
|
46
|
-
# Publish to RubyGems.org
|
47
|
-
if [ "${GEM_VERSION}" != "$GEM_NAME (${VERSION})" ]; then
|
48
|
-
gem build $GEM_NAME.gemspec
|
49
|
-
gem push "$GEM_NAME-${VERSION}.gem"
|
50
|
-
fi
|
51
|
-
|
52
|
-
# Create a release tag
|
53
|
-
if ! git ls-remote --tags --exit-code origin v${VERSION}; then
|
54
|
-
git tag v${VERSION}
|
55
|
-
git push --tags
|
56
|
-
fi
|
33
|
+
uses: alphagov/govuk-infrastructure/.github/workflows/publish-rubygem.yaml@main
|
34
|
+
secrets:
|
35
|
+
GEM_HOST_API_KEY: ${{ secrets.ALPHAGOV_RUBYGEMS_API_KEY }}
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
# 4.8.0
|
2
|
+
|
3
|
+
- Enables Sentry environment names for EKS versions of integration, staging and production.([#260](https://github.com/alphagov/govuk_app_config/pull/260))
|
4
|
+
|
5
|
+
# 4.7.1
|
6
|
+
|
7
|
+
- Fix the ability to open the Rails console (`bundle exec rails c`) when running inside a container ([#257](https://github.com/alphagov/govuk_app_config/pull/257)).
|
8
|
+
|
9
|
+
# 4.7.0
|
10
|
+
|
11
|
+
- Adds Prometheus Sidekiq monitoring ([#255](https://github.com/alphagov/govuk_app_config/pull/255))
|
12
|
+
|
1
13
|
# 4.6.3
|
2
14
|
|
3
15
|
- Adds `region1.google-analytics.com` to the security policy for GA ([#250](https://github.com/alphagov/govuk_app_config/pull/250))
|
data/govuk_app_config.gemspec
CHANGED
@@ -30,11 +30,11 @@ Gem::Specification.new do |spec|
|
|
30
30
|
|
31
31
|
spec.add_development_dependency "byebug"
|
32
32
|
spec.add_development_dependency "climate_control"
|
33
|
-
spec.add_development_dependency "rack-test", "~>
|
33
|
+
spec.add_development_dependency "rack-test", "~> 2.0"
|
34
34
|
spec.add_development_dependency "rails", "~> 7"
|
35
35
|
spec.add_development_dependency "rake", "~> 13.0"
|
36
36
|
spec.add_development_dependency "rspec", "~> 3.10"
|
37
37
|
spec.add_development_dependency "rspec-its", "~> 1.3"
|
38
|
-
spec.add_development_dependency "rubocop-govuk", "4.
|
38
|
+
spec.add_development_dependency "rubocop-govuk", "4.6.0"
|
39
39
|
spec.add_development_dependency "webmock"
|
40
40
|
end
|
@@ -1,13 +1,40 @@
|
|
1
1
|
module GovukPrometheusExporter
|
2
|
+
def self.should_configure
|
3
|
+
if File.basename($PROGRAM_NAME) == "rake" ||
|
4
|
+
defined?(Rails) && (Rails.const_defined?("Console") || Rails.env == "test")
|
5
|
+
false
|
6
|
+
else
|
7
|
+
ENV["GOVUK_PROMETHEUS_EXPORTER"] == "true"
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
2
11
|
def self.configure
|
3
|
-
unless
|
4
|
-
|
5
|
-
|
6
|
-
|
12
|
+
return unless should_configure
|
13
|
+
|
14
|
+
require "prometheus_exporter"
|
15
|
+
require "prometheus_exporter/server"
|
16
|
+
require "prometheus_exporter/middleware"
|
17
|
+
|
18
|
+
if defined?(Sidekiq)
|
19
|
+
Sidekiq.configure_server do |config|
|
20
|
+
require "prometheus_exporter/instrumentation"
|
21
|
+
config.server_middleware do |chain|
|
22
|
+
chain.add PrometheusExporter::Instrumentation::Sidekiq
|
23
|
+
end
|
24
|
+
config.death_handlers << PrometheusExporter::Instrumentation::Sidekiq.death_handler
|
25
|
+
config.on :startup do
|
26
|
+
PrometheusExporter::Instrumentation::Process.start(type: "sidekiq")
|
27
|
+
PrometheusExporter::Instrumentation::SidekiqProcess.start
|
28
|
+
PrometheusExporter::Instrumentation::SidekiqQueue.start
|
29
|
+
PrometheusExporter::Instrumentation::SidekiqStats.start
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
7
33
|
|
8
|
-
|
9
|
-
|
34
|
+
server = PrometheusExporter::Server::WebServer.new bind: "0.0.0.0", port: 9394
|
35
|
+
server.start
|
10
36
|
|
37
|
+
if defined?(Rails)
|
11
38
|
Rails.application.middleware.unshift PrometheusExporter::Middleware
|
12
39
|
end
|
13
40
|
end
|
data/lib/govuk_app_config.rb
CHANGED
@@ -6,9 +6,9 @@ require "govuk_app_config/govuk_i18n"
|
|
6
6
|
# This require is deprecated and should be removed on next major version bump
|
7
7
|
# and should be required by applications directly.
|
8
8
|
require "govuk_app_config/govuk_unicorn"
|
9
|
+
require "govuk_app_config/govuk_prometheus_exporter"
|
9
10
|
|
10
11
|
if defined?(Rails)
|
11
|
-
require "govuk_app_config/govuk_prometheus_exporter"
|
12
12
|
require "govuk_app_config/govuk_logging"
|
13
13
|
require "govuk_app_config/govuk_content_security_policy"
|
14
14
|
require "govuk_app_config/railtie"
|
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: 4.
|
4
|
+
version: 4.8.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: 2022-
|
11
|
+
date: 2022-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstasher
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: '
|
145
|
+
version: '2.0'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: '
|
152
|
+
version: '2.0'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: rails
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -212,14 +212,14 @@ dependencies:
|
|
212
212
|
requirements:
|
213
213
|
- - '='
|
214
214
|
- !ruby/object:Gem::Version
|
215
|
-
version: 4.
|
215
|
+
version: 4.6.0
|
216
216
|
type: :development
|
217
217
|
prerelease: false
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
220
|
- - '='
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version: 4.
|
222
|
+
version: 4.6.0
|
223
223
|
- !ruby/object:Gem::Dependency
|
224
224
|
name: webmock
|
225
225
|
requirement: !ruby/object:Gem::Requirement
|
@@ -296,7 +296,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
296
296
|
- !ruby/object:Gem::Version
|
297
297
|
version: '0'
|
298
298
|
requirements: []
|
299
|
-
rubygems_version: 3.3.
|
299
|
+
rubygems_version: 3.3.20
|
300
300
|
signing_key:
|
301
301
|
specification_version: 4
|
302
302
|
summary: Base configuration for GOV.UK applications
|