rinari
rinari copied to clipboard
Zeus support
It would be nice if rinari could support zeus for running scripts and console. Actually it should be easy. You just check if the .zeus.sock file exists in the rails directory. I commited something like this to rails-mode. If you want I can write something similar to rinari.
Interesting. It looks like:
-
zeus
discourages thebundle exec zeus
style - zeus commands need to be specified in
zeus.json
- zeus needs to be started before running the commands
I'm concerned that it would be harder than you expect to integrate zeus with rinari in a robust way, but I'm happy to consider a patch, so by all means have a look through rinari.el
and ruby-compilation
and see what you can come up with! :-)
I was thinking of something basic:
- User have setup Zeus (that is ran
zeus init
in the project root) - User starts Zeus in the console with
zeus start
, by now file.zues.sock
is created in the root project - emacs checks if file
.zeus.sock
exists, if yes it runszeus server
instead ofrails server
,zeus console
instead ofrails console
and so on
Hey, so I took a look through the code, and it's easy to intercept where "server", "console" and "generate" are run from rinari.el
. However, "rake" goes through ruby-compilation.el
, and in fact all of the commands eventually call ruby-compilation-do
, so that's where the hacking would have to start.
It's a bit fiddly, though, and I'm out of time right now, but I'll come back to this because now I'm also interested in getting it working. :-)
I should also note (partly for my own benefit) that there is likely to be some confusing behaviour, since rinari allows the user to run, say, "rails console production", but "zeus console" ignores any additional arguments and just runs the command in the development environment.
I would love to assist with Zeus support.