1
0
Fork 0
mirror of https://github.com/thoughtbot/capybara-webkit synced 2023-03-27 23:22:28 -04:00

Choose platform more reliably. (Works with Jruby.)

This commit is contained in:
John Hume 2011-10-21 15:55:08 -04:00 committed by Matthew Mongeau
parent 7f907a0099
commit 0979db4675

View file

@ -1,4 +1,5 @@
require "fileutils" require "fileutils"
require "rbconfig"
module CapybaraWebkitBuilder module CapybaraWebkitBuilder
extend self extend self
@ -11,7 +12,7 @@ module CapybaraWebkitBuilder
def makefile def makefile
qmake_binaries = ['qmake', 'qmake-qt4'] qmake_binaries = ['qmake', 'qmake-qt4']
qmake = qmake_binaries.detect { |qmake| system("which #{qmake}") } qmake = qmake_binaries.detect { |qmake| system("which #{qmake}") }
case RUBY_PLATFORM case RbConfig::CONFIG['host_os']
when /linux/ when /linux/
system("#{qmake} -spec linux-g++") system("#{qmake} -spec linux-g++")
when /freebsd/ when /freebsd/