[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/inf-ruby 92d5d122fa 245/265: Use 'bundle exec' in nomultil
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/inf-ruby 92d5d122fa 245/265: Use 'bundle exec' in nomultiline check when needed |
Date: |
Sat, 9 Jul 2022 21:59:30 -0400 (EDT) |
branch: elpa/inf-ruby
commit 92d5d122fa172bc49b5ec9ee1891aa9c84805c92
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Use 'bundle exec' in nomultiline check when needed
---
inf-ruby.el | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/inf-ruby.el b/inf-ruby.el
index d00a80966d..4e578a08be 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -109,8 +109,11 @@ returns a string."
(setq command (concat command " --noreadline")))
command))
-(defun inf-ruby--irb-needs-nomultiline-p ()
- (let* ((output (shell-command-to-string "irb -v"))
+(defun inf-ruby--irb-needs-nomultiline-p (&optional with-bundler)
+ (let* ((output (shell-command-to-string
+ (concat
+ (when with-bundler "bundle exec ")
+ "irb -v")))
(fields (split-string output "[ (]")))
(if (equal (car fields) "irb")
(version<= "1.2.0" (nth 1 fields))
@@ -960,8 +963,9 @@ Gemfile, it should use the `gemspec' instruction."
(interactive (list (inf-ruby-console-read-directory 'gem)))
(let* ((default-directory (file-name-as-directory dir))
(gemspec (car (file-expand-wildcards "*.gemspec")))
+ (with-bundler (file-exists-p "Gemfile"))
(base-command
- (if (file-exists-p "Gemfile")
+ (if with-bundler
(if (inf-ruby-file-contents-match gemspec "\\$LOAD_PATH")
"bundle exec irb"
"bundle exec irb -I lib")
@@ -987,7 +991,7 @@ Gemfile, it should use the `gemspec' instruction."
(concat " -r " (file-name-sans-extension file)))
files
""))))
- (when (inf-ruby--irb-needs-nomultiline-p)
+ (when (inf-ruby--irb-needs-nomultiline-p with-bundler)
(setq base-command (concat base-command " --nomultiline")))
(inf-ruby-console-run
(concat base-command args
- [nongnu] elpa/inf-ruby 310da805b6 129/265: Bump the version, (continued)
- [nongnu] elpa/inf-ruby 310da805b6 129/265: Bump the version, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 67629312ad 120/265: Work around pry/pry#1267, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 866483eecc 190/265: Fix a comment, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby c45cd825e0 195/265: inf-ruby-mode: Use define-derived-mode, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby bf380c13e5 198/265: Support JRuby 9000 RVM prompt, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby a4b1c40202 204/265: inf-ruby-console-script: Extract from ...-default, and up its priority, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 674a2a837f 209/265: Drop a newline and link to the wiki page directly, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 1a5aebea0d 213/265: Bring back interactive run-ruby, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby fe1ea9925c 226/265: Restore original compilation-error-regexp-alist, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 9bfbce42be 241/265: Untabify and reformat the new code a little, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 92d5d122fa 245/265: Use 'bundle exec' in nomultiline check when needed,
ELPA Syncer <=
- [nongnu] elpa/inf-ruby bcdb97983c 257/265: Merge pull request #154 from tunnes/feature-create-load-current-ruby-file, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 5143c84f91 189/265: inf-ruby-proc: Fall back to inf-ruby-buffer, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 5b24985b0e 135/265: Check IRB is defined before using it, fixes #64, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby f908b1f506 136/265: Merge pull request #65 from iqbalansari/master, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 0af69257a4 138/265: Clarify the "usage" section, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 12d1d35f73 153/265: Add ruby-send-buffer function, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby d39ea0bd59 212/265: Use a more common idea of prefix, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 227a80fc52 176/265: Correct regexp, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby ca10d72e0c 220/265: Merge pull request #118 from marsam/master, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby e4ae089218 228/265: inf-ruby-console-gem: Support new IRB, ELPA Syncer, 2022/07/09