Commit Graph

14 Commits

Author SHA1 Message Date
Marco Hinz
d581398779 ruby: detect rbenv shims for other versions (#8733)
When rbenv is used for managing Ruby installations, just checking for an
executable called "neovim-ruby-host" is not enough. It has to be run as well.

If it does not return 0, then neovim-ruby-host is merely a shim for another Ruby
installation.

  $ rbenv versions
    2.5.0
  * 2.5.1 (set by /Users/mhi/.rbenv/version)

  $ rbenv whence neovim-ruby-host
  2.5.0

  $ which neovim-ruby-host
  /Users/mhi/.rbenv/shims/neovim-ruby-host

  $ neovim-ruby-host
  rbenv: neovim-ruby-host: command not found

  The `neovim-ruby-host' command exists in these Ruby versions:
    2.5.0

  $ echo $?
  127

Additionally, the detection logic was moved from provider#ruby#Detect() to
s:detect(), because the former is run in the sandbox which forbids calling
system().
2018-08-09 00:47:35 +02:00
James McCoy
3af3515e74 Add provider#Poll() to handle starting and polling the provider 2018-02-16 14:08:12 -05:00
James McCoy
48dc1f3f90 provider: ruby: Use stderr_buffered to collect stderr 2018-02-16 13:33:07 -05:00
Justin M. Keyes
103ff26c0a provider/nodejs: check version in Detect() 2017-12-17 16:09:18 +01:00
Jan Edmund Lazo
2d732a11b1 provider: fix batchfile extension for ruby gem (#7651)
ruby uses batchfiles with 'cmd' extension.
gem creates batchfiles with 'bat' extension.
`gem install rails` does the following in Windows (not Cygwin):

1. Run `gem.cmd install rails` on cmd.exe
2. gem.cmd runs `ruby.exe -x gem install rails`
3. `rails` gem is installed.
   `rails.bat` is created in the same directory
   where ruby.exe and gem.cmd reside.
2017-11-29 03:19:33 +01:00
Jan Edmund Lazo
e8af34dc63 win: provider: Detect(): return *.cmd path (#7577)
neovim-ruby-host is a ruby script.
neovim-node-host is a shell script.
Both don't work in cmd.exe so gem and npm provide batchfile shims.

Return the full path of these shims, cmd.exe knows better what to do with these files.
2017-11-17 23:52:51 +01:00
Justin M. Keyes
d214df4e9b doc: replace ":CheckHealth" with ":checkhealth" 2017-10-17 01:51:21 +02:00
Alex Genco
f400c6f05f runtime: Allow overriding ruby host with g:ruby_host_prog
This allows users who have per-project Ruby versions (e.g. with `rvm`)
to pin to a particular gem installation.

For example: `let g:ruby_host_prog = 'rvm system do neovim-ruby-host'`
2017-06-17 08:20:00 -07:00
Justin M. Keyes
2f38ed11c9 providers: Disable if g:loaded_* exists.
The exists('g:loaded_foo') convention is rather common, and may be
relied upon in some cases. It's also very unlikely that a user or plugin
has any reason to set g:loaded_foo to zero, so the principle of least
surprise can be brushed aside here.

https://github.com/neovim/neovim/issues/6107#issuecomment-279532143
2017-02-14 00:02:50 +01:00
Justin M. Keyes
9451647d9b health.vim: Do not check intentionally disabled providers.
Closes #6107
2017-02-13 22:21:23 +01:00
Björn Linse
2d60a15e25 job control: reuse common job code for rpc jobs
This makes stderr and exit callbacks work for rpc jobs
2016-08-20 12:55:35 +02:00
Justin M. Keyes
c7d84c5550 Merge #4980 'Support legacy :ruby commands'. 2016-07-10 14:16:12 -04:00
Alex Genco
0a3c0205c5 Add :ruby, :rubyfile, and :rubydo ex commands 2016-07-02 21:45:48 -07:00
Alex Genco
3cb9970acf Ruby remote plugin support 2016-03-10 19:01:44 -08:00