ztk 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/ztk/logger.rb +3 -1
  2. data/lib/ztk/version.rb +1 -1
  3. metadata +2 -2
data/lib/ztk/logger.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require "logger"
2
+
1
3
  class ZTK::Logger < ::Logger
2
4
  SEVERITIES = Severity.constants.inject([]) {|arr,c| arr[Severity.const_get(c)] = c; arr}
3
5
 
@@ -32,7 +34,7 @@ class ZTK::Logger < ::Logger
32
34
  end
33
35
 
34
36
  def set_log_level(level=nil)
35
- default = (Rails.env.production? ? "INFO" : "DEBUG")
37
+ defined?(Rails) and (default = (Rails.env.production? ? "INFO" : "DEBUG")) or (default = "INFO")
36
38
  log_level = (ENV['LOG_LEVEL'] || level || default)
37
39
  self.level = ZTK::Logger.const_get(log_level.to_s.upcase)
38
40
  end
data/lib/ztk/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ZTK
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2" unless const_defined?(:VERSION)
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ztk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-16 00:00:00.000000000 Z
12
+ date: 2012-08-24 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Zachary's Toolkit
15
15
  email: