vrundler 0.1.6 → 0.1.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e9f9cb69cbfe14e50be78981bb8990a0d2f3893c
4
- data.tar.gz: 3cab4bcb16d62e93c8dbf296b45818a989f2b883
3
+ metadata.gz: 2043d85052563b6d28b0b7deb3130323196d6819
4
+ data.tar.gz: 94c2a3ba101e5a1357c49e98c3c243de8d26f9a8
5
5
  SHA512:
6
- metadata.gz: 832f0d4442b2d064ad767a1c3526666b082bb0cfad05f23ff32440fefb55e8fb382f8735021e718fef3dcaa04c2b6caef1117b6596eceb463b8be1aecc05b094
7
- data.tar.gz: 5038203d74a46211a28fea12cf3afb98f78fcfeeb7418f042dd053301fea6b5f585a914c3dbef5def9646e67357e1426ae574b70f607fb9c8f7b48c619ac29ff
6
+ metadata.gz: 3df7248eca0f955ae3fa31bc52f9dd76bcdf0d7c8a65ee8c78ad530fe4cf6ae1e39df05fc27eb737bba80a2d045a231be4b6a28fefbbf369b087c9d05e404016
7
+ data.tar.gz: 333cef6c6d650063513cdbc682a528dc8514feab2c5ab93a42f18026a4e6adf96fefd882892923983723c89868392515abc41aa093b205ba5cfaa73672cce741
data/README.md CHANGED
@@ -20,100 +20,115 @@ gem install vrundler
20
20
  Create a configuration file for VRundler that allows you to specify the bundles you want vim to use. The following code is a configuration file that uses all of the features of vrundler:
21
21
 
