SvnRunner.run_svn should be a class method
This commit is contained in:
parent
50529580c0
commit
94c38ade8f
@ -4,6 +4,8 @@ module Svi
|
||||
# Exception class to indicate an error with executing svn.
|
||||
class SvnExecError < RuntimeError; end
|
||||
|
||||
class << self
|
||||
|
||||
# Run Subversion and yield results linewise.
|
||||
#
|
||||
# @param subcommand [String, nil]
|
||||
@ -54,12 +56,12 @@ module Svi
|
||||
stdout_yield = ""
|
||||
|
||||
loop do
|
||||
so = stdout_rd.read_nonblock(exception: false)
|
||||
so = stdout_rd.read_nonblock(100000, exception: false)
|
||||
if so.is_a?(String)
|
||||
stdout += so
|
||||
stdout_yield += so
|
||||
end
|
||||
se = stderr_rd.read_nonblock(exception: false)
|
||||
se = stderr_rd.read_nonblock(100000, exception: false)
|
||||
if se.is_a?(String)
|
||||
stderr += se
|
||||
end
|
||||
@ -88,4 +90,6 @@ module Svi
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user