Add script/bootstrap for eventmachine + OpenSSL issues on OS X

This commit is contained in:
Mislav Marohnić 2015-12-23 16:54:36 +01:00
parent b681452bbf
commit 80c0e66102
2 changed files with 15 additions and 0 deletions

View File

@ -5,6 +5,9 @@ automatically starts a test server in background. Only tests in
`test/adapters/*_test.rb` require a server, though.
``` sh
# setup development dependencies
$ script/bootstrap
# run the whole suite
$ script/test

12
script/bootstrap Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
set -e
if ! bundle config build.eventmachine | grep -q 'cppflags='; then
if openssl_dir="$(brew --prefix openssl 2>/dev/null)"; then
bundle config --local build.eventmachine \
--with-cppflags="-I${openssl_dir}/include" \
--with-ldflags="-L${openssl_dir}/lib"
fi
fi
bundle install --path vendor/bundle --jobs 4