rconf 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -14,7 +14,7 @@ require 'rubygems'
14
14
  require 'fileutils'
15
15
  require 'rake'
16
16
  require 'rspec/core/rake_task'
17
- require 'rake/rdoctask'
17
+ require 'rdoc/task'
18
18
  require 'rake/gempackagetask'
19
19
  require 'rake/clean'
20
20
 
@@ -33,7 +33,7 @@ module RightConf
33
33
  # false:: Otherwise
34
34
  def check_linux
35
35
  report_check("Checking for bundler #{version}")
36
- res = Command.execute_in_ruby('bundle', '--version')
36
+ res = Command.execute('bundle', '--version')
37
37
  success = (res.output =~ /#{version}/)
38
38
  report_result(success)
39
39
  success
@@ -59,7 +59,7 @@ module RightConf
59
59
  options << "--without=#{exclusions.delete(' ')}" unless exclusions.nil?
60
60
  options += [ '--path', bundle_path ] unless bundle_path.nil?
61
61
  options << { :abort_on_failure => 'Failed to install gems' }
62
- res = Command.execute_in_ruby('bundle', *options)
62
+ res = Command.execute('bundle', *options)
63
63
  report_success
64
64
  true
65
65
  end
@@ -83,11 +83,11 @@ module RightConf
83
83
  # === Raise
84
84
  # (Exception):: If bundler gem cannot be found or installed
85
85
  def install_bundler
86
- res = Command.execute_in_ruby('bundle', '--version')
86
+ res = Command.execute('bundle', '--version')
87
87
  exists = res.success? && res.output !~ /exec: bundle: not found/
88
88
  if exists && res.output !~ /#{version}/
89
89
  report_check('Uninstalling existing versions of bundler')
90
- Command.execute_in_ruby('gem', 'uninstall', 'bundler', '-a', '-x')
90
+ Command.execute('gem', 'uninstall', 'bundler', '-a', '-x')
91
91
  report_success
92
92
  end
93
93
  report_check("Installing bundler #{version}")
@@ -100,7 +100,7 @@ module RightConf
100
100
  options = [ 'gem','install' ]
101
101
  options += bundler_file
102
102
  options += [ '--no-ri', '--no-rdoc', { :abort_on_failure => 'Failed to install bundler' } ]
103
- res = Command.execute_in_ruby(*options)
103
+ res = Command.execute(*options)
104
104
  report_success
105
105
  true
106
106
  end
@@ -97,7 +97,7 @@ module RightConf
97
97
  opts = { :report => true, :post_install => update_msg }.merge(abort_option('Failed to install rbenv'))
98
98
  PackageInstaller.install('rbenv', opts)
99
99
  opts = { :report => true }.merge(abort_option('Failed to install ruby-build'))
100
- PackageInstaller.install('ruby-build', opts) { !Command.execute('ruby-build') }
100
+ PackageInstaller.install('ruby-build', opts)
101
101
  true
102
102
  end
103
103
  end
@@ -13,7 +13,7 @@ module RightConf
13
13
 
14
14
  MAJOR = 1
15
15
  MINOR = 0
16
- BUILD = 4
16
+ BUILD = 5
17
17
 
18
18
  VERSION = [MAJOR, MINOR, BUILD].map(&:to_s).join('.')
19
19
 
@@ -36,16 +36,16 @@ describe RightConf::BundlerConfigurator do
36
36
  end
37
37
 
38
38
  it 'should succeed when bundler succeeds' do
39
- should_execute_in_ruby('bundle', '--version').once.and_return(success_result('0'))
39
+ should_execute('bundle', '--version').once.and_return(success_result('0'))
40
40
  @configurator.check_linux.should be_true
41
41
  end
42
42
 
43
43
  it 'should install bundler if needed' do
44
- should_execute_in_ruby('bundle', '--version').once.and_return(success_result('1'))
45
- should_execute_in_ruby('bundle','_0_', 'install',
44
+ should_execute('bundle', '--version').once.and_return(success_result('1'))
45
+ should_execute('bundle','_0_', 'install',
46
46
  {:abort_on_failure=>"Failed to install gems"}).once.and_return(success_result)
47
- should_execute_in_ruby('gem', 'uninstall', 'bundler', '-a', '-x').once.and_return(success_result)
48
- should_execute_in_ruby('gem', 'install', 'bundler', '-v', '0', '--no-ri', '--no-rdoc',
47
+ should_execute('gem', 'uninstall', 'bundler', '-a', '-x').once.and_return(success_result)
48
+ should_execute('gem', 'install', 'bundler', '-v', '0', '--no-ri', '--no-rdoc',
49
49
  {:abort_on_failure=>"Failed to install bundler"}).once.and_return(success_result)
50
50
  @configurator.run_linux
51
51
  end
@@ -57,14 +57,14 @@ describe RightConf::RubyConfigurator do
57
57
 
58
58
  it 'should install rbenv and ruby-build' do
59
59
  flexmock(RightConf::PackageInstaller).should_receive(:install).with('rbenv', Hash).once
60
- flexmock(RightConf::PackageInstaller).should_receive(:install).with('ruby-build', Hash, Proc).once
60
+ flexmock(RightConf::PackageInstaller).should_receive(:install).with('ruby-build', Hash).once
61
61
  should_execute('rbenv', 'local', '42').and_return(success_result)
62
62
  @configurator.run_linux
63
63
  end
64
64
 
65
65
  it 'should install ruby if needed' do
66
66
  flexmock(RightConf::PackageInstaller).should_receive(:install).with('rbenv', Hash).once
67
- flexmock(RightConf::PackageInstaller).should_receive(:install).with('ruby-build', Hash, Proc).once
67
+ flexmock(RightConf::PackageInstaller).should_receive(:install).with('ruby-build', Hash).once
68
68
  should_execute('rbenv', 'local', '42').and_return(failure_result)
69
69
  flexmock(RightConf::Platform).should_receive(:dispatch).with('42', Proc)
70
70
  should_execute('rbenv', 'local', '42').and_return(success_result)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rconf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-05 00:00:00.000000000 Z
12
+ date: 2013-03-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec