sinatra-logger 0.3.0 → 0.3.1

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: 13b8a7744a40e59cc29fa00bdd787e7c75676539
4
- data.tar.gz: f9b242bf47140f7a5063c2ee433f13e5c60037fc
3
+ metadata.gz: 3377c3b1cee746ff52f2f0059cc6b4d4cefeb4d4
4
+ data.tar.gz: 655674b6a4ef613e08b38d6c9308379d3ee53cdb
5
5
  SHA512:
6
- metadata.gz: 8dd1d90c956096f9dc88dc765114233fc8ae94f6e4ff477862fabe00d506c659704f61f34fb1eff251229dcce43be1c693bcce5f1403f7d2075f603b566ec69e
7
- data.tar.gz: 4e1d2297b34cd3ff4dd109431c58584c90b913928982c02d6415a0457b5f0dca99aada55fccc39dfa7350336bf4618dea80ba0e1e177f0729bdf0c97821f21a6
6
+ metadata.gz: 7d20411dd6066de22e06289746c08787b82bd29f84d6d8fa458c2c89336142befa70c3bdc4078641620a93770c128eebf5439ef8b7694e21f00dc63de8c693ca
7
+ data.tar.gz: ecdf77e8bd0e02bb0a5960df830e1cee30931e371aa6145a21506bdda8f590e12814ccf2abeca28ade4d0ac9833c43035fcdfec7c04e4ab1b4d902be584e313f
@@ -34,8 +34,10 @@ module Sinatra
34
34
  set :logging, true
35
35
  use ::Rack::CommonLogger, ::SemanticLogger["Access"]
36
36
 
37
- # ActiveRecord Logger
38
- ActiveRecord::Base.logger = ::SemanticLogger["SQL"]
37
+ if defined?(::ActiveRecord::Base)
38
+ # ActiveRecord Logger
39
+ ::ActiveRecord::Base.logger = ::SemanticLogger["SQL"]
40
+ end
39
41
 
40
42
  ::Sinatra::Base.before do
41
43
  ::SemanticLogger.default_level = config[:level]
@@ -1,5 +1,5 @@
1
1
  module Sinatra
2
2
  module Logger
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yehya Abouelnaga
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-02 00:00:00.000000000 Z
11
+ date: 2016-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: semantic_logger