vvm-rb 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +1 -1
- data/VERSION +1 -1
- data/lib/vvm-rb/cli.rb +34 -31
- data/lib/vvm-rb/validator.rb +11 -3
- data/vvm-rb.gemspec +4 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e9c706910ddb03703d262b22e7d33cce1c2f069
|
4
|
+
data.tar.gz: 2f28d5d4d793828541773537be03d6aeb6151e95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfc490b737bf80052ea5d948593a396beea97f7cdc6c71bfd94fc966048b9525d8eb93a53a3673c9d4edeccd3859635afdfe99a1c4addf1835952f89a801e719
|
7
|
+
data.tar.gz: 8b9c112b945c48ed7fbaeb84ad380b071422462787b2f045062892a0674c553715764efdc8f5bbbe2baf06150aae01288546854aa3321fa31e9cce0b386dadc8
|
data/README.rdoc
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.12
|
data/lib/vvm-rb/cli.rb
CHANGED
@@ -4,36 +4,38 @@ class Cli < Thor
|
|
4
4
|
include Thor::Actions
|
5
5
|
include VvmRb::Base
|
6
6
|
|
7
|
-
desc 'install [
|
8
|
-
method_option :use, :
|
7
|
+
desc 'install [VERSION] [CONFIGURE_OPTS]', 'Install a specific version of Vim'
|
8
|
+
method_option :use, type: :boolean, aliases: '-u', banner: 'Use installed vim'
|
9
9
|
def install(version, *conf)
|
10
|
-
|
11
|
-
use(version) if options[:use]
|
12
|
-
|
13
|
-
print "\e[32m"
|
14
|
-
puts <<-EOS
|
10
|
+
version = format_version(version)
|
15
11
|
|
16
|
-
|
17
|
-
|
12
|
+
Installer.fetch
|
13
|
+
i = Installer.new(version, conf)
|
14
|
+
i.checkout
|
15
|
+
i.configure
|
16
|
+
i.make_install
|
17
|
+
Installer.cp_etc
|
18
18
|
|
19
|
-
|
19
|
+
use(version) if options[:use]
|
20
20
|
|
21
|
-
|
22
|
-
print "\e[0m"
|
21
|
+
message
|
23
22
|
end
|
24
23
|
|
25
|
-
desc 'reinstall [
|
24
|
+
desc 'reinstall [VERSION] [CONFIGURE_OPTS]', 'Reinstall a specific version'
|
26
25
|
def reinstall(version, *conf)
|
27
|
-
|
28
|
-
|
26
|
+
uninstall(version)
|
27
|
+
install(version, conf)
|
29
28
|
end
|
30
29
|
|
31
|
-
desc 'rebuild [
|
30
|
+
desc 'rebuild [VERSION] [CONFIGURE_OPTS]', 'Rebuild a specific version of Vim'
|
32
31
|
def rebuild(version, *conf)
|
33
|
-
|
32
|
+
r = Installer.new(version, conf)
|
33
|
+
r.make_clean
|
34
|
+
r.configure
|
35
|
+
r.make_install
|
34
36
|
end
|
35
37
|
|
36
|
-
desc 'use [
|
38
|
+
desc 'use [VERSION]', 'Use a specific version of Vim as the default one.'
|
37
39
|
def use(version)
|
38
40
|
Switcher.new(version).use
|
39
41
|
end
|
@@ -49,7 +51,7 @@ test -f ~/.vvm-rb/etc/login && source ~/.vvm-rb/etc/login
|
|
49
51
|
puts Version.versions.join("\n")
|
50
52
|
end
|
51
53
|
|
52
|
-
desc 'uninstall [
|
54
|
+
desc 'uninstall [VERSION]', 'Uninstall a specific version of Vim.'
|
53
55
|
def uninstall(version)
|
54
56
|
Uninstaller.new(version).uninstall
|
55
57
|
end
|
@@ -61,23 +63,24 @@ test -f ~/.vvm-rb/etc/login && source ~/.vvm-rb/etc/login
|
|
61
63
|
|
62
64
|
private
|
63
65
|
|
64
|
-
def
|
65
|
-
Installer.fetch
|
66
|
+
def format_version(version)
|
66
67
|
if version == 'latest'
|
67
68
|
version = Version.list.select { |v| v =~ /^v7-.+$/ }.last
|
68
69
|
new_version?(version)
|
69
70
|
end
|
70
|
-
|
71
|
-
i.checkout
|
72
|
-
i.configure
|
73
|
-
i.make_install
|
74
|
-
Installer.cp_etc
|
71
|
+
return version
|
75
72
|
end
|
76
73
|
|
77
|
-
def
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
74
|
+
def message
|
75
|
+
print "\e[32m"
|
76
|
+
puts <<-EOS
|
77
|
+
|
78
|
+
Vim is successfully installed. For daily use,
|
79
|
+
please add the following line into your ~/.bash_login etc:
|
80
|
+
|
81
|
+
test -f ~/.vvm-rb/etc/login && source ~/.vvm-rb/etc/login
|
82
|
+
|
83
|
+
EOS
|
84
|
+
print "\e[0m"
|
82
85
|
end
|
83
86
|
end
|
data/lib/vvm-rb/validator.rb
CHANGED
@@ -9,7 +9,7 @@ module Validator
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def check_tag
|
12
|
-
|
12
|
+
if get_version.nil?
|
13
13
|
abort 'undefined vim version. please run [ vvm-rb list ].'
|
14
14
|
end
|
15
15
|
return true
|
@@ -28,10 +28,18 @@ module Validator
|
|
28
28
|
private
|
29
29
|
|
30
30
|
def get_version
|
31
|
-
|
31
|
+
version = $*.find { |v| v =~ /(^start$|^tip$|^v7-.+$|^system$|^latest$)/ }
|
32
|
+
if version == 'latest'
|
33
|
+
version = Version.list.select { |v| v =~ /^v7-.+$/ }.last
|
34
|
+
end
|
35
|
+
return version
|
32
36
|
end
|
33
37
|
|
34
38
|
def version_include?(version)
|
35
|
-
return Version.versions.include?(version) || version
|
39
|
+
return Version.versions.include?(version) || use_system?(version)
|
40
|
+
end
|
41
|
+
|
42
|
+
def use_system?(version)
|
43
|
+
return version == 'system' && $*.include?('use')
|
36
44
|
end
|
37
45
|
end
|
data/vvm-rb.gemspec
CHANGED
@@ -2,14 +2,15 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: vvm-rb 0.0.12 ruby lib
|
5
6
|
|
6
7
|
Gem::Specification.new do |s|
|
7
8
|
s.name = "vvm-rb"
|
8
|
-
s.version = "0.0.
|
9
|
+
s.version = "0.0.12"
|
9
10
|
|
10
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
12
|
s.authors = ["Yuu Shigetani"]
|
12
|
-
s.date = "2013-12-
|
13
|
+
s.date = "2013-12-08"
|
13
14
|
s.description = "vim version manager."
|
14
15
|
s.email = "s2g4t1n2@gmail.com"
|
15
16
|
s.executables = ["vvm-rb"]
|
@@ -51,7 +52,7 @@ Gem::Specification.new do |s|
|
|
51
52
|
s.homepage = "http://github.com/calorie/vvm-rb"
|
52
53
|
s.licenses = ["MIT"]
|
53
54
|
s.require_paths = ["lib"]
|
54
|
-
s.rubygems_version = "2.
|
55
|
+
s.rubygems_version = "2.1.5"
|
55
56
|
s.summary = "vim version manager"
|
56
57
|
|
57
58
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vvm-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuu Shigetani
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -194,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
194
194
|
version: '0'
|
195
195
|
requirements: []
|
196
196
|
rubyforge_project:
|
197
|
-
rubygems_version: 2.
|
197
|
+
rubygems_version: 2.1.5
|
198
198
|
signing_key:
|
199
199
|
specification_version: 4
|
200
200
|
summary: vim version manager
|