From 80c0e66102168939df04682573bc267e089a43ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Wed, 23 Dec 2015 16:54:36 +0100 Subject: [PATCH] Add `script/bootstrap` for eventmachine + OpenSSL issues on OS X --- CONTRIBUTING.md | 3 +++ script/bootstrap | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100755 script/bootstrap diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 863a3cfb..98725c1a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 diff --git a/script/bootstrap b/script/bootstrap new file mode 100755 index 00000000..5c2694b6 --- /dev/null +++ b/script/bootstrap @@ -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