vimmy 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vimmy (0.1.0)
4
+ vimmy (0.2.0)
5
5
  mechanize (~> 1.0.0)
6
6
  thor (~> 0.14.6)
7
7
 
@@ -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 = choose(matching(term), "Choose a plugin to install")
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 choose(plugins, prompt)
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
- system %{ cd ~/.vim/bundle && git clone #{url}.git }
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)
@@ -1,3 +1,3 @@
1
1
  module Vimmy
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
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: 27
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 1
8
+ - 2
9
9
  - 0
10
- version: 0.1.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-11-24 00:00:00 -05:00
18
+ date: 2010-12-04 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency