Created
November 24, 2009 22:01
-
-
Save dotemacs/242275 to your computer and use it in GitHub Desktop.
Enable rails_best_practices in emacs rinari mode
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
;; install rinari http://github.com/eschulte/rinari | |
;; install http://github.com/flyerhzm/rails_best_practices | |
;; run this in your emacs | |
(defun my-rinari-mode() | |
(defun rails-best-practices (rails-app-dir) | |
"Run rails_best_practices checker and provide results which you can easily navigate" | |
(interactive "DRails app base dir: ") | |
(let ((exe (executable-find "rails_best_practices"))) | |
(if exe | |
(ruby-compilation-run (concat exe " " (expand-file-name rails-app-dir))) | |
(message "rails_best_practices executable not found!"))))) | |
(add-hook 'rinari-minor-mode-hook 'my-rinari-mode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment