sqreen 1.4.3 → 1.5.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
  SHA1:
3
- metadata.gz: 36d9acaf03b582ce9120a6425278ccd50d113a9d
4
- data.tar.gz: 18ac50baadde2c653751bcff36952738ddadf602
3
+ metadata.gz: 6d96899ae72184cb34509aab39eba75cb2ba0cf8
4
+ data.tar.gz: 4201f6dbc906404d35dfb4352a32f4b1b2cc9775
5
5
  SHA512:
6
- metadata.gz: bad005dac888fccba0429e29c22f0bf2f471f53dd1745b5fe210af74a13742fedb3d78f4b091f17356d7f3fc7c8717a848ecaea325044ecb80ab443b23ed89ae
7
- data.tar.gz: 7b8708e9c8d5f4c5a6d6428a12416a7904b3fa2e862f0384ccd4ff18865588d3e476a060ea448df15e86e5bd7e9aa75c8dae20cecb6aeed1686fc79f7dfaa60e
6
+ metadata.gz: 63b4dc8db5a2709f720614ecf0e8b57fd91648ce02124a6fafd083435aa3c8d7e6c1de5b877c4b65be1aa9e7adb5214b93861b93e3e50d842d21f74967b76570
7
+ data.tar.gz: f589404093b80c59cf48680f4de58b2b3e8ebd164f5912ed4daa4b6a8c3b0de0348581fab382ae912ae4e5cc134d3883818f13e6c86998e833e65fc043c83b4b
@@ -2,6 +2,7 @@
2
2
  # Please refer to our terms for more information: https://www.sqreen.io/terms.html
3
3
 
4
4
  require 'yaml'
5
+ require 'erb'
5
6
  require 'sqreen/performance_notifications/newrelic'
6
7
 
7
8
  module Sqreen
@@ -24,6 +25,8 @@ module Sqreen
24
25
  CONFIG_FILE_BY_ENV = 'SQREEN_CONFIG_FILE'.freeze
25
26
 
26
27
  CONFIG_DESCRIPTION = [
28
+ { :env => :SQREEN_DISABLE, :name => :disable,
29
+ :default => false },
27
30
  { :env => :SQREEN_URL, :name => :url,
28
31
  :default => 'https://back.sqreen.io' },
29
32
  { :env => :SQREEN_TOKEN, :name => :token,
@@ -104,7 +107,7 @@ module Sqreen
104
107
  end
105
108
 
106
109
  def parse_configuration_file(path)
107
- res = YAML.load_file path
110
+ res = YAML.load(ERB.new(File.read(path)).result)
108
111
  return {} unless res.is_a?(Hash)
109
112
  if @framework
110
113
  env = @framework.framework_infos[:environment]
@@ -143,7 +143,9 @@ module Sqreen
143
143
 
144
144
  # Should the agent not be starting up?
145
145
  def prevent_startup
146
- :irb if $0 == 'irb'
146
+ return :irb if $0 == 'irb'
147
+ return if sqreen_configuration.nil?
148
+ return :config_disable if sqreen_configuration.get(:disable)
147
149
  end
148
150
 
149
151
  # Instrument with our rules when the framework as finished loading
@@ -1,5 +1,5 @@
1
1
  # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
2
  # Please refer to our terms for more information: https://www.sqreen.io/terms.html
3
3
  module Sqreen
4
- VERSION = '1.4.3'.freeze
4
+ VERSION = '1.5.0'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqreen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sqreen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-07 00:00:00.000000000 Z
11
+ date: 2017-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: execjs