rconf 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -150,11 +150,20 @@ module RightConf
150
150
  def install_ruby_darwin(ruby)
151
151
  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`
152
152
  env = {}
153
+ gcc42 = ['/usr/bin/gcc-4.2', '/usr/local/bin/gcc-4.2'].detect { |p| File.executable?(p) }
153
154
  if c_version =~ /^4\.2\.[0-9]+/
154
- if !File.executable?('/usr/bin/gcc-4.2')
155
+ if !gcc42
155
156
  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")
156
157
  else
157
- env['CC'] = '/usr/bin/gcc-4.2'
158
+ env['CC'] = gcc42
159
+ end
160
+ end
161
+ if ruby =~ /1\.8/
162
+ if File.directory?('/opt/X11/include')
163
+ env['CC'] = gcc42
164
+ env['CPPFLAGS'] = '-I/opt/X11/include'
165
+ else
166
+ report_fatal("Installing ruby 1.8 (or ree 1.8) on Mac OS X requires that XQuartz be installed on the machine first, please go to http://xquartz.macosforge.org/landing/, install XQuartz and try again")
158
167
  end
159
168
  end
160
169
  Command.execute('rbenv', 'install', ruby, :abort_on_failure => 'Failed to install ruby', :env => env)
@@ -198,6 +207,12 @@ module RightConf
198
207
  # === Return
199
208
  # true:: Always return true
200
209
  def install_ruby_prerequisites_darwin(ruby)
210
+ if ruby =~ /1\.8/
211
+ report_check("Detected ruby 1.8 install, making sure gcc 4.2 is available")
212
+ PackageInstaller.install('https://raw.github.com/Homebrew/homebrew-dupes/master/apple-gcc42.rb', :abort_on_failure => "Could not install gcc 4.2")
213
+ report_success
214
+ end
215
+
201
216
  true
202
217
  end
203
218
 
@@ -32,8 +32,10 @@ module RightConf
32
32
  # === Return
33
33
  # true:: Always return true
34
34
  def self.report_to_stdout
35
+ reporter = StdoutReporter.new
36
+ reporter.report("rconf v#{RightConf::VERSION} (c)2011-2013 RightScale")
35
37
  @@reporters ||= []
36
- @@reporters << StdoutReporter.new
38
+ @@reporters << reporter
37
39
  true
38
40
  end
39
41
 
@@ -13,7 +13,7 @@ module RightConf
13
13
 
14
14
  MAJOR = 1
15
15
  MINOR = 0
16
- BUILD = 0
16
+ BUILD = 1
17
17
 
18
18
  VERSION = [MAJOR, MINOR, BUILD].map(&:to_s).join('.')
19
19
 
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.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: