Skip to content

Instantly share code, notes, and snippets.

@dotemacs
Created November 24, 2009 22:01
Show Gist options
  • Save dotemacs/242275 to your computer and use it in GitHub Desktop.
Save dotemacs/242275 to your computer and use it in GitHub Desktop.
Enable rails_best_practices in emacs rinari mode
;; 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