vvm-rb 0.0.15 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 31db24627abc435e23d829c6870a068d5261a104
4
- data.tar.gz: ea6da73ab2a6c848304d5b7222df7165d65859c7
3
+ metadata.gz: 08a3cb7bc092625781a44b3b06143b1e2ee640ef
4
+ data.tar.gz: 2ba72fc32842b61d2b1abf28532699706ba9ba88
5
5
  SHA512:
6
- metadata.gz: aa027529f29f1c71fa16035d203179ec65d1b5eac301281792544a012dba0ddb8389fe512ff71fad27dd2d779d7056556a7fa2a6ae31da35322f41886d9aa003
7
- data.tar.gz: 08ae7aca6e315557b33f3014e28f07477b597a4e675ee93d76b8a457a8fd785857a86d7b26201b16bddc126fbf9447e12458f87760447f95a1eea8a0dc9422db
6
+ metadata.gz: 76305755a2a171da82cacdc3038d1ecaed96dfcd01718a3654a51ecdcdaf3e99d46b7a63b8a0814e6850d96babbcf4a25682f6082680ddf441795d5e7db1788c
7
+ data.tar.gz: 1d46b95c7b436a4523117e5da10803d1b22d355574ce403bc843d6501340c33060bed2e171a267c9b3c6ad0ca71ab6dd2ae1bbc67d220d9ac5ed609e3101ff04
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.15
1
+ 0.1.0
data/lib/vvm-rb/cli.rb CHANGED
@@ -7,7 +7,6 @@ class Cli < Thor
7
7
  desc 'install [VERSION] [CONFIGURE_OPTS]', 'Install a specific version of Vim'
8
8
  method_option :use, type: :boolean, aliases: '-u', banner: 'Use installed vim'
9
9
  def install(version, *conf)
10
- Installer.pull
11
10
  i = Installer.new(Version.format(version), conf)
12
11
  i.checkout
13
12
  i.configure
@@ -40,7 +39,6 @@ class Cli < Thor
40
39
 
41
40
  desc 'list', 'Look available vim versions'
42
41
  def list
43
- Installer.pull
44
42
  puts Version.list.join("\n")
45
43
  end
46
44
 
@@ -57,6 +55,7 @@ class Cli < Thor
57
55
  before_method(:install) { new_version? }
58
56
  before_method(:reinstall, :rebuild, :use, :uninstall) { version_exist? }
59
57
  before_method(:install, :reinstall, :rebuild, :use, :uninstall) { check_tag }
58
+ before_method(:install, :list) { Installer.pull }
60
59
  before_method(:install, :reinstall, :rebuild, :list) { check_hg }
61
60
  before_method(*instance_methods(false)) do
62
61
  Installer.fetch unless File.exists?(get_vimorg_dir)
@@ -28,7 +28,8 @@ module Validator
28
28
  private
29
29
 
30
30
  def get_version
31
- regex = /(^start$|^tip$|^v7-.+$|^(\d\.\d\.\d+)$|^system$|^latest$)/
31
+ version_regex = /^v7-.+$|^(\d\.\d(a|b){0,1}(\.\d+){0,1})$/
32
+ regex = /(^start$|^tip$|^system$|^latest$|#{version_regex})/
32
33
  version = $*.find { |v| v =~ regex }
33
34
  return Version.format(version)
34
35
  end
@@ -28,7 +28,7 @@ class Version
28
28
  case version
29
29
  when /^latest$/
30
30
  version = latest
31
- when /^(\d\.\d\.\d+)$/
31
+ when /^(\d\.\d(a|b){0,1}(\.\d+){0,1})$/
32
32
  version = convert(version)
33
33
  end
34
34
  return version
@@ -25,7 +25,7 @@ describe 'Switcher' do
25
25
  end
26
26
 
27
27
  it 'switch current' do
28
- expect(File.readlink(@current)).to eq(@vims_dir)
28
+ expect(File.readlink(@current)).to eq @vims_dir
29
29
  end
30
30
  end
31
31
 
data/spec/version_spec.rb CHANGED
@@ -12,7 +12,7 @@ describe 'Version' do
12
12
  describe 'versions' do
13
13
  context 'vims dirctory exists' do
14
14
  it 'echo installed vim versions' do
15
- expect(Version.versions.join("\n")).to eq("v7-4-083\nv7-4-103")
15
+ expect(Version.versions.join("\n")).to eq "v7-4-083\nv7-4-103"
16
16
  end
17
17
  end
18
18
  context 'vims dirctory is not found' do
@@ -55,7 +55,7 @@ describe 'Version' do
55
55
 
56
56
  context 'dicimal version' do
57
57
  it 'return formated vim version' do
58
- expect(Version.format('7.4.112')).to eq 'v7-4-112'
58
+ expect(Version.format('7.4a.001')).to eq 'v7-4a-001'
59
59
  end
60
60
  end
61
61
 
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.0.15 ruby lib
5
+ # stub: vvm-rb 0.1.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "vvm-rb"
9
- s.version = "0.0.15"
9
+ s.version = "0.1.0"
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-11"
13
+ s.date = "2013-12-13"
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.0.15
4
+ version: 0.1.0
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 00:00:00.000000000 Z
11
+ date: 2013-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake