serverengine 1.5.8 → 1.5.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OWJjNGIwYzAzZWFiOWYzNjMzODhiZGMyOTI0YzgwMzQ0MjRlMWFjMA==
4
+ NTE3MmE3Y2NkZWFlY2VmNmFmYjc4ZTk1MWEzYTIyMDQwYjNkZDY0Ng==
5
5
  data.tar.gz: !binary |-
6
- YTI2MGEzN2E3Yjc5NzUxZTY2YjYwMWZkYmIyN2VkOTM5OTA4MGQ0MA==
6
+ NGExMjkzMDk3MjdjZjA5ZDBmM2U0OGM0YWViZjgxZWRlNTVmMjg4Mg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTI3ZDNiN2I2MGQxYTBmZWQwZWU2ZGFmNDRkYTE5MGZjMWY1YzZkMDJlYTM5
10
- M2JiZTBhZWI1MGQwMTlhNGM2MzQwMjNkODEyYmY3ODk3ZTIxNTY3NWQxZGQ5
11
- MGQzNTIxYjA4NGZhYTI1Y2Y4OWI4MzhkNWY2ZjY1NTg2NGMwNWE=
9
+ MGY1NzhmY2Q2MDUzNzljNTVlYjcwNDQ3ZjBiYzQ3NWY4ZDA0MTQzYzViMTZi
10
+ YTVmNzhlNzIzM2RhOWVkNDZkMzFkNmRhODc0ZTBmMzM1MThkM2VhNTg2NjY0
11
+ YTZlMmFmNGJlMWMxMzBjNTRiNmU4MjQyZDdkY2U2NWUwZjdiNmM=
12
12
  data.tar.gz: !binary |-
13
- MzkxNmJiZTU1ZmRlNzgyYzZhMmRmOGVmOTI0MWI2NDU4MjlkMjE1OWIxM2M5
14
- MGYyMjNmYmZhOGJlNDcwNmI1NDZiNTQ1MzcyYTljMGZhMzVkMzkxYWU0ZjYz
15
- MTU4YTAyYTdlMjYwM2QwMTE0OTIxMTMyNmQ3Mzg1MjU3MTE1ODY=
13
+ OWJjOTljMWI5MTcxNzkwYzJjYmQxNWI3MTYwMTUzMTMxYzhhNjRlYzNlNjZl
14
+ NDYzYjJiZWJkNTQ3NTM2NzYzZmM5ZjRhNzRjMTVmMDNiMjJjNzkyNTE5MjIx
15
+ YmUwMjkwMDQ1ZTc0ZTQxMTY0NDBkYzY5NzE0MDc2ZDNmYWQ0NTk=
data/Changelog CHANGED
@@ -1,4 +1,9 @@
1
1
 
2
+ 2014-07-24 version 1.5.9:
3
+
4
+ * Fixed DaemonLogger#reoepen! on Ruby >= 2.1.0
5
+
6
+
2
7
  2014-06-27 version 1.5.8:
3
8
 
4
9
  * Use standard LogDevice on Ruby >= 2.1.0 imporoved at https://github.com/ruby/ruby/pull/428
@@ -19,6 +19,15 @@ module ServerEngine
19
19
 
20
20
  require 'logger'
21
21
 
22
+ class ::Logger::LogDevice
23
+ def reopen!
24
+ if filename = @filename
25
+ @dev.reopen(filename, 'a')
26
+ @dev.sync = true
27
+ end
28
+ end
29
+ end
30
+
22
31
  class DaemonLogger < Logger
23
32
  def initialize(logdev, config={})
24
33
  @rotate_age = config[:log_rotate_age] || 5
@@ -1,3 +1,3 @@
1
1
  module ServerEngine
2
- VERSION = "1.5.8"
2
+ VERSION = "1.5.9"
3
3
  end
@@ -11,9 +11,13 @@ describe ServerEngine::DaemonLogger do
11
11
  it 'reopen' do
12
12
  subject.warn "ABCDEF"
13
13
  File.open('tmp/se1.log', "w") {|f| }
14
- subject.warn "test2"
15
14
 
15
+ subject.warn "test2"
16
16
  File.read('tmp/se1.log').should_not =~ /ABCDEF/
17
+
18
+ subject.reopen!
19
+ subject.warn "test3"
20
+ File.read('tmp/se1.log').should =~ /test3/
17
21
  end
18
22
 
19
23
  it 'reset path' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serverengine
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.8
4
+ version: 1.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-27 00:00:00.000000000 Z
11
+ date: 2014-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sigdump