vvm-rb 0.1.0 → 0.1.1

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: 08a3cb7bc092625781a44b3b06143b1e2ee640ef
4
- data.tar.gz: 2ba72fc32842b61d2b1abf28532699706ba9ba88
3
+ metadata.gz: 7412e80ad507a04c6e9441d184304f3e9477ee2d
4
+ data.tar.gz: fd2084ffb2ca96b28a895aa0574167843e63afc2
5
5
  SHA512:
6
- metadata.gz: 76305755a2a171da82cacdc3038d1ecaed96dfcd01718a3654a51ecdcdaf3e99d46b7a63b8a0814e6850d96babbcf4a25682f6082680ddf441795d5e7db1788c
7
- data.tar.gz: 1d46b95c7b436a4523117e5da10803d1b22d355574ce403bc843d6501340c33060bed2e171a267c9b3c6ad0ca71ab6dd2ae1bbc67d220d9ac5ed609e3101ff04
6
+ metadata.gz: 8b6d4c40370237cd86b81add70609e186e3f0b2ef0773f41ed7d20d568a7b482af4bc857bf73de30fb5608bc62e177b0486123e41db8bb2dbce5dc25bde198cb
7
+ data.tar.gz: a3fa209ea0e4c373127ea8048a659bdc01d789cf7500200b9efafad3e3db8805309d1560c8215f290fcf8650c9b73bc2be920c7ef67f751a39264967eff91488
data/README.rdoc CHANGED
@@ -34,18 +34,17 @@ you can set your default options of configure.
34
34
 
35
35
  export VVMOPT="--enable-rubyinterp --enable-pythoninterp"
36
36
 
37
- == Commands
37
+ == Commands Examples
38
38
 
39
39
  $ vvm-rb help
40
- $ vvm-rb install v7-4 --enable-rubyinterp
41
- $ vvm-rb install v7-4-035
42
- $ vvm-rb install latest
43
- $ vvm-rb reinstall v7-4
44
- $ vvm-rb rebuild v7-4 --enable-rubyinterp --enable-pythoninterp
45
- $ vvm-rb use v7-4
40
+ $ vvm-rb install 7.4.103 --enable-rubyinterp
41
+ $ vvm-rb install --use latest
42
+ $ vvm-rb reinstall 7.4.103
43
+ $ vvm-rb rebuild 7.4.103 --enable-rubyinterp --enable-pythoninterp
44
+ $ vvm-rb use 7.4.103
46
45
  $ vvm-rb list
47
46
  $ vvm-rb versions
48
- $ vvm-rb uninstall v7-4-035
47
+ $ vvm-rb uninstall 7.4.103
49
48
 
50
49
  after use command, you have to reload shell.
51
50
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/etc/login CHANGED
@@ -6,7 +6,9 @@ __vvm_rb_path_remove ()
6
6
  }
7
7
  __vvm_rb_configure_path()
8
8
  {
9
- local vvm_rb_bin_path="$HOME/.vvm-rb/vims/current/bin"
9
+ local vvm_rb_root_path="$HOME/.vvm-rb"
10
+ [ -z $VVMROOT ] || vvm_rb_root_path=$VVMROOT
11
+ local vvm_rb_bin_path="$vvm_rb_root_path/vims/current/bin"
10
12
  __vvm_rb_path_remove $vvm_rb_bin_path
11
13
  export PATH="$vvm_rb_bin_path:$PATH"
12
14
  }
data/lib/vvm-rb/cli.rb CHANGED
@@ -37,12 +37,12 @@ class Cli < Thor
37
37
  Switcher.new(Version.format(version)).use
38
38
  end
39
39
 
40
- desc 'list', 'Look available vim versions'
40
+ desc 'list', 'Look available versions of Vim.'
41
41
  def list
42
42
  puts Version.list.join("\n")
43
43
  end
44
44
 
45
- desc 'versions', 'Look installed vim versions.'
45
+ desc 'versions', 'Look installed versions of Vim.'
46
46
  def versions
47
47
  puts Version.versions.join("\n")
48
48
  end
@@ -53,11 +53,14 @@ class Installer
53
53
  end
54
54
 
55
55
  def self.cp_etc
56
- unless File.exists?(get_login_file)
56
+ current_login = get_login_file
57
+ login = File.expand_path(File.dirname(__FILE__) + '/../../etc/login')
58
+ if !File.exists?(current_login)
57
59
  etc_dir = get_etc_dir
58
60
  FileUtils.mkdir_p(etc_dir)
59
- login = File.expand_path(File.dirname(__FILE__) + '/../../etc/login')
60
61
  FileUtils.cp(login, etc_dir)
62
+ elsif !FileUtils.compare_file(login, current_login)
63
+ FileUtils.cp(login, get_etc_dir)
61
64
  end
62
65
  end
63
66
  end
@@ -54,16 +54,29 @@ describe 'Installer' do
54
54
  end
55
55
 
56
56
  context 'cp_etc' do
57
- before :all do
58
- Installer.cp_etc
59
- end
60
-
61
- it 'exists etc dir' do
62
- expect(File.exists?(get_etc_dir)).to be_true
57
+ context 'login file not exist' do
58
+ before :all do
59
+ Installer.cp_etc
60
+ end
61
+
62
+ it 'exists etc dir' do
63
+ expect(File.exists?(get_etc_dir)).to be_true
64
+ end
65
+
66
+ it 'exists login file' do
67
+ expect(File.exists?(get_login_file)).to be_true
68
+ end
63
69
  end
64
-
65
- it 'exists login file' do
66
- expect(File.exists?(get_login_file)).to be_true
70
+ context 'login file exists and it is not latest' do
71
+ before :all do
72
+ FileUtils.stub(:compare_file).and_return(false)
73
+ end
74
+
75
+ it 'exists login file' do
76
+ l = File.expand_path(File.dirname(__FILE__) + '/../etc/login')
77
+ expect(FileUtils).to receive(:cp).with(l, get_etc_dir)
78
+ Installer.cp_etc
79
+ end
67
80
  end
68
81
  end
69
82
 
data/vvm-rb.gemspec CHANGED
@@ -2,15 +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.1.0 ruby lib
5
+ # stub: vvm-rb 0.1.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "vvm-rb"
9
- s.version = "0.1.0"
9
+ s.version = "0.1.1"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.authors = ["Yuu Shigetani"]
13
- s.date = "2013-12-13"
13
+ s.date = "2013-12-22"
14
14
  s.description = "vim version manager."
15
15
  s.email = "s2g4t1n2@gmail.com"
16
16
  s.executables = ["vvm-rb"]
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.1.0
4
+ version: 0.1.1
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-13 00:00:00.000000000 Z
11
+ date: 2013-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake