mini_logger 0.0.1 → 0.1.1

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/mini_logger.rb +3 -9
  2. data/lib/version.rb +2 -2
  3. metadata +3 -25
data/lib/mini_logger.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require 'rubygems'
2
2
  require 'logger'
3
- require 'config_context'
4
3
 
5
4
 
6
5
  module MiniLogger
@@ -8,7 +7,7 @@ module MiniLogger
8
7
 
9
8
  LOG_CHANNEL_KEY = :log_channel
10
9
  LOG_LEVEL_KEY = :log_level
11
- DEFAULT_CONFIGURATION = { LOG_CHANNEL_KEY=>STDERR, LOG_LEVEL_KEY=>::Logger::DEBUG }
10
+ DEFAULT_CONFIGURATION = { LOG_CHANNEL_KEY=>STDERR, LOG_LEVEL_KEY=>::Logger::INFO }
12
11
  VALID_METHODS = [:debug, :info, :warn, :error, :fatal]
13
12
 
14
13
 
@@ -21,13 +20,8 @@ module MiniLogger
21
20
 
22
21
  def configure( options=DEFAULT_CONFIGURATION )
23
22
 
24
- ConfigContext.configure do |config|
25
-
26
- options.keys.each { |property| config[property] = options[property] }
27
- end
28
-
29
- @logger ||= Logger.new( ConfigContext[LOG_CHANNEL_KEY] )
30
- @logger.level ||= ConfigContext[LOG_LEVEL_KEY]
23
+ @logger ||= Logger.new( options[LOG_CHANNEL_KEY] )
24
+ @logger.level ||= options[LOG_LEVEL_KEY]
31
25
 
32
26
  self
33
27
  end
data/lib/version.rb CHANGED
@@ -2,7 +2,7 @@ module Version
2
2
  module Info
3
3
 
4
4
  MAJOR = 0
5
- MINOR = 0
5
+ MINOR = 1
6
6
  PATCH = 1
7
7
 
8
8
  end
@@ -10,4 +10,4 @@ module Version
10
10
  NAME = 'mini_logger'
11
11
  INFO = "#{Info::MAJOR}.#{Info::MINOR}.#{Info::PATCH}"
12
12
  COMPLETE = "#{NAME}-#{INFO}"
13
- end
13
+ end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: mini_logger
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Javier Juarez
@@ -10,11 +10,11 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-02-14 00:00:00 +01:00
13
+ date: 2011-02-15 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
- name: mocha
17
+ name: config_context
18
18
  requirement: &id001 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
@@ -24,28 +24,6 @@ dependencies:
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
28
- name: config_context
29
- requirement: &id002 !ruby/object:Gem::Requirement
30
- none: false
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: "0"
35
- type: :runtime
36
- prerelease: false
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
39
- name: config_context
40
- requirement: &id003 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- version: "0"
46
- type: :runtime
47
- prerelease: false
48
- version_requirements: *id003
49
27
  description: My config DSL
50
28
  email: javier.juarez@gmail.com
51
29
  executables: []