mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
removed helper to execute ruby code, as ruby-compilation supplies functions for this
This commit is contained in:
19
helpers.el
19
helpers.el
@@ -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
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user