emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/inf-ruby 8b198d01e9 180/265: Merge pull request #93 from s


From: ELPA Syncer
Subject: [nongnu] elpa/inf-ruby 8b198d01e9 180/265: Merge pull request #93 from sideshowcoder/zeus-console-support
Date: Sat, 9 Jul 2022 21:59:24 -0400 (EDT)

branch: elpa/inf-ruby
commit 8b198d01e90ca4e769743ab5bf5b5176881a0055
Merge: df014b0717 4f6a265640
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: GitHub <noreply@github.com>

    Merge pull request #93 from sideshowcoder/zeus-console-support
    
    Add support for zeus console
---
 inf-ruby.el | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/inf-ruby.el b/inf-ruby.el
index 340c96d6d2..39399290ec 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -630,7 +630,8 @@ keymaps to bind `inf-ruby-switch-from-compilation' to `ะก-x 
C-q'."
        'inf-ruby-switch-from-compilation)))
 
 (defvar inf-ruby-console-patterns-alist
-  '((inf-ruby-console-rails-p . rails)
+  '((".zeus.sock" . zeus)
+    (inf-ruby-console-rails-p . rails)
     ("*.gemspec" . gem)
     (inf-ruby-console-racksh-p . racksh)
     ("Gemfile" . default))
@@ -657,7 +658,7 @@ This checks if the current line is a pry or ruby-debug 
prompt.")
 ;;;###autoload
 (defun inf-ruby-console-auto ()
   "Run the appropriate Ruby console command.
-The command and and the directory to run it from are detected
+The command and the directory to run it from are detected
 automatically."
   (interactive)
   (let* ((dir (locate-dominating-file default-directory
@@ -674,6 +675,13 @@ automatically."
        (inf-ruby-file-contents-match "config/application.rb"
                                      "\\_<Rails::Application\\_>")))
 
+;;;###autoload
+(defun inf-ruby-console-zeus (dir)
+  (interactive "D")
+  (let ((default-directory (file-name-as-directory dir))
+        (exec-prefix (if (executable-find "zeus") "" "bundle exec ")))
+    (run-ruby (concat exec-prefix "zeus console") "zeus")))
+
 ;;;###autoload
 (defun inf-ruby-console-rails (dir)
   "Run Rails console in DIR."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]