zdi/zdi.el

25 lines
667 B
EmacsLisp

;;; Jira --- A simple wrapper around ZDI
;;; Commentary:
;;; Emacs integration for ZDI.
;;; Code:
(provide 'zdi)
(require 'projectile)
(defun projectile-get-relative-path-buffer ()
"Get the project-relative path of the current buffer."
(file-relative-name buffer-file-name (projectile-project-root)))
(defvar zdi-build-command-format "docker exec -it help_center bundle exec rspec --no-color %s")
(defun zdi-set-compile-command ()
"Set the command used to compile your project to run rspec through zdi."
(set (make-local-variable 'compile-command)
(format zdi-build-command-format (projectile-get-relative-path-buffer))))
;;; zdi.el ends here