Add :requires prop to def-bootstrap! & refactor+rewrite bootstrapping

This commit is contained in:
Henrik Lissner 2017-03-25 18:41:29 -04:00
parent 71dbf605ae
commit 72698ca9e8
9 changed files with 84 additions and 55 deletions

View file

@ -8,3 +8,15 @@
(when (featurep! :completion company)
(package! company-inf-ruby))
;;
(def-bootstrap! ruby
;; Since there are so many possible setups for a ruby environment (rbenv, rvm,
;; etc), I'll leave it to you and only take care of installing gem
;; dependencies.
(unless (executable-find "ruby")
(error "ruby isn't installed"))
(unless (executable-find "gem")
(error "gem isn't installed"))
(when-let (pkgs (cl-remove-if 'executable-find) '("ruby-lint")))
(sh "gem install %s" (s-join " " pkgs)))