rconf 1.0.5 → 1.0.6
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.
data/Rakefile
CHANGED
@@ -14,10 +14,16 @@ require 'rubygems'
|
|
14
14
|
require 'fileutils'
|
15
15
|
require 'rake'
|
16
16
|
require 'rspec/core/rake_task'
|
17
|
-
require 'rdoc/task'
|
18
17
|
require 'rake/gempackagetask'
|
19
18
|
require 'rake/clean'
|
20
19
|
|
20
|
+
begin
|
21
|
+
require 'rdoc/task'
|
22
|
+
rescue LoadError => e
|
23
|
+
warn "Older RDoc detected; falling back to legacy RDoc+Rake bindings"
|
24
|
+
require 'rake/rdoctask'
|
25
|
+
end
|
26
|
+
|
21
27
|
task :default => 'spec'
|
22
28
|
task :build => [ 'spec', 'gem' ]
|
23
29
|
|
@@ -83,22 +83,15 @@ 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('bundle', '--version')
|
87
|
-
exists = res.success? && res.output !~ /exec: bundle: not found/
|
88
|
-
if exists && res.output !~ /#{version}/
|
89
|
-
report_check('Uninstalling existing versions of bundler')
|
90
|
-
Command.execute('gem', 'uninstall', 'bundler', '-a', '-x')
|
91
|
-
report_success
|
92
|
-
end
|
93
86
|
report_check("Installing bundler #{version}")
|
94
87
|
if gem_path
|
95
|
-
|
96
|
-
report_fatal("Missing bundler gem at #{
|
88
|
+
version_or_file = [ File.join(gem_path, "bundler-#{version}.gem") ]
|
89
|
+
report_fatal("Missing bundler gem at #{version_or_file}") unless File.exist?(version_or_file)
|
97
90
|
else
|
98
|
-
|
91
|
+
version_or_file = [ 'bundler', '-v', version ]
|
99
92
|
end
|
100
93
|
options = [ 'gem','install' ]
|
101
|
-
options +=
|
94
|
+
options += version_or_file
|
102
95
|
options += [ '--no-ri', '--no-rdoc', { :abort_on_failure => 'Failed to install bundler' } ]
|
103
96
|
res = Command.execute(*options)
|
104
97
|
report_success
|
@@ -143,7 +143,7 @@ module RightConf
|
|
143
143
|
Platform.dispatch(ruby) { :install_ruby_prerequisites }
|
144
144
|
c_version = `system_profiler SPDeveloperToolsDataType -xml | xpath "//*[text()='_items']/following-sibling::array/dict/child::key[text()='spdevtools_version']/following-sibling::string/text()" 2> /dev/null`
|
145
145
|
env = {}
|
146
|
-
gcc42 = ['/usr/bin/gcc-4.2', '/usr/
|
146
|
+
gcc42 = ['/usr/local/bin/gcc-4.2', '/usr/bin/gcc-4.2'].detect { |p| File.executable?(p) }
|
147
147
|
if c_version =~ /^4\.2\.[0-9]+/
|
148
148
|
if !gcc42
|
149
149
|
report_fatal("The C compiler included with Xcode #{c_version} produces buggy ruby interpreters, please install the C compilers from https://github.com/downloads/kennethreitz/osx-gcc-installer/GCC-10.7-v2.pkg or update your version of Xcode and re-run rconf")
|
@@ -200,8 +200,15 @@ module RightConf
|
|
200
200
|
# === Return
|
201
201
|
# true:: Always return true
|
202
202
|
def install_ruby_prerequisites_darwin(ruby)
|
203
|
-
|
204
|
-
|
203
|
+
version_output = `sw_vers`
|
204
|
+
if m = /ProductVersion:\s*([0-9.]+)/m.match(version_output)
|
205
|
+
osx_version = m[1].split(".").map { |c| c.to_i }
|
206
|
+
else
|
207
|
+
raise RuntimeError, "Can't determine OS X version from sw_vers output (#{version_output})"
|
208
|
+
end
|
209
|
+
|
210
|
+
if (osx_version[0] > 10 || osx_version[1] > 6)
|
211
|
+
report_check("installing non-LLVM GCC 4.2")
|
205
212
|
PackageInstaller.install('https://raw.github.com/Homebrew/homebrew-dupes/master/apple-gcc42.rb', :abort_on_failure => "Could not install gcc 4.2")
|
206
213
|
report_success
|
207
214
|
end
|
data/lib/rconf/version.rb
CHANGED
@@ -41,12 +41,10 @@ describe RightConf::BundlerConfigurator do
|
|
41
41
|
end
|
42
42
|
|
43
43
|
it 'should install bundler if needed' do
|
44
|
-
should_execute('
|
44
|
+
should_execute('gem', 'install', 'bundler', '-v', '0', '--no-ri', '--no-rdoc',
|
45
|
+
{:abort_on_failure=>"Failed to install bundler"}).once.and_return(success_result)
|
45
46
|
should_execute('bundle','_0_', 'install',
|
46
47
|
{:abort_on_failure=>"Failed to install gems"}).once.and_return(success_result)
|
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
|
-
{:abort_on_failure=>"Failed to install bundler"}).once.and_return(success_result)
|
50
48
|
@configurator.run_linux
|
51
49
|
end
|
52
50
|
|
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
|
+
version: 1.0.6
|
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-
|
12
|
+
date: 2013-04-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|