simplelog 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/simplelog.rb +1 -1
- data/test/{simplelogtest.rb → simplelog_test.rb} +5 -4
- metadata +3 -3
data/lib/simplelog.rb
CHANGED
@@ -14,9 +14,6 @@ class Simplelogtest < Test::Unit::TestCase
|
|
14
14
|
assert_equal(Simplelog.name, @logname)
|
15
15
|
end
|
16
16
|
|
17
|
-
def test_unknown_dir
|
18
|
-
end
|
19
|
-
|
20
17
|
def test_dir
|
21
18
|
assert_equal(Simplelog.dir, @dirname)
|
22
19
|
Simplelog.dir= @dirname + "\\\\\\"
|
@@ -26,7 +23,10 @@ class Simplelogtest < Test::Unit::TestCase
|
|
26
23
|
def test_puts
|
27
24
|
puts "Some more text for tests"
|
28
25
|
puts "We are testing"
|
29
|
-
assert_match(/testing\n$/, Simplelog.logtext)
|
26
|
+
assert_match(/testing\n$/, Simplelog.logtext)
|
27
|
+
today = Date.today
|
28
|
+
puts today
|
29
|
+
assert_match(/#{today.to_s}\n$/, Simplelog.logtext)
|
30
30
|
end
|
31
31
|
|
32
32
|
def test_p
|
@@ -72,6 +72,7 @@ class Simplelogtest < Test::Unit::TestCase
|
|
72
72
|
Simplelog.dir = unknown
|
73
73
|
assert !File.directory?(unknown)
|
74
74
|
Simplelog.save
|
75
|
+
puts Simplelog.filename
|
75
76
|
assert(FileTest.file?(Simplelog.filename))
|
76
77
|
File.delete(Simplelog.filename)
|
77
78
|
Dir.delete(@dirname + "/unknown/directory")
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: simplelog
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.2.
|
7
|
-
date: 2006-
|
6
|
+
version: 0.2.1
|
7
|
+
date: 2006-11-07 00:00:00 +01:00
|
8
8
|
summary: The simplest logger ever. Just require 'simplelog' and all puts statements are logged to .txt as well as shown on screen.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -32,7 +32,7 @@ files:
|
|
32
32
|
- lib/simplelog.rb
|
33
33
|
- license.txt
|
34
34
|
test_files:
|
35
|
-
- test/
|
35
|
+
- test/simplelog_test.rb
|
36
36
|
rdoc_options: []
|
37
37
|
|
38
38
|
extra_rdoc_files:
|