vvm-rb 0.1.1 → 0.1.2

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: 7412e80ad507a04c6e9441d184304f3e9477ee2d
4
- data.tar.gz: fd2084ffb2ca96b28a895aa0574167843e63afc2
3
+ metadata.gz: ebe161ca61d1dd827ef4e4636c2c9d012a386c7d
4
+ data.tar.gz: 70749f3edc5d7e9e03085a17da6e48486bf73c07
5
5
  SHA512:
6
- metadata.gz: 8b6d4c40370237cd86b81add70609e186e3f0b2ef0773f41ed7d20d568a7b482af4bc857bf73de30fb5608bc62e177b0486123e41db8bb2dbce5dc25bde198cb
7
- data.tar.gz: a3fa209ea0e4c373127ea8048a659bdc01d789cf7500200b9efafad3e3db8805309d1560c8215f290fcf8650c9b73bc2be920c7ef67f751a39264967eff91488
6
+ metadata.gz: 0168214225d15b76be8396e5d1adc641c3fe56c5ba697b9f1eb130aaf4383e31e179542c3dd49cebac99843bb979397003498f4f98d12554d10239fb1c4dcbc4
7
+ data.tar.gz: 126ea9ed9f0af51bbf5113974e6365d03eb00560d0724ee5f7e84c8672ac39c746335c5333e0a755fa071dc7de2f1a35ba12467d56302c14fe377f9291e83752
data/.rubocop.yml CHANGED
@@ -8,13 +8,11 @@ RescueModifier:
8
8
  Enabled: false
9
9
  RedundantReturn:
10
10
  Enabled: false
11
- AsciiComments:
12
- Enabled: false
13
- AssignmentInCondition:
14
- Enabled: false
15
11
  Documentation:
16
12
  Enabled: false
17
13
  RedundantBegin:
18
14
  Enabled: false
19
15
  SpecialGlobalVars:
20
16
  Enabled: false
17
+ AccessorMethodName:
18
+ Enabled: false
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
data/lib/vvm-rb/cli.rb CHANGED
@@ -13,15 +13,15 @@ class Cli < Thor
13
13
  i.make_install
14
14
  Installer.cp_etc
15
15
 
16
- use(version) if options[:use]
16
+ invoke :use, [version] if options[:use]
17
17
 
18
- message
18
+ message if $!.success?
19
19
  end
20
20
 
21
21
  desc 'reinstall [VERSION] [CONFIGURE_OPTS]', 'Reinstall a specific version'
22
22
  def reinstall(version, *conf)
23
- uninstall(version)
24
- install(version, conf)
23
+ invoke :uninstall, [version]
24
+ invoke :install, [version, *conf]
25
25
  end
26
26
 
27
27
  desc 'rebuild [VERSION] [CONFIGURE_OPTS]', 'Rebuild a specific version of Vim'
@@ -1 +1 @@
1
- VIM_URI = 'https://vim.googlecode.com/hg/'
1
+ VIM_URI = 'https://vim.googlecode.com/hg/'
@@ -1,8 +1,9 @@
1
1
  require 'fileutils'
2
2
 
3
3
  class Installer
4
- def initialize(version, conf)
4
+ def initialize(version, conf, silent = false)
5
5
  vvmopt = ENV['VVMOPT']
6
+ @silent = silent ? '> /dev/null 2>&1' : ''
6
7
  @version = version
7
8
  @conf = conf.flatten.empty? && vvmopt ? vvmopt.split(' ') : conf
8
9
  end
@@ -10,11 +11,11 @@ class Installer
10
11
  def self.fetch
11
12
  FileUtils.mkdir_p(get_repos_dir)
12
13
  repos_dir = get_vimorg_dir
13
- system("hg clone #{VIM_URI} #{repos_dir}") unless File.exists?(repos_dir)
14
+ system("hg -q clone #{VIM_URI} #{repos_dir}") unless File.exists?(repos_dir)
14
15
  end
15
16
 
16
17
  def self.pull
17
- Dir.chdir(get_vimorg_dir) { system('hg pull') }
18
+ Dir.chdir(get_vimorg_dir) { system('hg -q pull') }
18
19
  end
19
20
 
20
21
  def checkout
@@ -24,7 +25,7 @@ class Installer
24
25
  archive = "hg archive -t tar -r #{@version} -p #{@version} -"
25
26
  expand = "(cd #{src_dir} && tar xf -)"
26
27
  Dir.chdir get_vimorg_dir do
27
- system("#{archive} | #{expand}")
28
+ system("#{archive} | #{expand} #{@silent}")
28
29
  end
29
30
  end
30
31
  end
@@ -34,21 +35,21 @@ class Installer
34
35
  src_dir = get_src_dir(@version)
35
36
  default = "--prefix=#{vims_dir}"
36
37
  Dir.chdir src_dir do
37
- system("./configure #{default} #{@conf.join(' ')}")
38
+ system("./configure #{default} #{@conf.join(' ')} #{@silent}")
38
39
  end
39
40
  end
40
41
 
41
42
  def make_clean
42
43
  src_dir = get_src_dir(@version)
43
44
  Dir.chdir src_dir do
44
- system('make clean')
45
+ system("make clean #{@silent}")
45
46
  end
46
47
  end
47
48
 
48
49
  def make_install
49
50
  src_dir = get_src_dir(@version)
50
51
  Dir.chdir src_dir do
51
- system('make all install')
52
+ system("make all install #{@silent}")
52
53
  end
53
54
  end
54
55
 
@@ -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, [], true)
13
13
  end
14
14
 
15
15
  context 'fetch' do
@@ -92,7 +92,7 @@ describe 'Installer' do
92
92
  describe 'rebuild' do
93
93
  before :all do
94
94
  @version = 'v7-4-103'
95
- @installer = Installer.new(@version, [])
95
+ @installer = Installer.new(@version, [], true)
96
96
  end
97
97
 
98
98
  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, [], true)
33
33
  i.checkout
34
34
  i.configure
35
35
  i.make_install
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.1 ruby lib
5
+ # stub: vvm-rb 0.1.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "vvm-rb"
9
- s.version = "0.1.1"
9
+ s.version = "0.1.2"
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-22"
13
+ s.date = "2013-12-29"
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.1
4
+ version: 0.1.2
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-22 00:00:00.000000000 Z
11
+ date: 2013-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake