Skip to content

Include a binstubs check before running CI script #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 1, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions travis/script/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,49 @@ function run_spec_suite_for {
fi;
}

function check_binstubs {
echo "Checking required binstubs"

local success=0
local binstubs=""
local gems=""

if [ ! -x ./bin/rspec ]; then
binstubs="$binstubs bin/rspec"
gems="$gems rspec-core"
success=1
fi

if [ ! -x ./bin/rake ]; then
binstubs="$binstubs bin/rake"
gems="$gems rake"
success=1
fi

if [ ! -x ./bin/cucumber ]; then
binstubs="$binstubs bin/cucumber"
gems="$gems cucumber"
success=1
fi

if [ $success -eq 1 ]; then
echo
echo "Missing binstubs:$binstubs"
echo "Install missing binstubs using one of the following:"
echo
echo " # Create the missing binstubs"
echo " $ bundle binstubs$gems"
echo
echo " # To binstub all gems"
echo " $ bundle install --binstubs"
echo
echo " # To binstub all gems and avoid loading bundler"
echo " $ bundle install --binstubs --standalone"
fi

return $success
}

function check_documentation_coverage {
echo "bin/yard stats --list-undoc"

Expand Down
2 changes: 2 additions & 0 deletions travis/script/run_build
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ if [ -f script/custom_build_functions.sh ]; then
source script/custom_build_functions.sh
fi

fold "binstub check" check_binstubs

fold "specs" run_specs_and_record_done
fold "cukes" run_cukes

Expand Down