govuk_app_config 1.11.0 → 1.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/govuk_app_config/railtie.rb +6 -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: 06427a145a23e987f54b23bd89d4b2f591ce6fafd2fa17b2ed3154e5b8eb1aa2
|
4
|
+
data.tar.gz: 4c1d54b74d7f9dbff47497247d2d810d52c998ada36a54669689194c008a427f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9af362bd45ab6d01659695e656bc1d9149fcd06ad780f05f656c6e6fef83cf9e85d2c69ae3062401a9a9229dbb3e78163abda45cb3167096c7479f230a9f2fa5
|
7
|
+
data.tar.gz: a8681fd00099c7b2cd619d0a148003123df6dc95f04f8960dae3ca1e01185c68a8e736163a19f536b62d6a8d215480abb45ca31157d0f498b40741e9a4b47787
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
module GovukAppConfig
|
2
2
|
class Railtie < Rails::Railtie
|
3
|
+
def self.enable_railtie_for?(name)
|
4
|
+
Rails.env.production? && !ENV.has_key?("GOVUK_APP_CONFIG_DISABLE_#{name.upcase}")
|
5
|
+
end
|
6
|
+
|
3
7
|
initializer('govuk_app_config') do |app|
|
4
|
-
GovukXRay.initialize(app) if enable_railtie_for?('xray')
|
8
|
+
GovukXRay.initialize(app) if self.enable_railtie_for?('xray')
|
5
9
|
end
|
6
10
|
|
7
11
|
config.before_initialize do
|
@@ -9,11 +13,7 @@ module GovukAppConfig
|
|
9
13
|
end
|
10
14
|
|
11
15
|
config.after_initialize do
|
12
|
-
GovukXRay.start if enable_railtie_for?('xray')
|
13
|
-
end
|
14
|
-
|
15
|
-
def self.enable_railtie_for?(name)
|
16
|
-
Rails.env.production? && !ENV.has_key?("GOVUK_APP_CONFIG_DISABLE_#{name.upcase}")
|
16
|
+
GovukXRay.start if self.enable_railtie_for?('xray')
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|