Created
June 5, 2009 07:11
-
-
Save NigelThorne/124120 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#\ -w -p 8765 | |
use Rack::Reloader, 0 | |
use Rack::ContentLength | |
use Rack::ShowExceptions | |
map "/cuce" do |path| | |
run Proc.new{ | |
command = "cucumber.bat features/nav.feature -f html" | |
out = `#{command} 2>&1` | |
[ 200, {'Content-Type' => out=~/\<html/ ? 'text/html' : 'text/plain'}, out ] | |
} | |
end | |
map "/spec" do | |
map "/html" do | |
@formatting = '-f h' | |
run Proc.new{ | |
command = "spec.bat spec #{@formatting}" | |
out = `#{command} 2>&1` | |
[ 200, {'Content-Type' => out=~/\<html/ ? 'text/html' : 'text/plain'}, out ] | |
} | |
end | |
map "/textmate" do | |
@formatting = '--require "C:\\Documents and Settings\\nwt\\Application Data\\e\\InstalledBundles\\Ruby RSpec.tmbundle\\Support\\lib\\text_mate_formatter" -f Spec::Runner::Formatter::TextMateFormatter' | |
run Proc.new{ | |
command = "spec.bat spec #{@formatting}" | |
out = `#{command} 2>&1` | |
[ 200, {'Content-Type' => out=~/\<html/ ? 'text/html' : 'text/plain'}, out ] | |
} | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment