Permalink
Browse files

fuck you popen4

  • Loading branch information...
schacon committed Dec 22, 2010
1 parent dc27a99 commit f1123c9985583fbe800e075d44577e0ff5aa17b5
Showing with 5 additions and 17 deletions.
  1. +4 −15 lib/snakeeyes.rb
  2. +1 −2 snakeeyes.gemspec
View
@@ -1,7 +1,6 @@
require 'rubygems'
require "json"
require "uri"
-require 'popen4'
require "net/http"
require 'pp'
@@ -66,15 +65,9 @@ def run_tests
debug "run tests"
command = git("config cijoe.runner")
debug "running '#{command}'...", 1
- output = ''
- status = POpen4::popen4(command) do |stdout, stderr, stdin, pid|
- stdin.close
- out = stdout.read
- err = stderr.read
- output = out + err
- end
- debug "test exitstatus : #{ status.exitstatus }", 2
- [(status.exitstatus == 0), output]
+ output = `#{command}`
+ debug "test exitstatus : #{ $?.exitstatus }", 2
+ [($?.exitstatus == 0), output]
end
# report the output to general hawk
@@ -130,11 +123,7 @@ def sleepy_time
end
def git(command)
- out = ''
- status = POpen4::popen4("git #{command}") do |stdout, stderr, stdin, pid|
- out = stdout.read
- end
- out.chomp
+ `git #{command}`.chomp
end
def debug(message = "", level = 0)
View
@@ -2,7 +2,7 @@ $LOAD_PATH.unshift 'lib'
Gem::Specification.new do |s|
s.name = "snakeeyes"
- s.version = "0.0.5"
+ s.version = "0.0.6"
s.date = Time.now.strftime('%Y-%m-%d')
s.summary = "snakeeyes reports to general hawk. he's the coolest cijoe"
s.homepage = "http://github.com/schacon/snakeeyes"
@@ -17,7 +17,6 @@ Gem::Specification.new do |s|
s.executables = %w( snakeeyes )
s.add_runtime_dependency 'json'
- s.add_runtime_dependency 'popen4'
s.description = <<desc
snakeeyes is a polling, command line based cijoe replacement that will

0 comments on commit f1123c9

Please sign in to comment.