Commit 30437471da4508adffe163c017febb8e6196f22e

Keep the SubversionClient clean by not including Open4 anymore. Attempt to load open4 even if rubygems is unavailable.

git-svn-id: svn+ssh://rubyforge.org/var/svn/piston/trunk@131 d6c2ea82-c31b-0410-8381-e9c44f9824c5

Commit diff

lib/piston/subversion_client.rb

 
3232 end
3333
3434 begin
35 raise LoadError, "Not implemented on Win32 machines" if RUBY_PLATFORM =~ /mswin32/
36 require "rubygems"
35 raise LoadError, "Not implemented on Win32 machines" if RUBY_PLATFORM =~ /mswin32/
36 begin
37 require "rubygems"
38 rescue LoadError
39 # NOP -- attempt to load without Rubygems
40 end
41
3742 require "open4"
38 include Open4
3943
40 def run_real(cmd)
41 pid, stdin, stdout, stderr = popen4(cmd)
44 def run_real(cmd)
45 pid, stdin, stdout, stderr = Open4::popen4(cmd)
4246 _, cmdstatus = Process.waitpid2(pid)
4347 raise CommandError, "#{cmd.inspect} exited with status: #{cmdstatus.exitstatus}\n#{stderr.read}" unless cmdstatus.success?
4448 return stdout.read
toggle raw diff