FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Merge remote-tracking branch 'upstream/master' · vim-ruby/vim-ruby@b90c8e2 · GitHub

Commit b90c8e2

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 43f6981 + bf3a599 commit b90c8e2

17 files changed

Lines changed: 138 additions & 51 deletions

‎Gemfile.lock‎

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
GEM
22
remote: http://rubygems.org/
33
specs:
4-
diff-lcs (1.3)
5-
rspec (3.5.0)
6-
rspec-core (~> 3.5.0)
7-
rspec-expectations (~> 3.5.0)
8-
rspec-mocks (~> 3.5.0)
9-
rspec-core (3.5.4)
10-
rspec-support (~> 3.5.0)
11-
rspec-expectations (3.5.0)
4+
diff-lcs (1.5.1)
5+
rspec (3.13.0)
6+
rspec-core (~> 3.13.0)
7+
rspec-expectations (~> 3.13.0)
8+
rspec-mocks (~> 3.13.0)
9+
rspec-core (3.13.2)
10+
rspec-support (~> 3.13.0)
11+
rspec-expectations (3.13.3)
1212
diff-lcs (>= 1.2.0, < 2.0)
13-
rspec-support (~> 3.5.0)
14-
rspec-mocks (3.5.0)
13+
rspec-support (~> 3.13.0)
14+
rspec-mocks (3.13.2)
1515
diff-lcs (>= 1.2.0, < 2.0)
16-
rspec-support (~> 3.5.0)
17-
rspec-support (3.5.0)
18-
vimrunner (0.3.0)
16+
rspec-support (~> 3.13.0)
17+
rspec-support (3.13.2)
18+
vimrunner (0.3.5)
1919

2020
PLATFORMS
2121
ruby
22+
x86_64-linux
2223

2324
DEPENDENCIES
2425
rspec
2526
vimrunner
2627

2728
BUNDLED WITH
28-
1.13.7
29+
2.5.17

