removed helper to execute ruby code, as ruby-compilation supplies functions for this

This commit is contained in:
2011-11-29 23:16:07 +00:00
parent a13d398e1e
commit 119bf654d6

View File

@@ -1,22 +1,3 @@
;;
;; Execute Ruby Code
;;
(defun is-rails-project ()
(when (textmate-project-root)
(file-exists-p (expand-file-name "config/environment.rb" (textmate-project-root)))))
(defun run-rails-test-or-ruby-buffer ()
(interactive)
(if (is-rails-project)
(let* ((path (buffer-file-name))
(filename (file-name-nondirectory path))
(test-path (expand-file-name "test" (textmate-project-root)))
(command (list ruby-compilation-executable "-I" test-path path)))
(pop-to-buffer (ruby-compilation-do filename command)))
(ruby-compilation-this-buffer)))
;;
;; Auto-indent on Paste
;;