vim-jar 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/README.md +21 -8
- data/features/step_definitions/command_steps.rb +5 -0
- data/features/update.feature +7 -0
- data/lib/vim-jar/cli.rb +9 -0
- data/lib/vim-jar/plugin.rb +6 -0
- data/lib/vim-jar/version.rb +1 -1
- data/spec/vim-jar/plugin_spec.rb +7 -0
- metadata +5 -3
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
Vim-Jar
|
2
2
|
=============
|
3
3
|
|
4
|
-
Provide a easy way to manage your plugin use vim plugin pathogen
|
4
|
+
Provide a easy way to manage your plugin use vim plugin pathogen.
|
5
|
+
|
6
|
+
Get more detail reading my blog post: [use git submodule keep your plugin up to date](http://www.allenwei.cn/tips-using-git-submodule-keep-your-plugin-up-to-date)
|
5
7
|
|
6
8
|
Installation
|
7
9
|
-----------
|
@@ -12,29 +14,40 @@ Installation
|
|
12
14
|
Usage
|
13
15
|
-----
|
14
16
|
|
15
|
-
Init your environment
|
17
|
+
### Init your environment
|
18
|
+
|
16
19
|
`vim-jar init`
|
17
20
|
|
18
21
|
It will check your whether your .vim path is git repo and install pathogen
|
19
22
|
|
20
|
-
Install partiqular plugin
|
23
|
+
### Install partiqular plugin
|
24
|
+
|
21
25
|
`vim-jar install PLUGIN_NAME`
|
22
26
|
|
23
|
-
|
27
|
+
### Update all plugins
|
28
|
+
|
29
|
+
`vim-jar update`
|
30
|
+
|
31
|
+
### List all installed plguins
|
32
|
+
|
24
33
|
`vim-jar list`
|
25
34
|
|
26
|
-
List all avaliable plugin
|
35
|
+
### List all avaliable plugin
|
36
|
+
|
27
37
|
`vim-jar list`
|
28
38
|
|
29
|
-
Import plugin to avaliable plugin list
|
39
|
+
### Import plugin to avaliable plugin list
|
40
|
+
|
30
41
|
`vim-jar import GITHUB_URL`
|
31
42
|
|
32
43
|
It will update your local plugin database, only support github repo now.
|
33
44
|
|
34
|
-
Uninstall plugin
|
45
|
+
### Uninstall plugin
|
46
|
+
|
35
47
|
`vim-jar uninstall PLUGIN_NAME`
|
36
48
|
|
37
|
-
|
49
|
+
### Get help
|
50
|
+
|
38
51
|
`vim-jar -h`
|
39
52
|
|
40
53
|
|
@@ -7,3 +7,8 @@ Then /^I should see "([^"]*)" in installed list$/ do |plugin_name|
|
|
7
7
|
Then %Q{the stdout should contain "#{plugin_name}"}
|
8
8
|
end
|
9
9
|
|
10
|
+
|
11
|
+
Then /^I should see update success message$/ do |plugin_name|
|
12
|
+
Then %Q{the stdout should contain "All your plugin is up to date."}
|
13
|
+
end
|
14
|
+
|
data/lib/vim-jar/cli.rb
CHANGED
@@ -47,8 +47,17 @@ module Vim
|
|
47
47
|
STDOUT.puts ::Vim::Jar::Plugin.installed.join("\n")
|
48
48
|
end
|
49
49
|
|
50
|
+
desc "update", "Update all installed plugin"
|
51
|
+
def update
|
52
|
+
check!
|
53
|
+
if ::Vim::Jar::Plugin.update
|
54
|
+
STDOUT.puts "All your plugin is up to date."
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
50
58
|
desc "uninstall", "uninstall installed plugin"
|
51
59
|
def uninstall(name)
|
60
|
+
check!
|
52
61
|
if ::Vim::Jar::Plugin.installed.include?(name)
|
53
62
|
::Vim::Jar::Plugin.uninstall(name)
|
54
63
|
STDOUT.puts "plugin #{name} has been already remove from #{config.bundle_home.join(name)}"
|
data/lib/vim-jar/plugin.rb
CHANGED
data/lib/vim-jar/version.rb
CHANGED
data/spec/vim-jar/plugin_spec.rb
CHANGED
@@ -11,6 +11,13 @@ describe Vim::Jar::Plugin do
|
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
|
+
context ".update" do
|
15
|
+
it "should run command 'git submodule update'" do
|
16
|
+
mock(Vim::Jar::Plugin).system("git submodule update")
|
17
|
+
Vim::Jar::Plugin.update
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
14
21
|
context ".exist" do
|
15
22
|
it "should be true if has plugin in @plugins" do
|
16
23
|
Vim::Jar::Plugin.plugins << {"name" => "test" }
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vim-jar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- allen wei
|
@@ -2161,6 +2161,7 @@ files:
|
|
2161
2161
|
- features/support/hook.rb
|
2162
2162
|
- features/support/stubs.rb
|
2163
2163
|
- features/uninstall.feature
|
2164
|
+
- features/update.feature
|
2164
2165
|
- lib/vim-jar.rb
|
2165
2166
|
- lib/vim-jar/cli.rb
|
2166
2167
|
- lib/vim-jar/config.rb
|
@@ -2234,6 +2235,7 @@ test_files:
|
|
2234
2235
|
- features/support/hook.rb
|
2235
2236
|
- features/support/stubs.rb
|
2236
2237
|
- features/uninstall.feature
|
2238
|
+
- features/update.feature
|
2237
2239
|
- spec/spec_helper.rb
|
2238
2240
|
- spec/vim-jar/config_spec.rb
|
2239
2241
|
- spec/vim-jar/git-config
|