Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (24 sloc) 721 Bytes
--- run_script.rb.orig 2010-10-25 09:23:45.000000000 +0200
+++ run_script.rb 2010-10-25 09:24:06.000000000 +0200
@@ -90,6 +90,22 @@
return path, '', path
end
+def snailgun_socket
+ Pathname.new(Dir.pwd).ascend do |path|
+ if File.exists?(path.join("config", "boot.rb"))
+ if File.exists?(path.join("tmp", "sockets", "snailgun", "test"))
+ return path.join("tmp", "sockets", "snailgun", "test").to_s
+ end
+ end
+ end
+ nil
+end
+
+if socket = snailgun_socket
+ ENV['SNAILGUN_SOCK'] = socket
+ cmd[0] = 'fruby'
+end
+
TextMate::Executor.run( cmd, :version_args => ["--version"],
:script_args => args ) do |line, type|
if is_test_script and type == :out