vim-jar 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -2,3 +2,4 @@ pkg/*
2
2
  *.gem
3
3
  .bundle
4
4
  *.sw*
5
+ FILES.txt
data/bin/vim-jar CHANGED
@@ -11,9 +11,13 @@ opt = OptionParser.new do |opts|
11
11
  opts.separator " init -- init environment"
12
12
  opts.separator " install NAME -- install plugin"
13
13
  opts.separator " list -- list all avaliable plugins"
14
+ opts.separator " installed -- list all installed plugins"
14
15
  opts.separator " import -- import plugin info from github.com"
15
- opts.separator " vim-jar import https://github.com/vim-scripts/ZenCoding.vim"
16
- opts.separator ""
16
+ opts.separator " e.g: vim-jar import https://github.com/vim-scripts/ZenCoding.vim"
17
+ opts.on("-h", "--help") do
18
+ STDOUT.puts opt
19
+ exit 0
20
+ end
17
21
  end
18
22
 
19
23
  opt.parse!
@@ -53,6 +57,8 @@ when "import"
53
57
  print_error "github repository url"
54
58
  exit 1
55
59
  end
60
+ when "installed"
61
+ ::Vim::Jar::Cli.installed
56
62
  else
57
63
  print_error "missing command"
58
64
  puts opt
data/lib/vim-jar/cli.rb CHANGED
@@ -38,8 +38,11 @@ module Vim
38
38
  end
39
39
  end
40
40
 
41
- private
41
+ def installed
42
+ STDOUT.puts ::Vim::Jar::Plugin.installed.join("\n")
43
+ end
42
44
 
45
+ private
43
46
  def config
44
47
  @config ||= Vim::Jar.config
45
48
  end
@@ -39,6 +39,10 @@ module Vim
39
39
  end
40
40
  end
41
41
 
42
+ def installed
43
+ @installed ||= Dir[config.bundle_home.join("*")].map { |bundle_path| File.basename(bundle_path)}
44
+ end
45
+
42
46
  def self.reset
43
47
  self.instance_variable_set("@plugins", nil)
44
48
  self.plugins
@@ -1,5 +1,5 @@
1
1
  module Vim
2
2
  module Jar
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
data/vim-jar.gemspec CHANGED
@@ -17,12 +17,10 @@ Gem::Specification.new do |s|
17
17
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
18
  s.require_paths = ["lib"]
19
19
 
20
- s.add_dependency('curb')
21
-
20
+ s.add_runtime_dependency('curb')
22
21
  s.add_development_dependency('rspec')
23
22
  s.add_development_dependency('rr')
24
23
  s.add_development_dependency('fuubar')
25
- #s.add_development_dependency('fakefs')
26
24
  s.add_development_dependency('ruby-debug')
27
25
 
28
26
  end
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: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - allen wei