semlogger 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/semlogger/rotate.rb +2 -5
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -9,11 +9,7 @@ class Semlogger::Rotate
9
9
 
10
10
  def open_if
11
11
  name = Time.now.strftime( @filename).gsub /%\$/, $$.to_s
12
- #p at: Time.now, open_if: name, cur: @file ? @file.path : nil, e: @file ? name == @file.path : nil
13
- if @file and name == @file.path
14
- @file.close
15
- @file = nil
16
- end
12
+ @file.close if @file and name != @file.path
17
13
  @file = File.open name, 'a' unless @file
18
14
  @file
19
15
  end
@@ -24,5 +20,6 @@ class Semlogger::Rotate
24
20
 
25
21
  def close
26
22
  @file.close
23
+ @file = nil
27
24
  end
28
25
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 4
9
+ version: 0.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Denis Knauf
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-05-21 00:00:00 +02:00
17
+ date: 2012-09-17 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency