sqreen 1.15.5 → 1.15.6

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: 4f460325e9377e9204840feb8c4f53d580b1f4c84fdf1d361889887d22f7bccf
4
- data.tar.gz: 0a92e132141222360ef9deb652ef755e60c863aca6070e3bc2b102d9f43dfbbe
3
+ metadata.gz: 2954f152a5de09e1e76229fb51bdd4de43c3368a0c147e9d6df5e718b8ef7db2
4
+ data.tar.gz: 73675a112d80f502a9cbef995eacd48aa53aa7919064b49f0c56faaed2bfceef
5
5
  SHA512:
6
- metadata.gz: 331ef90dfd3164b75a56bbe9ee35bef1e64204feedd14b60074dc08f32dcfd8b9750f33793bf0dbc11c3063d011a8f9a824dddb1647b0cadad0b72d8d1ae9663
7
- data.tar.gz: b5feb7683f00fe75714dea4fc163b5335272b05bb79dfbba59f9af93398a5ee8fda8f636dfb02b9f35b953fee6066154eeb4df5a6f95b3299224295aad8d3525
6
+ metadata.gz: 984f765a0d7995d49cda4515df0d6bed2c2390b38e713e927af566ccd71e0d5cb22c05b2a8c2cde7a225e8ec146d2e42ed80ceb7775b6e11939819422250918f
7
+ data.tar.gz: 0bf04fb5f2fe03e0b6614e0f2c06f9cacba288bd553c98fa12b7a5bf258eafb32bac45624cc60210a8e8d2d168a19eb6eb3d72c494d066a038eac4acd44fd355
@@ -22,6 +22,10 @@ module Sqreen
22
22
  @config.get(name)
23
23
  end
24
24
 
25
+ def self.configured?
26
+ !@config.nil?
27
+ end
28
+
25
29
  CONFIG_FILE_BY_ENV = 'SQREEN_CONFIG_FILE'.freeze
26
30
 
27
31
  CONFIG_DESCRIPTION = [
@@ -11,6 +11,7 @@ module Sqreen
11
11
  def self::log
12
12
  @logger ||= nil
13
13
  return @logger unless @logger.nil?
14
+ return NoopLogger.instance unless Sqreen.configured?
14
15
  @logger = Logger.new(
15
16
  Sqreen.config_get(:log_level).to_s.upcase,
16
17
  Sqreen.config_get(:log_location)
@@ -119,4 +120,16 @@ module Sqreen
119
120
  logger.formatter = FormatterWithTid.new
120
121
  end
121
122
  end
123
+
124
+ class NoopLogger
125
+ include Singleton
126
+
127
+ def debug(_msg = nil); end
128
+
129
+ def info(_msg = nil); end
130
+
131
+ def warn(_msg = nil); end
132
+
133
+ def error(_msg = nil); end
134
+ end
122
135
  end
@@ -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.15.5'.freeze
4
+ VERSION = '1.15.6'.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.15.5
4
+ version: 1.15.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sqreen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-15 00:00:00.000000000 Z
11
+ date: 2018-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sq_mini_racer