Install rake if the lib isn't there; upgrade to cucumber 1.3.18

This commit is contained in:
Parker Moore
2014-12-25 14:35:45 -05:00
parent 928be16fab
commit f66862c508
7 changed files with 18 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
#!/bin/sh
script/branding
bundle install
bundle install -j8

View File

@@ -1,5 +1,8 @@
#!/bin/bash
ls /usr/share/zoneinfo
ls /usr/share/zoneinfo/Australia
time bundle exec cucumber \
-f Features::Support::Overview \
"$@"

View File

@@ -10,7 +10,15 @@ else
TEST_FILES="$@"
fi
RAKE_LIB_DIR=$(ruby -e "puts Gem::Specification.find_by_name('rake').gem_dir + '/lib'")
# bundle exec gem env
GEM_DIR=$(bundle exec gem env | grep -C 1 "GEM PATHS" | tail -1 | cut -d '-' -f2 | cut -d' ' -f2)
RAKE_LIB_WITH_VERSION=$(bundle exec ruby -e "puts Gem::Specification.find_by_name('rake').gem_dir.split('/').last + '/lib'")
RAKE_LIB_DIR="${GEM_DIR}/gems/${RAKE_LIB_WITH_VERSION}"
test -d "${RAKE_LIB_DIR}" || {
echo "No ${RAKE_LIB_DIR}. Installing Rake."
bundle show rake | cut -d'/' -f12 | cut -d'-' -f 2 | xargs bundle exec gem install rake -v
}
set -x