[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/inf-ruby b767d52caf 066/265: inf-ruby-console-gem: Pass -r
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/inf-ruby b767d52caf 066/265: inf-ruby-console-gem: Pass -r arguments in the bundle exec case, too |
Date: |
Sat, 9 Jul 2022 21:59:14 -0400 (EDT) |
branch: elpa/inf-ruby
commit b767d52cafa8b1883934dc1fb53b7862e52d2105
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
inf-ruby-console-gem: Pass -r arguments in the bundle exec case, too
dgutov/robe#8
---
inf-ruby.el | 37 +++++++++++++++++++------------------
1 file changed, 19 insertions(+), 18 deletions(-)
diff --git a/inf-ruby.el b/inf-ruby.el
index fbe3510905..e8590fb93d 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -499,24 +499,25 @@ and the directory to run it from."
The main module should be loaded automatically. If DIR contains a
Gemfile, it should use the `gemspec' instruction."
(interactive "D")
- (let ((default-directory dir))
- (if (file-exists-p "Gemfile")
- (run-ruby "bundle exec irb" "gem")
- (unless (file-exists-p "lib")
- (error "The directory must contain a 'lib' subdirectory"))
- (let (files)
- (dolist (item (directory-files "lib"))
- (unless (file-directory-p item)
- (setq files (cons item files))))
- (run-ruby (concat "irb -I lib"
- ;; If there are several files under 'lib'
- ;; (unlikely), load them all.
- (mapconcat
- (lambda (file)
- (concat " -r " (file-name-sans-extension file)))
- files
- ""))
- "gem")))))
+ (let* ((default-directory dir)
+ (base-command (if (file-exists-p "Gemfile")
+ "bundle exec irb"
+ "irb -I lib"))
+ files)
+ (unless (file-exists-p "lib")
+ (error "The directory must contain a 'lib' subdirectory"))
+ (dolist (item (directory-files "lib"))
+ (unless (file-directory-p item)
+ (setq files (cons item files))))
+ (run-ruby (concat base-command " "
+ ;; If there are several files under 'lib'
+ ;; (unlikely), load them all.
+ (mapconcat
+ (lambda (file)
+ (concat " -r " (file-name-sans-extension file)))
+ files
+ ""))
+ "gem")))
;;;###autoload
(defun inf-ruby-console-default (dir)
- [nongnu] elpa/inf-ruby 4873a66a4d 054/265: inf-ruby-completions: Use 'then' instead of semicolons, (continued)
- [nongnu] elpa/inf-ruby 4873a66a4d 054/265: inf-ruby-completions: Use 'then' instead of semicolons, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 7fc1e32ae7 050/265: Bump the version, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 530ac4f2fc 036/265: inf-ruby-mode: Modify the docstring, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 98fac55a80 049/265: Define inf-ruby-switch-from-compilation, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby fc1dffaeed 052/265: inf-ruby-prompt-format: Include debugger prompt, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby ebceb38165 058/265: inf-ruby-prompt-format: Fix not to match single operator chars, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby c749e54eee 063/265: Support Bond completion, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby b12e05a6bb 068/265: Add funtion switching to compilation mode., ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 8fe1c3d80a 061/265: Bump the version, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby a6daf44f67 067/265: Changed 'bundle exec irb' to 'bundle console', ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby b767d52caf 066/265: inf-ruby-console-gem: Pass -r arguments in the bundle exec case, too,
ELPA Syncer <=
- [nongnu] elpa/inf-ruby d18e63e44e 102/265: Not real need for the third argument, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 3a68ee2bb1 086/265: Touch up docstrings, change the signatures of inf-ruby-complete[-or-tab], ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 9f0cea55f0 073/265: Extend usage section, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 870e27f1ee 125/265: Detect pry gem in case to run bundle exec pry., ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 6c85470ce4 110/265: inf-ruby-implementations: use '--noreadline', ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 524a86c90b 089/265: Set PAGER locally unless it's set, fixes #33, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 2d65630b7d 100/265: Introduce `ruby-switch-to-last-ruby-buffer', ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 2cb21b9f58 090/265: Make PAGER override unconditional, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 23929579a6 124/265: Merge pull request #57 from bbatsov/compilation-warnings, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby e4cf0593da 116/265: inf-ruby-console-gem: require the main file if it exists, ELPA Syncer, 2022/07/09