vim-bundler 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -37,6 +37,10 @@ It can be done as following:
37
37
  value of +vim_script_id+ can be found in download link. You also need to point location if
38
38
  the script originally requires another location than +plugin+
39
39
 
40
+ Also you can link local folders as bundles
41
+
42
+ bundle 'snipmate', :local => '~/projects/snipmate'
43
+
40
44
  == Updating bundles
41
45
 
42
46
  It is quite easy
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.2.0
@@ -0,0 +1,58 @@
1
+ require 'active_support/concern'
2
+ module VimBundler
3
+ module Local
4
+ extend ActiveSupport::Concern
5
+ module Installer
6
+ extend ActiveSupport::Concern
7
+ module InstanceMethods
8
+ include VimBundler::Actions
9
+ def local_install(bundle)
10
+ dir = File.join(@opts[:bundles_dir], bundle.name)
11
+ if Dir.exists?(dir)
12
+ VimBundler.ui.info "#{bundle.name} already installed"
13
+ return
14
+ end
15
+ `ln -s #{bundle.local} #{dir}`
16
+ if $?.to_i == 0 && post_action(dir, bundle)
17
+ VimBundler.ui.info "#{bundle.name} installed"
18
+ else
19
+ VimBundler.ui.warn "#{bundle.name} not installed"
20
+ end
21
+ end
22
+ def local_update(bundle)
23
+ dir = File.join(@opts[:bundles_dir], bundle.name)
24
+ unless Dir.exists?(dir)
25
+ VimBundler.ui.warn "#{bundle.name} not found"
26
+ return
27
+ end
28
+ if post_action(dir, bundle)
29
+ VimBundler.ui.info "#{bundle.name} updated"
30
+ else
31
+ VimBundler.ui.warn "#{bundle.name} not updated"
32
+ end
33
+ end
34
+ def local_clean(bundle)
35
+ dir = File.join(@opts[:bundles_dir], bundle.name)
36
+ if Dir.exists?(dir)
37
+ `unlink #{dir}`
38
+ VimBundler.ui.info "#{bundle.name} removed"
39
+ else
40
+ VimBundler.ui.warn "#{bundle.name} not found"
41
+ end
42
+ end
43
+ end
44
+ end
45
+ module DSL
46
+ extend ActiveSupport::Concern
47
+ included do
48
+ handler :local do |bundle|
49
+ bundle.respond_to?(:local)
50
+ end
51
+ end
52
+ end
53
+ included do
54
+ VimBundler::Installer.send(:include, VimBundler::Local::Installer)
55
+ VimBundler::DSL.send(:include, VimBundler::Local::DSL)
56
+ end
57
+ end
58
+ end
data/lib/vim-bundler.rb CHANGED
@@ -3,6 +3,7 @@ module VimBundler
3
3
  autoload :Installer, 'vim-bundler/installer'
4
4
  autoload :Git, 'vim-bundler/git'
5
5
  autoload :VimOrg, 'vim-bundler/vim_org'
6
+ autoload :Local, 'vim-bundler/local'
6
7
  autoload :UI, 'vim-bundler/ui'
7
8
  autoload :Actions, 'vim-bundler/actions'
8
9
 
@@ -14,4 +15,5 @@ module VimBundler
14
15
  end
15
16
  include Git
16
17
  include VimOrg
18
+ include Local
17
19
  end
data/vim-bundler.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{vim-bundler}
8
- s.version = "0.1.1"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Pavel Tatarsky"]
12
- s.date = %q{2011-06-17}
12
+ s.date = %q{2011-06-22}
13
13
  s.default_executable = %q{vbundle}
14
14
  s.description = %q{This gem provides a simple way to manage your vim bundles (aka plugins).
15
15
  If you are familiar with ruby gem bundler - you are familar with vim-bundler.}
@@ -34,6 +34,7 @@ If you are familiar with ruby gem bundler - you are familar with vim-bundler.}
34
34
  "lib/vim-bundler/dsl.rb",
35
35
  "lib/vim-bundler/git.rb",
36
36
  "lib/vim-bundler/installer.rb",
37
+ "lib/vim-bundler/local.rb",
37
38
  "lib/vim-bundler/ui.rb",
38
39
  "lib/vim-bundler/vim_org.rb",
39
40
  "test/helper.rb",
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: vim-bundler
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.1
5
+ version: 0.2.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Pavel Tatarsky
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-17 00:00:00 +04:00
13
+ date: 2011-06-22 00:00:00 +04:00
14
14
  default_executable: vbundle
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -105,6 +105,7 @@ files:
105
105
  - lib/vim-bundler/dsl.rb
106
106
  - lib/vim-bundler/git.rb
107
107
  - lib/vim-bundler/installer.rb
108
+ - lib/vim-bundler/local.rb
108
109
  - lib/vim-bundler/ui.rb
109
110
  - lib/vim-bundler/vim_org.rb
110
111
  - test/helper.rb
@@ -124,7 +125,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
124
125
  requirements:
125
126
  - - ">="
126
127
  - !ruby/object:Gem::Version
127
- hash: -4284428927604735395
128
+ hash: -3257628406436740927
128
129
  segments:
129
130
  - 0
130
131
  version: "0"