Module: VPM
- Defined in:
- lib/vpm.rb,
lib/vpm/git.rb,
lib/vpm/plugin.rb,
lib/vpm/runner.rb,
lib/vpm/plugins.rb,
lib/vpm/version.rb,
lib/vpm/commands/list.rb,
lib/vpm/command_options.rb,
lib/vpm/manifest_parser.rb,
lib/vpm/commands/install.rb,
lib/vpm/command_options/list.rb,
lib/vpm/command_options/install.rb,
lib/vpm/command_options/abstract_command_options.rb
Defined Under Namespace
Modules: CommandOptions, Commands, Git, Runner
Classes: ManifestParser, Plugin, Plugins
Constant Summary
collapse
- VERSION =
"0.0.2"
Class Method Summary
collapse
Class Method Details
.bundle_dir_path ⇒ Object
39
40
41
42
43
44
45
|
# File 'lib/vpm.rb', line 39
def self.bundle_dir_path
@bundle_dir_path ||= begin
dir_path = File.join(vim_dir_path, 'bundle')
FileUtils.mkdir_p dir_path unless Dir.exists?(dir_path)
dir_path
end
end
|
.plugins ⇒ Object
27
28
29
|
# File 'lib/vpm.rb', line 27
def self.plugins
@plugins ||= Plugins.load_from_file(plugins_file)
end
|
.plugins_file ⇒ Object
47
48
49
50
51
52
53
54
55
56
|
# File 'lib/vpm.rb', line 47
def self.plugins_file
@insatlled_plugins_file ||= begin
vpm_dir_path = File.join(vim_dir, 'vpm')
FileUtils.mkdir_p vpm_dir_path unless Dir.exists?(vpm_dir_path)
plugins_file_path = File.join(vpm_dir_path, 'plugins.yaml')
FileUtils.touch(plugins_file_path)
plugins_file_path
end
end
|
.run(args) ⇒ Object
22
23
24
25
|
# File 'lib/vpm.rb', line 22
def self.run(args)
command = args.shift.to_s.capitalize
VPM::Commands[command].call args
end
|
.vim_dir_path ⇒ Object
31
32
33
34
35
36
37
|
# File 'lib/vpm.rb', line 31
def self.vim_dir_path
@vim_dir_path ||= begin
dir_path = ENV['VPM_VIM_DIR'] ? File.expand_path(ENV['VPM_VIM_DIR']) : File.join(ENV['HOME'], '.vim')
FileUtils.mkdir_p dir_path unless Dir.exists?(dir_path)
dir_path
end
end
|
.vimrc_path ⇒ Object
62
63
64
|
# File 'lib/vpm.rb', line 62
def self.vimrc_path
File.expand_path File.join("~", ".vimrc")
end
|
.vpmrc_path ⇒ Object
58
59
60
|
# File 'lib/vpm.rb', line 58
def self.vpmrc_path
File.expand_path File.join(ENV['HOME'], '.vpmrc')
end
|