lager 1.1.2.1 → 1.1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +2 -5
- data/Rakefile +12 -0
- data/VERSION +1 -1
- data/lager.gemspec +11 -4
- data/lib/lager.rb +4 -4
- data/test/lager.rb +1 -1
- metadata +20 -27
- data/MANIFEST.txt +0 -9
- data/rakefile.rb +0 -14
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 64b64cc70e40a568fafd57dd3734138c27f60110
|
4
|
+
data.tar.gz: a3a04e2ccd0fbd5e3353b4d6bb8319c1fe3bec09
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0867774d99d08023b09b4c823d41939197f9b74b12e3ee585e0d809aae12dc143172bb8a6b68d9d0590ec905a993e3a73b847e3fa7dee9983bf3017f30fa12fe
|
7
|
+
data.tar.gz: 0346d4b317fe7914666fb35fa4676b97600bd82509c92fedab6b48e1191d7def7401cf01153a41144022efa6c641b1dfeb86f6bdd95362a004b5254137f2791f
|
data/README.md
CHANGED
@@ -85,13 +85,10 @@ For Logger, generally: use block invocation of message methods.
|
|
85
85
|
@lager.debug { "hi" }
|
86
86
|
# rather than
|
87
87
|
@lager.debug "hi"
|
88
|
-
|
89
|
-
# By using the first form, the block will not be evaluated unless we
|
90
|
-
# are logging at DEBUG level.
|
91
|
-
# If using the second form, the message is evaluated no matter the current
|
92
|
-
# log level. This can be significant when logging complicated messages.
|
93
88
|
```
|
94
89
|
|
90
|
+
By using the first form, the block will not be evaluated unless you are logging at DEBUG level. If using the second form, the message is evaluated no matter the current log level. This can be significant when logging heavily processed messages.
|
91
|
+
|
95
92
|
Artifacts
|
96
93
|
---------
|
97
94
|
* By mixing in Lager via extend, you introduce these class methods:
|
data/Rakefile
ADDED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.3.1
|
data/lager.gemspec
CHANGED
@@ -7,15 +7,22 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.has_rdoc = true
|
8
8
|
s.description = "Should you use it? Yes."
|
9
9
|
|
10
|
-
s.add_development_dependency "minitest", ["
|
11
|
-
s.add_development_dependency "buildar", ["~> 1
|
10
|
+
s.add_development_dependency "minitest", ["~> 1"]
|
11
|
+
s.add_development_dependency "buildar", ["~> 1"]
|
12
12
|
|
13
13
|
# dynamic setup
|
14
14
|
this_dir = File.expand_path('..', __FILE__)
|
15
15
|
version_file = File.join(this_dir, 'VERSION')
|
16
|
-
manifest_file = File.join(this_dir, 'MANIFEST.txt')
|
17
16
|
|
18
17
|
# dynamic assignments
|
19
18
|
s.version = File.read(version_file).chomp
|
20
|
-
s.files =
|
19
|
+
s.files = %w[lager.gemspec
|
20
|
+
VERSION
|
21
|
+
README.md
|
22
|
+
Rakefile
|
23
|
+
lib/lager.rb
|
24
|
+
test/lager.rb
|
25
|
+
examples/foo.rb
|
26
|
+
examples/usage.rb
|
27
|
+
]
|
21
28
|
end
|
data/lib/lager.rb
CHANGED
@@ -54,15 +54,15 @@ module Lager
|
|
54
54
|
dest # don't expose @lager here
|
55
55
|
end
|
56
56
|
|
57
|
-
#
|
58
|
-
# call with argument to set the log level
|
59
|
-
# :debug, 'debug', and Logger::DEBUG (0) are all supported
|
57
|
+
# returns a symbol e.g. :debug -- possibly :unknown
|
60
58
|
#
|
61
59
|
def log_level
|
62
60
|
raise "no @lager available" unless defined?(@lager)
|
63
61
|
[:debug, :info, :warn, :error, :fatal][@lager.level] || :unknown
|
64
62
|
end
|
65
63
|
|
64
|
+
# :debug, 'debug', and Logger::DEBUG (0) are all supported
|
65
|
+
#
|
66
66
|
def log_level=(level)
|
67
67
|
raise "no @lager available" unless defined?(@lager)
|
68
68
|
case level
|
@@ -87,7 +87,7 @@ module Lager
|
|
87
87
|
# typically only used within initialize
|
88
88
|
#
|
89
89
|
def lager
|
90
|
-
|
90
|
+
raise "no @lager available" unless defined?(@lager)
|
91
91
|
@lager
|
92
92
|
end
|
93
93
|
end
|
data/test/lager.rb
CHANGED
metadata
CHANGED
@@ -1,86 +1,79 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
5
|
-
prerelease:
|
4
|
+
version: 1.1.3.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Rick Hull
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-11-30 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: minitest
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - "~>"
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
19
|
+
version: '1'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
26
|
+
version: '1'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: buildar
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- - ~>
|
31
|
+
- - "~>"
|
36
32
|
- !ruby/object:Gem::Version
|
37
|
-
version: '1
|
33
|
+
version: '1'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- - ~>
|
38
|
+
- - "~>"
|
44
39
|
- !ruby/object:Gem::Version
|
45
|
-
version: '1
|
40
|
+
version: '1'
|
46
41
|
description: Should you use it? Yes.
|
47
42
|
email:
|
48
43
|
executables: []
|
49
44
|
extensions: []
|
50
45
|
extra_rdoc_files: []
|
51
46
|
files:
|
52
|
-
- lager.gemspec
|
53
|
-
- MANIFEST.txt
|
54
|
-
- VERSION
|
55
47
|
- README.md
|
56
|
-
-
|
57
|
-
-
|
58
|
-
- test/lager.rb
|
48
|
+
- Rakefile
|
49
|
+
- VERSION
|
59
50
|
- examples/foo.rb
|
60
51
|
- examples/usage.rb
|
52
|
+
- lager.gemspec
|
53
|
+
- lib/lager.rb
|
54
|
+
- test/lager.rb
|
61
55
|
homepage: http://github.com/rickhull/lager
|
62
56
|
licenses:
|
63
57
|
- LGPL
|
58
|
+
metadata: {}
|
64
59
|
post_install_message:
|
65
60
|
rdoc_options: []
|
66
61
|
require_paths:
|
67
62
|
- lib
|
68
63
|
required_ruby_version: !ruby/object:Gem::Requirement
|
69
|
-
none: false
|
70
64
|
requirements:
|
71
|
-
- -
|
65
|
+
- - ">="
|
72
66
|
- !ruby/object:Gem::Version
|
73
67
|
version: '0'
|
74
68
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
|
-
none: false
|
76
69
|
requirements:
|
77
|
-
- -
|
70
|
+
- - ">="
|
78
71
|
- !ruby/object:Gem::Version
|
79
72
|
version: '0'
|
80
73
|
requirements: []
|
81
74
|
rubyforge_project:
|
82
|
-
rubygems_version:
|
75
|
+
rubygems_version: 2.2.2
|
83
76
|
signing_key:
|
84
|
-
specification_version:
|
77
|
+
specification_version: 4
|
85
78
|
summary: Sane class-level logging
|
86
79
|
test_files: []
|
data/MANIFEST.txt
DELETED
data/rakefile.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
require 'buildar/tasks'
|
2
|
-
require 'rake/testtask'
|
3
|
-
|
4
|
-
Buildar.conf(__FILE__) do |b|
|
5
|
-
b.name = 'lager'
|
6
|
-
b.use_version_file = true
|
7
|
-
b.version_filename = 'VERSION'
|
8
|
-
b.use_git = true
|
9
|
-
b.publish[:rubygems] = true
|
10
|
-
end
|
11
|
-
|
12
|
-
Rake::TestTask.new :test do |t|
|
13
|
-
t.pattern = 'test/*.rb'
|
14
|
-
end
|