Take the 2008 Git User's Survey and help out! [ hide ]

public
Description: RSpactor is a Mac OS X application that takes care of your RSpec examples.
Homepage: http://rubyphunk.com/projects/rspactor
Clone URL: git://github.com/rubyphunk/rspactor.git
Search Repo:
Click here to lend your support to: rspactor and make a donation at www.pledgie.com !
rspactor / rspactor_bin.rb
100755 24 lines (22 sloc) 0.487 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env ruby
require 'timeout'
require 'drb'
 
# Load application
if ARGV[0] == '--dev'
  system("open /Users/andreas/ruby/rspactor/build/Release/RSpactor.app")
else
  system('open -b com.dynamicdudes.RSpactor')
end
 
# Ping and Pong
Timeout::timeout(10) do
  @service = DRbObject.new(nil, "druby://127.0.0.1:28127")
  while true
    begin
      if @service.ping
        @service.incoming(:relocate_and_run, Dir.pwd)
        exit
      end
    rescue; end
    sleep 1
  end
end