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:
parent
7f907a0099
commit
0979db4675
1 changed files with 2 additions and 1 deletions
|
@ -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/
|
||||||
|
|
Loading…
Reference in a new issue