govuk_app_config 1.10.0 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c62ff2c26e73e0ccd1cba0bef98975ae44bfab904c178b8c21809976e4691ce1
4
- data.tar.gz: 20017d561912281a14ee43c33005a52818d93ac22c3978807f14e5230483da48
3
+ metadata.gz: 3c943fd979fbb5e966e217f83e21a5815657b5b251eee70badb6a09a35611d4b
4
+ data.tar.gz: bd0f48f895a4b478cbdb9765347624f9eac4ce436946f589dfe318e64c6cece3
5
5
  SHA512:
6
- metadata.gz: f34561648d21a511d5423487401597f5d5be1404d79f2cfb14118730869b86dce0ba3cbc80990d098177081fe1b09a2f160df5f6831239ff0d3124bb24836a65
7
- data.tar.gz: e1fdd04a78bba8a0ac959e05240a83fafe21f3f9187565122495c6a5efc164e34c5c59b390f1cfee960b02811a02c16479585a10ad2d155a58cd2c194e9a95ff
6
+ metadata.gz: 9090d96be4367e26206666daa7aa7905351e8bb29fea43ed1d373ac4e20afb0f5e290f2af8b76eccb217bcdff12f2c9fbfe269744972a418221364137600eb4c
7
+ data.tar.gz: 75058dbf38294232c6a34c886dd313ca413da9f6afcf91de104deb239f972bbd2dfbe2c6efa95e1c196b70b5cf78e5094fb1e630ab0a834fe704999eed8e5a54
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 1.11.0
2
+
3
+ * Disable X-Ray entirely if the `GOVUK_APP_CONFIG_DISABLE_XRAY`
4
+ environment variable is set.
5
+
1
6
  # 1.10.0
2
7
 
3
8
  * Only instrument the `aws_sdk` gem with AWS X-Ray if the
@@ -1,8 +1,7 @@
1
1
  module GovukAppConfig
2
2
  class Railtie < Rails::Railtie
3
-
4
3
  initializer('govuk_app_config') do |app|
5
- GovukXRay.initialize(app) if Rails.env.production?
4
+ GovukXRay.initialize(app) if enable_railtie_for?('xray')
6
5
  end
7
6
 
8
7
  config.before_initialize do
@@ -10,7 +9,11 @@ module GovukAppConfig
10
9
  end
11
10
 
12
11
  config.after_initialize do
13
- GovukXRay.start if Rails.env.production?
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}")
14
17
  end
15
18
  end
16
19
  end
@@ -1,3 +1,3 @@
1
1
  module GovukAppConfig
2
- VERSION = "1.10.0"
2
+ VERSION = "1.11.0"
3
3
  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.10.0
4
+ version: 1.11.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-10-04 00:00:00.000000000 Z
11
+ date: 2019-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-xray-sdk