vimmy 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +1 -1
- data/lib/vimmy/cli.rb +9 -3
- data/lib/vimmy/version.rb +1 -1
- metadata +4 -4
data/Gemfile.lock
CHANGED
data/lib/vimmy/cli.rb
CHANGED
@@ -25,7 +25,7 @@ class Vimmy::CLI < Thor
|
|
25
25
|
desc "install TERM", "Install a vim plugin"
|
26
26
|
|
27
27
|
def install(term)
|
28
|
-
url =
|
28
|
+
url = install_choice(matching(term), "Choose a plugin to install")
|
29
29
|
end
|
30
30
|
|
31
31
|
desc "update", "Update all vim plugins"
|
@@ -51,7 +51,7 @@ private ######################################################################
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
-
def
|
54
|
+
def install_choice(plugins, prompt)
|
55
55
|
display plugins
|
56
56
|
print "#{prompt}: "
|
57
57
|
|
@@ -74,7 +74,13 @@ private ######################################################################
|
|
74
74
|
|
75
75
|
def install_plugin(url)
|
76
76
|
puts "Installing: #{url}"
|
77
|
-
|
77
|
+
if File.exist?(File.expand_path("~/.git"))
|
78
|
+
name = url.to_s.split("/").last
|
79
|
+
system %{ cd ~ && git submodule add -f #{url}.git .vim/bundle/#{name} &&
|
80
|
+
git commit -m "added #{name} vim plugin" }
|
81
|
+
else
|
82
|
+
system %{ cd ~/.vim/bundle && git clone #{url}.git }
|
83
|
+
end
|
78
84
|
end
|
79
85
|
|
80
86
|
def matching(term)
|
data/lib/vimmy/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vimmy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 2
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Dollar
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-12-04 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|