Sha256: fe055eda53b7fb24519983e71c0e02ca6234201eef211b74072209bd8caf6fcd

Contents?: true

Size: 952 Bytes

Versions: 1

Compression:

Stored size: 952 Bytes

Contents

#!/usr/bin/env ruby
gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9

require 'rubygems'
require 'spork'
require 'optparse'

ENV["DRB"] = 'true'
ENV["RAILS_ENV"] ||= 'test' if Spork.using_rails?

options = {}
parser = OptionParser.new
parser.on("-d", "--daemon")     {|ignore| options[:daemon] = true }
parser.on("-b", "--bootstrap")  {|ignore| options[:bootstrap] = true }
parser.on("-p", "--pid PIDFILE"){|pid|    options[:pid]    = pid  }
parser.parse!(ARGV)

unless File.exist?(Spork::SPEC_HELPER_FILE)
  puts <<-USEFUL_ERROR
Bummer!

I can't find the file spec/spec_helper.rb, which I need in order to run.

Are you running me from a project directory that has rspec set up?
USEFUL_ERROR
  exit 1
end

if options[:bootstrap]
  if Spork.bootstrap
    exit 0
  else
    exit 1
  end
end

require 'spork/spec_server'
Spork.preload || exit(1)

if options[:daemon]
  ::Spork::SpecServer.daemonize(options[:pid])
else
  ::Spork::SpecServer.run
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
timcharper-spork-0.3 bin/spork