22
22
  ```ruby
23
- # Specify the path where you want your bundles installed
24
- bundles_dir '/Users/developwithpassion/.vim_runtime/bundle'
23
+ def windows?
24
+ RUBY_PLATFORM =~ /(ming|cyg)/
25
+ end
26
+
27
+ bundles_folder = File.expand_path("~/repositories/developwithpassion/devtools/shared/dotfiles/vim/.vim_runtime/bundle")
28
+ open_source_folder = File.expand_path("~/repositories/open_source")
25
29
 
26
- # A github group allows you to specify a github user name
27
- github 'vim-scripts' do
30
+ #A utility method I am using to build a qualified github user name that uses an ssh config host from my ssh configuration file
31
+ def github_user(name)
32
+ "github:#{name}/"
33
+ end
28
34
 
29
- # A bundle is a named vim plugin repo for the user, you can specify
30
- # multiple by separating each plugin with a comma, this is useful if you are
31
- # getting multiple plugins from a single author, you can also specify each plugin
32
- # with separate calls to: bundle '[PLUGIN]'
35
+ # Specify the path where you want your bundles installed
36
+ bundles_dir bundles_folder
37
+
38
+ # A git group allows you to specify a git user you wish to clone vim plugins from
39
+ git github_user('vim-scripts') do
40
+ # A bundle is a named vim plugin repo for the user, you can specify
41
+ # multiple as the method accepts a splat of bundles, this is useful if you are
42
+ # getting multiple plugins from a single author, you can also specify each plugin
43
+ # with separate calls to: bundle '[PLUGIN]'
33
44
  bundle 'dbext.vim',
34
- 'vimgrep.vim'
45
+ 'vimgrep.vim'
35
46
  end
36
47
 
37
- github :altercation do
48
+ git github_user(:altercation) do
38
49
  bundle 'vim-colors-solarized'
39
50
  end
40
51
 
41
- github :benmills do
52
+ git github_user(:benmills) do
42
53
  bundle 'vimux'
43
54
  end
44
55
 
45
- github :developwithpassion do
56
+ git github_user(:developwithpassion) do
46
57
  bundle 'TwitVim'
47
58
  end
48
59
 
49
60
  # A symlink bundle is just a vim plugin that is on your local file system somewhere
50
61
  # and you want it symlinked into your vim bundle folder, the first argument is
51
62
  # the name the symlink will be given in your plugin folder
52
- symlink :dwp_vim_general, '/to_backup/repositories/open_source/dwp_vim_general'
63
+ symlink :dwp_vim_general, File.join(open_source_folder, 'dwp_vim_general')
53
64
 
54
- github :ecomba do
65
+ git github_user(:ecomba) do
55
66
  bundle 'vim-ruby-refactoring'
56
67
  end
57
68
 
58
- github :elzr do
69
+ git github_user(:elzr) do
59
70
  bundle 'vim-json'
60
71
  end
61
72
 
62
- github :ervandew do
73
+ git github_user(:ervandew) do
63
74
  bundle 'supertab'
64
75
  end
65
76
 
66
- github :nanotech do
77
+ git github_user(:nanotech) do
67
78
  bundle 'jellybeans.vim'
68
79
  end
69
80
 
70
- github :kana do
81
+ git github_user(:kana) do
71
82
  bundle 'vim-fakeclip'
72
83
  end
73
84
 
74
- github :kien do
85
+ git github_user(:kien) do
75
86
  bundle 'ctrlp.vim'
76
87
  end
77
88
 
78
- github :MarcWeber do
89
+ git github_user(:MarcWeber) do
79
90
  bundle 'vim-addon-mw-utils'
80
91
  end
81
92
 
82
- github :scrooloose do
93
+ git github_user(:scrooloose) do
83
94
  bundle 'syntastic' ,
84
95
  'nerdtree'
85
96
  end
86
97
 
87
- github :jistr do
98
+ git github_user(:jistr) do
88
99
  bundle 'vim-nerdtree-tabs'
89
100
  end
90
101
 
91
- github :sukima do
102
+ git github_user(:sukima) do
92
103
  bundle 'xmledit'
93
104
  end
94
105
 
95
- github :timcharper do
106
+ git github_user(:timcharper) do
96
107
  bundle 'textile.vim'
97
108
  end
98
109
 
99
- github :thoughtbot do
110
+ git github_user(:thoughtbot) do
100
111
  bundle 'vim-rspec'
101
112
  end
102
113
 
103
- github :pangloss do
114
+ git github_user(:pangloss) do
104
115
  bundle 'vim-javascript'
105
116
  end
106
117
 
107
- github :SirVer do
118
+ git github_user(:SirVer) do
108
119
  bundle 'ultisnips'
109
- end
120
+ end unless windows?
110
121
 
111
- github :tomtom do
122
+ git github_user(:garbas) do
123
+ bundle 'vim-snipmate'
124
+ end if windows?
125
+
126
+ git github_user(:tomtom) do
112
127
  bundle 'tcomment_vim',
113
128
  'tlib_vim'
114
129
  end
115
130
 
116
- github :tpope do
131
+ git github_user(:tpope) do
117
132
  bundle 'vim-cucumber',
118
133
  'vim-endwise',
119
134
  'vim-fugitive',
@@ -126,30 +141,43 @@ github :tpope do
126
141
  'vim-vividchalk'
127
142
  end
128
143
 
129
- github :Lokaltog do
144
+ git github_user(:Lokaltog) do
130
145
  bundle 'vim-distinguished'
131
146
  end
132
147
 
133
- github :Valloric do
134
- # This demonstrates configuring the bundle using a block, in this
135
- # example I am chdir'ing into the bundle folder after it has downloaded
136
- # and running a system command to configure the plugin, in this case for
137
- # YouCompleteMe it initializes its submodules and then installs
138
- # the native extensions
139
- bundle 'YouCompleteMe' do |b, context|
140
- b.after_download do
141
- Dir.chdir(context.output_folder(b)) do
142
- system("git submodule update --init --recursive && ./install.sh")
148
+ git github_user(:rizzatti) do
149
+ bundle 'dash.vim'
150
+ end
151
+
152
+ git github_user(:Valloric) do
153
+ unless windows?
154
+ # This demonstrates configuring the bundle using a block, in this
155
+ # example I am chdir'ing into the bundle folder after it has downloaded
156
+ # and running a system command to configure the plugin, in this case for
157
+ # YouCompleteMe it initializes its submodules and then installs
158
+ # the native extensions
159
+ bundle 'YouCompleteMe' do |b, context|
160
+ b.after_download do
161
+ Dir.chdir(context.output_folder(b)) do
162
+ system("git submodule update --init --recursive && ./install.sh")
163
+ end
143
164
  end
144
165
  end
145
166
  end
146
167
  bundle 'MatchTagAlways'
147
168
  end
148
169
 
149
- github 'vim-ruby' do
170
+ git github_user('vim-ruby') do
150
171
  bundle 'vim-ruby'
151
172
  end
152
173
 
174
+ git github_user('zweifisch') do
175
+ bundle 'pipe2eval'
176
+ end
177
+
178
+ git github_user('hdima') do
179
+ bundle 'python-syntax'
180
+ end
153
181
 
154
182
  # A vimscripts group allows you to pull down individual script files from vimscripts.org
155
183
  vimscripts do
@@ -193,6 +221,10 @@ vrundler install --config_file=PATH_TO_YOUR_CONFIG_FILE
193
221
  * Refactored from a script I wrote years ago, didn't write tests for it
194
222
  * I've used it successfully for a long time (about 4 years).
195
223
  * It's optimized for my workflow. YMMV.
224
+ * Above script has been run in the following environments:
225
+ * osx
226
+ * linux (ubuntu precise64)
227
+ * mingw under windows
196
228
 
197
229
  ##License
198
230
 
@@ -1,3 +1,3 @@
1
1
  module VRundler
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
@@ -0,0 +1,37 @@
1
+ module VRundler
2
+ def bundles_dir(path)
3
+ Bundles.bundles_dir path
4
+ end
5
+
6
+ def git(user_clone_url, &block)
7
+ group(user_clone_url, &block)
8
+ end
9
+
10
+ def vimscripts(&block)
11
+ vim_script_group = VimScriptGroup.new
12
+ configure(vim_script_group, &block)
13
+ end
14
+
15
+ def vimzips(&block)
16
+ zip_group = VimZipGroup.new
17
+ configure(zip_group, &block)
18
+ end
19
+
20
+ def symlink(destination_folder_key, source_path)
21
+ bundle = SymlinkBundle.new(destination_folder_key, source_path)
22
+ Bundles << bundle
23
+ yield bundle, Bundles if block_given?
24
+ bundle
25
+ end
26
+
27
+ :private
28
+ def configure(item, &block)
29
+ item.instance_eval(&block)
30
+ item
31
+ end
32
+
33
+ def group(name, &block)
34
+ item = BundleGroup.new(name)
35
+ configure(item)
36
+ end
37
+ end
data/lib/vrundler.rb CHANGED
@@ -11,42 +11,6 @@ require 'vrundler/symlink_bundle'
11
11
  require 'vrundler/vim_script_group'
12
12
  require 'vrundler/vim_zip_bundle'
13
13
  require 'vrundler/vim_zip_group'
14
-
15
- module VRundler
16
- def log(message)
17
- puts message
18
- end
19
-
20
- def bundles_dir(path)
21
- Bundles.bundles_dir path
22
- end
23
-
24
- def git(user_clone_url, &block)
25
- group(user_clone_url, &block)
26
- end
27
-
28
- def vimscripts(&block)
29
- vim_script_group = VimScriptGroup.new
30
- vim_script_group.instance_eval(&block) if block
31
- end
32
-
33
- def vimzips(&block)
34
- zip_group = VimZipGroup.new
35
- zip_group.instance_eval(&block) if block
36
- end
37
-
38
- def symlink(destination_folder_key, source_path)
39
- bundle = SymlinkBundle.new(destination_folder_key, source_path)
40
- Bundles << bundle
41
- yield bundle, Bundles if block_given?
42
- bundle
43
- end
44
-
45
- :private
46
- def group(name, &block)
47
- group = BundleGroup.new(name)
48
- group.instance_eval(&block)
49
- end
50
- end
14
+ require 'vrundler/vrundler'
51
15
 
52
16
  include VRundler
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vrundler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Develop With Passion®
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-30 00:00:00.000000000 Z
11
+ date: 2014-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -50,6 +50,7 @@ files:
50
50
  - lib/vrundler/vim_script_group.rb
51
51
  - lib/vrundler/vim_zip_bundle.rb
52
52
  - lib/vrundler/vim_zip_group.rb
53
+ - lib/vrundler/vrundler.rb
53
54
  - vrundler.gemspec
54
55
  homepage: http://www.developwithpassion.com
55
56
  licenses: