ruby-proxy 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -168,7 +168,7 @@ module RubyProxy
168
168
  def start_service(t=5)
169
169
  message = nil
170
170
  @start_service_log_path = File.join(File.dirname(__FILE__),'start_service.log')
171
-
171
+ @service_log = nil
172
172
  server_thread = Thread.new do
173
173
  @@logger.info "start jruby proxy server..."
174
174
  org_path = Dir.pwd
@@ -177,11 +177,13 @@ module RubyProxy
177
177
  # just change here command
178
178
  temp = ENV["RUBYOPT"]
179
179
  ENV["RUBYOPT"] = "-rubygems"
180
- system("start /I /B jruby -J-Dfile.encoding=UTF-8 ruby_proxy/server.rb #{@ip} #{@port} \"#{org_path}\" ") #> #{@start_service_log_path} 2>&1")
180
+ #system("start /I /B jruby -J-Dfile.encoding=UTF-8 ruby_proxy/server.rb #{@ip} #{@port} \"#{org_path}\" ") #> #{@start_service_log_path} 2>&1")
181
+ @service_log = IO.popen("jruby -J-Dfile.encoding=UTF-8 ruby_proxy/server.rb #{@ip} #{@port} \"#{org_path}\" 2>&1")
181
182
  ENV["RUBYOPT"] = temp
182
183
  end
183
184
  end
184
185
  wait_until_server_start_time(t)
186
+ #@service_log.close
185
187
  end
186
188
 
187
189
  def stop_service(t=5)
@@ -206,7 +208,7 @@ module RubyProxy
206
208
  sleep 1
207
209
  end
208
210
  end
209
- raise RuntimeError,"start drbserver fail, reason: #{File.read(@start_service_log_path) rescue nil}"
211
+ raise RuntimeError,"start drbserver fail, reason: \n#{@service_log.read rescue nil}"
210
212
  end
211
213
 
212
214
  end
@@ -1,3 +1,3 @@
1
1
  module RubyProxy
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 4
9
- version: 0.0.4
8
+ - 5
9
+ version: 0.0.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - yafei Li
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-09-07 00:00:00 +08:00
17
+ date: 2011-09-25 00:00:00 +08:00
18
18
  default_executable:
19
19
  dependencies: []
20
20