govuk_app_config 9.23.8 → 9.23.9
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 +4 -0
- data/lib/govuk_app_config/govuk_json_logging.rb +7 -0
- data/lib/govuk_app_config/railtie.rb +3 -6
- data/lib/govuk_app_config/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8f051f8f922ce9d488a41fec6fadb061481325266a2b6e8f2cb66e2b604b3316
|
|
4
|
+
data.tar.gz: 245e669207f16f32cd0a810904c7040e06215e096eaa6c04615452fcf8bd843e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e670b32b2d4d86b1ccda4f5ff6c76dfe0b70aeb4b6f5812fbe3d5b52fe21e3de270f9b3526e8812f556cb54edd6c74b7428130b38dfde595f942b1b3b00501c
|
|
7
|
+
data.tar.gz: 857dec3b9eb73e61a641f434c1e86e38471ac009974bc33b2aa66ee0ffb6af6b340dd0f632d1599a8f26acaa9e248b7522b08dd40a1f733ee73cb3aa41b634c5
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -38,7 +38,7 @@ jobs:
|
|
|
38
38
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
39
39
|
with:
|
|
40
40
|
ref: ${{ inputs.ref || github.ref }}
|
|
41
|
-
- uses: ruby/setup-ruby@
|
|
41
|
+
- uses: ruby/setup-ruby@4c56a21280b36d862b5fc31348f463d60bdc55d5 # v1.301.0
|
|
42
42
|
with:
|
|
43
43
|
ruby-version: ${{ matrix.ruby }}
|
|
44
44
|
bundler-cache: true
|
data/CHANGELOG.md
CHANGED
|
@@ -95,5 +95,12 @@ module GovukJsonLogging
|
|
|
95
95
|
# the responses it gets, so direct this to the logstasher logger.
|
|
96
96
|
GdsApi::Base.default_options[:logger] = Rails.application.config.logstasher.logger
|
|
97
97
|
end
|
|
98
|
+
|
|
99
|
+
# On Rails 8.1+, the default LogStasher initializer is removed to prevent a boot
|
|
100
|
+
# crash (see railtie.rb). We call setup explicitly here, after all config is applied.
|
|
101
|
+
if defined?(LogStasher) && Gem::Version.new(Rails::VERSION::STRING) >= Gem::Version.new("8.1")
|
|
102
|
+
LogStasher.setup_before(Rails.application.config.logstasher)
|
|
103
|
+
LogStasher.setup(Rails.application.config.logstasher)
|
|
104
|
+
end
|
|
98
105
|
end
|
|
99
106
|
end
|
|
@@ -7,13 +7,10 @@ begin
|
|
|
7
7
|
# Only apply this workaround for Rails 8.1+ where the boot cycle issue exists.
|
|
8
8
|
# This prevents any potential regressions for apps on older Rails versions.
|
|
9
9
|
if defined?(LogStasher::Railtie) && Gem::Version.new(Rails::VERSION::STRING) >= Gem::Version.new("8.1")
|
|
10
|
-
# Remove
|
|
10
|
+
# Remove the default initializer to fix a cyclic dependency boot crash on Rails 8.1.
|
|
11
|
+
# LogStasher.setup is instead called explicitly in GovukJsonLogging.configure (after_initialize),
|
|
12
|
+
# once logstasher.enabled has been set to true.
|
|
11
13
|
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
|
|
16
|
-
end
|
|
17
14
|
end
|
|
18
15
|
rescue LoadError, NameError
|
|
19
16
|
# Skip if Logstasher not present
|