Permalink
Please sign in to comment.
Browse files
Merge branch 'master' of http://github.com/thieso2/snailgun into thie…
…so2-master
- Loading branch information...
Showing
with
61 additions
and 4 deletions.
- +26 −0 README-textmate
- +1 −1 bin/fruby
- +7 −1 lib/snailgun/server.rb
- +2 −2 snailgun.gemspec
- +25 −0 textmate.patch
@@ -0,0 +1,26 @@ | ||
+To get ultra fast CMD-R results in textmate you need to patch the run_script.rb that comes with textmate: | ||
+ | ||
+cd /Applications/TextMate.app/Contents/SharedSupport/Bundles/Ruby.tmbundle/Support/RubyMate/ | ||
+ | ||
+patch -p0 < wherever_snailgun_was_installed/textmate.patch | ||
+ | ||
+To run test in never before seen speed simply cd into your rails-app (tested with rails 3) and say: | ||
+ | ||
+> snailgun | ||
+ | ||
+the output should read something like: | ||
+Now entering subshell for RAILS_ENV=test. Use 'exit' to terminate snailgun | ||
+Server starting for RAILS_ENV=test | ||
+.. some seconds later ... | ||
+Server ready for RAILS_ENV=test | ||
+ | ||
+Now you can either use fruby instead of ruby to start tests "by hand": | ||
+ | ||
+fruby -Itest test/unit/your_test.rb | ||
+ | ||
+or - in TextMate - simply navigate to your_test.rb and hit CMD-R | ||
+ | ||
+enjoy! | ||
+ | ||
+thieso@gmail.com 20101024 at #rchh | ||
+ |
@@ -0,0 +1,25 @@ | ||
+--- /Applications/TextMate.app/Contents/SharedSupport/Bundles/Ruby.tmbundle/Support/RubyMate/run_script.rb 2010-10-24 15:18:39.000000000 +0200 | ||
++++ /tmp/run_script.rb 2010-10-24 15:18:37.000000000 +0200 | ||
+@@ -90,22 +90,6 @@ | ||
+ 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 |
0 comments on commit
f4da0b0