‎INSTALL.markdown‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ With pathogen.vim
99
Install [pathogen.vim](https://github.com/tpope/vim-pathogen),
1010
then copy and paste:
1111

12-
git clone git://github.com/vim-ruby/vim-ruby.git ~/.vim/bundle/vim-ruby
12+
git clone https://github.com/vim-ruby/vim-ruby.git ~/.vim/bundle/vim-ruby
1313

1414
With Vundle
1515
-----------

‎autoload/rubycomplete.vim‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
" Language: Ruby
33
" Maintainer: Mark Guzman <segfault@hasno.info>
44
" URL: https://github.com/vim-ruby/vim-ruby
5-
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
65
" ----------------------------------------------------------------------------
76
"
87
" Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com)
@@ -489,7 +488,7 @@ class VimRubyCompletion
489488
trail = "%s%s" % [ dir, sub ]
490489
tcfg = "%sconfig" % trail
491490

492-
if File.exists?( tcfg )
491+
if File.exist?( tcfg )
493492
rails_base = trail
494493
break
495494
end
@@ -502,7 +501,7 @@ class VimRubyCompletion
502501

503502
bootfile = rails_base + "config/boot.rb"
504503
envfile = rails_base + "config/environment.rb"
505-
if File.exists?( bootfile ) && File.exists?( envfile )
504+
if File.exist?( bootfile ) && File.exist?( envfile )
506505
begin
507506
require bootfile
508507
require envfile

‎compiler/eruby.vim‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
" Language: eRuby
33
" Maintainer: Doug Kearns <dougkearns@gmail.com>
44
" URL: https://github.com/vim-ruby/vim-ruby
5-
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
65

76
if exists("current_compiler")
87
finish

‎compiler/rake.vim‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
" Language: Rake
33
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
44
" URL: https://github.com/vim-ruby/vim-ruby
5-
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
65

76
if exists("current_compiler")
87
finish

‎compiler/rspec.vim‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
" Language: RSpec
33
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
44
" URL: https://github.com/vim-ruby/vim-ruby
5-
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
65

76
if exists("current_compiler")
87
finish

‎compiler/ruby.vim‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
" Function: Syntax check and/or error reporting
44
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
55
" URL: https://github.com/vim-ruby/vim-ruby
6-
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
76

87
if exists("current_compiler")
98
finish

‎compiler/rubyunit.vim‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
" Language: Test::Unit - Ruby Unit Testing Framework
33
" Maintainer: Doug Kearns <dougkearns@gmail.com>
44
" URL: https://github.com/vim-ruby/vim-ruby
5-
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
65

76
if exists("current_compiler")
87
finish

‎ftplugin/eruby.vim‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
" Language: eRuby
33
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
44
" URL: https://github.com/vim-ruby/vim-ruby
5-
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
65

76
" Only do this when not done yet for this buffer
87
if exists("b:did_ftplugin")
@@ -85,8 +84,12 @@ runtime! ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim
8584
let b:did_ftplugin = 1
8685

8786
" Combine the new set of values with those previously included.
88-
if exists("b:undo_ftplugin")
89-
let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin
87+
if !exists('b:undo_ftplugin')
88+
" No-op
89+
let b:undo_ftplugin = 'exe'
90+
endif
91+
if !empty(s:undo_ftplugin)
92+
let b:undo_ftplugin .= '|' . s:undo_ftplugin
9093
endif
9194
if exists ("b:browsefilter")
9295
let s:browsefilter = substitute(b:browsefilter,'\cAll Files (\*\.\*)\t\*\.\*\n','','') . s:browsefilter
@@ -118,7 +121,7 @@ endif
118121
setlocal commentstring=<%#%s%>
119122

120123
let b:undo_ftplugin = "setl cms< " .
121-
\ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
124+
\ " | unlet! b:browsefilter b:match_words | " . b:undo_ftplugin
122125

123126
let &cpo = s:save_cpo
124127
unlet s:save_cpo

‎ftplugin/ruby.vim‎

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
" Language: Ruby
33
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
44
" URL: https://github.com/vim-ruby/vim-ruby
5-
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
65

76
if (exists("b:did_ftplugin"))
87
finish
@@ -52,31 +51,45 @@ endif
5251
" TODO:
5352
"setlocal define=^\\s*def
5453

55-
setlocal comments=:#
54+
setlocal comments=b:#
5655
setlocal commentstring=#\ %s
5756

5857
if !exists('g:ruby_version_paths')
5958
let g:ruby_version_paths = {}
6059
endif
6160

61+
let s:path_split = has('win32') ? ';' : ':'
62+
6263
function! s:query_path(root) abort
63-
let code = "print $:.join %q{,}"
64-
if &shell =~# 'sh' && empty(&shellxquote)
65-
let prefix = 'env PATH='.shellescape($PATH).' '
66-
else
67-
let prefix = ''
64+
" Disabled by default for security reasons.
65+
if !get(g:, 'ruby_exec', get(g:, 'plugin_exec', 0)) || empty(a:root)
66+
return map(split($RUBYLIB, s:path_split), 'v:val ==# "." ? "" : v:val')
6867
endif
68+
let code = "print $:.join %q{,}"
6969
if &shellxquote == "'"
70-
let path_check = prefix.'ruby --disable-gems -e "' . code . '"'
70+
let args = ' --disable-gems -e "' . code . '"'
7171
else
72-
let path_check = prefix."ruby --disable-gems -e '" . code . "'"
72+
let args = " --disable-gems -e '" . code . "'"
7373
endif
7474

75-
let cd = haslocaldir() ? 'lcd' : 'cd'
75+
let cd = haslocaldir() ? 'lcd' : exists(':tcd') && haslocaldir(-1) ? 'tcd' : 'cd'
7676
let cwd = fnameescape(getcwd())
7777
try
7878
exe cd fnameescape(a:root)
79-
let path = split(system(path_check),',')
79+
for dir in split($PATH, s:path_split)
80+
if dir !=# '.' && executable(dir . '/ruby') == 1
81+
let exepath = dir . '/ruby'
82+
break
83+
endif
84+
endfor
85+
if exists('l:exepath')
86+
let path = split(system(exepath . args),',')
87+
if v:shell_error
88+
let path = []
89+
endif
90+
else
91+
let path = []
92+
endif
8093
exe cd cwd
8194
return path
8295
finally
@@ -117,10 +130,8 @@ else
117130
if !exists('g:ruby_default_path')
118131
if has("ruby") && has("win32")
119132
ruby ::VIM::command( 'let g:ruby_default_path = split("%s",",")' % $:.join(%q{,}) )
120-
elseif executable('ruby') && !empty($HOME)
121-
let g:ruby_default_path = s:query_path($HOME)
122133
else
123-
let g:ruby_default_path = map(split($RUBYLIB,':'), 'v:val ==# "." ? "" : v:val')
134+
let g:ruby_default_path = s:query_path($HOME)
124135
endif
125136
endif
126137
let s:ruby_paths = g:ruby_default_path

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL