Skip to content

Instantly share code, notes, and snippets.

View lukeledet's full-sized avatar

Luke Ledet lukeledet

  • Revelry Labs
  • New Orleans, LA
View GitHub Profile
@lukeledet
lukeledet / config.ru
Created May 17, 2012 16:16 — forked from betawaffle/config.ru
Rack-based Local YARD Server
require 'rubygems'
require 'yard'
libs = Hash.new {|hash,key| hash[key] = [] }
base = ENV['GEM_PATH'].split(':')[1][%r{^.+(?=/.+@global$)}] rescue nil
if base
Gem.paths = {
'GEM_PATH' => Dir["#{base}/ruby-*"].join(':'),
'GEM_HOME' => ENV['GEM_HOME']
namespace :spork do
desc "start spork in the background"
task :start do
sh %{spork &}
sh %{spork cucumber &}
end
desc "stop spork"
task :stop do
`ps -ef | grep bin/spork | grep -v grep | awk '{ print $2 }'`.split.each do |pid|