TwP-logging 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/lib/logging/appenders/file.rb +4 -0
- data/lib/logging/appenders/rolling_file.rb +4 -0
- data/lib/logging.rb +1 -1
- data/test/appenders/test_file.rb +2 -0
- data/test/appenders/test_rolling_file.rb +2 -0
- metadata +2 -2
data/History.txt
CHANGED
data/lib/logging.rb
CHANGED
@@ -30,7 +30,7 @@ begin require 'fastthread'; rescue LoadError; end
|
|
30
30
|
module Logging
|
31
31
|
|
32
32
|
# :stopdoc:
|
33
|
-
VERSION = '1.1.
|
33
|
+
VERSION = '1.1.1'
|
34
34
|
LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
|
35
35
|
PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
|
36
36
|
WIN32 = %r/djgpp|(cyg|ms|bcc)win|mingw/ =~ RUBY_PLATFORM
|
data/test/appenders/test_file.rb
CHANGED
@@ -43,6 +43,7 @@ module TestAppenders
|
|
43
43
|
log = File.join(TMP, 'file.log')
|
44
44
|
appender = Logging.appenders.file(NAME, 'filename' => log)
|
45
45
|
assert_equal 'logfile', appender.name
|
46
|
+
assert_equal log, appender.filename
|
46
47
|
appender << "This will be the first line\n"
|
47
48
|
appender << "This will be the second line\n"
|
48
49
|
appender.flush
|
@@ -55,6 +56,7 @@ module TestAppenders
|
|
55
56
|
|
56
57
|
appender = Logging.appenders.file(NAME, :filename => log)
|
57
58
|
assert_equal 'logfile', appender.name
|
59
|
+
assert_equal log, appender.filename
|
58
60
|
appender << "This will be the third line\n"
|
59
61
|
appender.flush
|
60
62
|
File.open(log, 'r') do |file|
|
@@ -23,6 +23,7 @@ module TestAppenders
|
|
23
23
|
|
24
24
|
# create a new appender
|
25
25
|
ap = Logging.appenders.rolling_file(NAME, :filename => @fn)
|
26
|
+
assert_equal @fn, ap.filename
|
26
27
|
assert File.exist?(@fn)
|
27
28
|
assert_equal 0, File.size(@fn)
|
28
29
|
|
@@ -33,6 +34,7 @@ module TestAppenders
|
|
33
34
|
|
34
35
|
# make sure we append to the current file (not truncate)
|
35
36
|
ap = Logging.appenders.rolling_file(NAME, :filename => @fn)
|
37
|
+
assert_equal @fn, ap.filename
|
36
38
|
assert_equal [@fn], Dir.glob(@glob)
|
37
39
|
assert_equal 20, File.size(@fn)
|
38
40
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: TwP-logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Pease
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-04-
|
12
|
+
date: 2009-04-30 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|