vvm-rb 0.0.14 → 0.0.15

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: 3b0c5ce1f3171c0f708d880c112ee34c77d504a7
4
- data.tar.gz: 4f4cd9ff34744a99727838d46682c98b7a4561ed
3
+ metadata.gz: 31db24627abc435e23d829c6870a068d5261a104
4
+ data.tar.gz: ea6da73ab2a6c848304d5b7222df7165d65859c7
5
5
  SHA512:
6
- metadata.gz: be346af4b466e0a5cd50deb9d4464a2c8bd9456c9beb63f847a19b7f4c66fcf1c589490a798602edbc53aa65d45650a5fed6f7e941e072aad06b19682498a27b
7
- data.tar.gz: e9b8e6a2ed72f820de74d39f419231460c51c64f349b8743dce35aded380a329756e1ef3a3d878451caedf175dcca2e9a2dc919567730efd190c1c7d51893910
6
+ metadata.gz: aa027529f29f1c71fa16035d203179ec65d1b5eac301281792544a012dba0ddb8389fe512ff71fad27dd2d779d7056556a7fa2a6ae31da35322f41886d9aa003
7
+ data.tar.gz: 08ae7aca6e315557b33f3014e28f07477b597a4e675ee93d76b8a457a8fd785857a86d7b26201b16bddc126fbf9447e12458f87760447f95a1eea8a0dc9422db
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.14
1
+ 0.0.15
data/lib/vvm-rb/cli.rb CHANGED
@@ -7,11 +7,8 @@ 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
- version = Version.format(version)
11
- new_version?(version)
12
-
13
10
  Installer.pull
14
- i = Installer.new(version, conf)
11
+ i = Installer.new(Version.format(version), conf)
15
12
  i.checkout
16
13
  i.configure
17
14
  i.make_install
@@ -30,7 +27,7 @@ class Cli < Thor
30
27
 
31
28
  desc 'rebuild [VERSION] [CONFIGURE_OPTS]', 'Rebuild a specific version of Vim'
32
29
  def rebuild(version, *conf)
33
- r = Installer.new(version, conf)
30
+ r = Installer.new(Version.format(version), conf)
34
31
  r.make_clean
35
32
  r.configure
36
33
  r.make_install
@@ -38,7 +35,7 @@ class Cli < Thor
38
35
 
39
36
  desc 'use [VERSION]', 'Use a specific version of Vim as the default one.'
40
37
  def use(version)
41
- Switcher.new(version).use
38
+ Switcher.new(Version.format(version)).use
42
39
  end
43
40
 
44
41
  desc 'list', 'Look available vim versions'
@@ -54,7 +51,7 @@ class Cli < Thor
54
51
 
55
52
  desc 'uninstall [VERSION]', 'Uninstall a specific version of Vim.'
56
53
  def uninstall(version)
57
- Uninstaller.new(version).uninstall
54
+ Uninstaller.new(Version.format(version)).uninstall
58
55
  end
59
56
 
60
57
  before_method(:install) { new_version? }
@@ -1,9 +1,10 @@
1
1
  require 'fileutils'
2
2
 
3
3
  class Installer
4
- def initialize(version, conf = [])
4
+ def initialize(version, conf)
5
+ vvmopt = ENV['VVMOPT']
5
6
  @version = version
6
- @conf = conf.empty? && ENV['VVMOPT'] ? ENV['VVMOPT'].split(' ') : conf
7
+ @conf = conf.flatten.empty? && vvmopt ? vvmopt.split(' ') : conf
7
8
  end
8
9
 
9
10
  def self.fetch
@@ -9,7 +9,7 @@ describe 'Installer' do
9
9
  FileUtils.rm_rf(get_etc_dir)
10
10
  ENV['VVMOPT'] = '--enable-rubyinterp'
11
11
  @version = 'v7-4-103'
12
- @installer = Installer.new(@version)
12
+ @installer = Installer.new(@version, [])
13
13
  end
14
14
 
15
15
  context 'fetch' do
@@ -79,7 +79,7 @@ describe 'Installer' do
79
79
  describe 'rebuild' do
80
80
  before :all do
81
81
  @version = 'v7-4-103'
82
- @installer = Installer.new(@version)
82
+ @installer = Installer.new(@version, [])
83
83
  end
84
84
 
85
85
  context 'make_clean' do
data/spec/spec_helper.rb CHANGED
@@ -29,7 +29,7 @@ RSpec.configure do |config|
29
29
  FileUtils.mkdir_p(cache_dir)
30
30
  Installer.fetch
31
31
  %w{ v7-4-083 v7-4-103 }.each do |v|
32
- i = Installer.new(v)
32
+ i = Installer.new(v, [])
33
33
  i.checkout
34
34
  i.configure
35
35
  i.make_install
data/vvm-rb.gemspec CHANGED
@@ -2,11 +2,11 @@
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.14 ruby lib
5
+ # stub: vvm-rb 0.0.15 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "vvm-rb"
9
- s.version = "0.0.14"
9
+ s.version = "0.0.15"
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"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vvm-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuu Shigetani