pmux-gw 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -53,7 +53,6 @@ module Pmux
53
53
  end
54
54
  new_last_rotate = Date.today()
55
55
  if new_last_rotate.day != @last_rotate.day || @reset
56
- @file_path = build_file_path(@new_last_rotate)
57
56
  if !@fp.nil?
58
57
  @fp.close()
59
58
  @fp = nil
@@ -61,6 +60,7 @@ module Pmux
61
60
  @logger.logging("error", "can not close file, file object is nil")
62
61
  end
63
62
  begin
63
+ @file_path = build_file_path(new_last_rotate)
64
64
  @fp = open(@file_path, "a")
65
65
  @last_rotate = new_last_rotate
66
66
  @reset = false
@@ -441,11 +441,11 @@ module Pmux
441
441
  end
442
442
  rescue Exception => e
443
443
  # 予期しない例外は500を返し、ログに残しておく
444
+ @logger.logging("error", "error occurred in http handler: #{e}")
445
+ @logger.logging("error", e.backtrace.join("\n"))
444
446
  error_response({:status => 500,
445
447
  :content_type => "text/plain",
446
448
  :content => "error: #{e}"})
447
- @logger.logging("error", "error occurred in http handler: #{e}")
448
- @logger.logging("error", e.backtrace.join("\n"))
449
449
  end
450
450
  end
451
451
  end
@@ -58,7 +58,7 @@ module Pmux
58
58
  # pmux実行のステータスコードが0でない場合はその値とstderrを返す
59
59
  @cc.response.content_type("application/octet-stream")
60
60
  if @cc.content_too_big
61
- @cc.response.status = 500
61
+ @cc.response.status = 507
62
62
  @cc.response.content = "#{retcode}\r\ntoo big response data size with detect error (#{@cc.stdout_data.length} byte)"
63
63
  elsif retcode == 0
64
64
  @cc.response.status = 200
@@ -1,5 +1,5 @@
1
1
  module Pmux
2
2
  module Gateway
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pmux-gw
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 4
10
- version: 0.1.4
9
+ - 5
10
+ version: 0.1.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Hiroyuki Kakine
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-01-11 00:00:00 +09:00
18
+ date: 2013-01-16 00:00:00 +09:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency