govuk_app_config 9.22.3 → 9.23.1
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/.github/workflows/ci.yml +1 -1
- data/CHANGELOG.md +8 -0
- data/lib/govuk_app_config/railtie.rb +19 -6
- data/lib/govuk_app_config/version.rb +1 -1
- data/lib/govuk_app_config.rb +0 -1
- metadata +2 -3
- data/lib/govuk_app_config/govuk_proxy/static_proxy.rb +0 -19
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f2d0325b5faace54f44d8ab23f7d52e474a718246cdcbb8ffb3c28bd1ed0bd3a
|
|
4
|
+
data.tar.gz: bb248f3c9bdd810dd1634221d909e788b720a01f370cb7076cdda4438bf9d853
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0fe04c0c61e73448c7280657fdf2b7c2cebfba20f5daed26c61c4879e1745085c9e7e9e7f1bbeb3ac41429bb64f182bf7fac928505f40025f7829979640adcaf
|
|
7
|
+
data.tar.gz: 4ef4febaa3316ddcd61d8350972e9cf2ca33271f549e39f6f03e3036123c2a539039095edb87bed9b893d0b1959417a1f4ae9e9147b41bfd2637a569b1e96f4b
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -38,7 +38,7 @@ jobs:
|
|
|
38
38
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
39
39
|
with:
|
|
40
40
|
ref: ${{ inputs.ref || github.ref }}
|
|
41
|
-
- uses: ruby/setup-ruby@
|
|
41
|
+
- uses: ruby/setup-ruby@4fc31e1c823882afd7ef55985266a526c589de90 # v1.282.0
|
|
42
42
|
with:
|
|
43
43
|
ruby-version: ${{ matrix.ruby }}
|
|
44
44
|
bundler-cache: true
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
# 9.23.1
|
|
2
|
+
|
|
3
|
+
* Restore compatibility with Rails 8.1+ by fixing the boot cycle and ensuring structured logging is enabled. This allows Rails 8.1 apps to upgrade to the latest govuk_app_config.
|
|
4
|
+
|
|
5
|
+
# 9.23.0
|
|
6
|
+
|
|
7
|
+
* Remove StaticProxy middleware now that Static is no longer in use
|
|
8
|
+
|
|
1
9
|
# 9.22.3
|
|
2
10
|
|
|
3
11
|
* Pin dependency on connection_pool
|
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
require "plek"
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
# Workaround for Logstasher initializer conflict under Rails 8.1
|
|
4
|
+
begin
|
|
5
|
+
require "logstasher/railtie"
|
|
6
|
+
|
|
7
|
+
# Only apply this workaround for Rails 8.1+ where the boot cycle issue exists.
|
|
8
|
+
# This prevents any potential regressions for apps on older Rails versions.
|
|
9
|
+
if defined?(LogStasher::Railtie) && Gem::Version.new(Rails::VERSION::STRING) >= Gem::Version.new("8.1")
|
|
10
|
+
# Remove duplicate initializers that cause cyclic dependency
|
|
11
|
+
LogStasher::Railtie.initializers.delete_if { |i| i.name == :logstasher }
|
|
12
|
+
|
|
13
|
+
# Replace with a single clean initializer that actually sets up LogStasher
|
|
14
|
+
LogStasher::Railtie.initializer(:logstasher_govuk_fix, after: :load_config_initializers) do |app|
|
|
15
|
+
LogStasher.setup(app) if app.config.logstasher.enabled
|
|
9
16
|
end
|
|
17
|
+
end
|
|
18
|
+
rescue LoadError, NameError
|
|
19
|
+
# Skip if Logstasher not present
|
|
20
|
+
end
|
|
10
21
|
|
|
22
|
+
module GovukAppConfig
|
|
23
|
+
class Railtie < Rails::Railtie
|
|
11
24
|
initializer "govuk_app_config.configure_open_telemetry" do |app|
|
|
12
25
|
unless Rails.const_defined?(:Console)
|
|
13
26
|
GovukOpenTelemetry.configure(app.class.module_parent_name.underscore)
|
data/lib/govuk_app_config.rb
CHANGED
|
@@ -2,7 +2,6 @@ require "govuk_app_config/govuk_error"
|
|
|
2
2
|
require "govuk_app_config/govuk_healthcheck"
|
|
3
3
|
require "govuk_app_config/govuk_open_telemetry"
|
|
4
4
|
require "govuk_app_config/govuk_prometheus_exporter"
|
|
5
|
-
require "govuk_app_config/govuk_proxy/static_proxy"
|
|
6
5
|
require "govuk_app_config/govuk_statsd"
|
|
7
6
|
require "govuk_app_config/version"
|
|
8
7
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: govuk_app_config
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 9.
|
|
4
|
+
version: 9.23.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GOV.UK Dev
|
|
@@ -398,7 +398,6 @@ files:
|
|
|
398
398
|
- lib/govuk_app_config/govuk_json_logging/rails_ext/action_controller/metal/instrumentation.rb
|
|
399
399
|
- lib/govuk_app_config/govuk_open_telemetry.rb
|
|
400
400
|
- lib/govuk_app_config/govuk_prometheus_exporter.rb
|
|
401
|
-
- lib/govuk_app_config/govuk_proxy/static_proxy.rb
|
|
402
401
|
- lib/govuk_app_config/govuk_puma.rb
|
|
403
402
|
- lib/govuk_app_config/govuk_statsd.rb
|
|
404
403
|
- lib/govuk_app_config/govuk_timezone.rb
|
|
@@ -422,7 +421,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
422
421
|
- !ruby/object:Gem::Version
|
|
423
422
|
version: '0'
|
|
424
423
|
requirements: []
|
|
425
|
-
rubygems_version: 4.0.
|
|
424
|
+
rubygems_version: 4.0.4
|
|
426
425
|
specification_version: 4
|
|
427
426
|
summary: Base configuration for GOV.UK applications
|
|
428
427
|
test_files: []
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
require "rack-proxy"
|
|
2
|
-
|
|
3
|
-
module GovukProxy
|
|
4
|
-
class StaticProxy < Rack::Proxy
|
|
5
|
-
def perform_request(env)
|
|
6
|
-
request = Rack::Request.new(env)
|
|
7
|
-
|
|
8
|
-
# use rack proxy to forward any requests for /assets/static/*
|
|
9
|
-
# this regex needs to match the path set for `Rails.application.config.assets.prefix` in Static
|
|
10
|
-
# https://github.com/alphagov/static/blob/main/config/initializers/assets.rb
|
|
11
|
-
if request.path =~ %r{^/assets/static/}
|
|
12
|
-
env["HTTP_HOST"] = @backend.host
|
|
13
|
-
super(env)
|
|
14
|
-
else
|
|
15
|
-
@app.call(env)
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|