diff --git a/.travis.yml b/.travis.yml index dc872e6..0a76ad9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,11 +29,6 @@ addons: paths: - $(ls tmp/artifact* | tr "\n" ":") -# workaround for https://github.com/travis-ci/travis-ci/issues/4536 -before_install: - - export GEM_HOME=$PWD/vendor/bundle/ruby/2.2.0 - - gem install bundler - before_script: - mkdir -p tmp/{pids,cache} log cache - script/noosfero-plugins disableall @@ -55,11 +50,11 @@ env: - SLICE=2/4 TASK=selenium - SLICE=3/4 TASK=selenium - SLICE=4/4 TASK=selenium - - SLICE=1/5 TASK=test:noosfero_plugins BUNDLE_OPTS=install - - SLICE=2/5 TASK=test:noosfero_plugins BUNDLE_OPTS=install - - SLICE=3/5 TASK=test:noosfero_plugins BUNDLE_OPTS=install - - SLICE=4/5 TASK=test:noosfero_plugins BUNDLE_OPTS=install - - SLICE=5/5 TASK=test:noosfero_plugins BUNDLE_OPTS=install + - SLICE=1/5 TASK=test:noosfero_plugins NOOSFERO_BUNDLE_OPTS=install + - SLICE=2/5 TASK=test:noosfero_plugins NOOSFERO_BUNDLE_OPTS=install + - SLICE=3/5 TASK=test:noosfero_plugins NOOSFERO_BUNDLE_OPTS=install + - SLICE=4/5 TASK=test:noosfero_plugins NOOSFERO_BUNDLE_OPTS=install + - SLICE=5/5 TASK=test:noosfero_plugins NOOSFERO_BUNDLE_OPTS=install script: - bundle exec rake $TASK diff --git a/circle.yml b/circle.yml index 0de0885..209a97b 100644 --- a/circle.yml +++ b/circle.yml @@ -28,22 +28,22 @@ test: bundle exec rake test:api bundle exec rake test:functionals SLICE=1/4 bundle exec rake selenium - SLICE=1/4 BUNDLE_OPTS=install bundle exec rake test:noosfero_plugins + SLICE=1/4 NOOSFERO_BUNDLE_OPTS=install bundle exec rake test:noosfero_plugins ;; 1) bundle exec rake test:integration SLICE=2/4 bundle exec rake selenium - SLICE=2/4 BUNDLE_OPTS=install bundle exec rake test:noosfero_plugins + SLICE=2/4 NOOSFERO_BUNDLE_OPTS=install bundle exec rake test:noosfero_plugins ;; 2) bundle exec rake test:units SLICE=3/4 bundle exec rake selenium - SLICE=3/4 BUNDLE_OPTS=install bundle exec rake test:noosfero_plugins + SLICE=3/4 NOOSFERO_BUNDLE_OPTS=install bundle exec rake test:noosfero_plugins ;; 3) bundle exec rake cucumber SLICE=4/4 bundle exec rake selenium - SLICE=4/4 BUNDLE_OPTS=install bundle exec rake test:noosfero_plugins + SLICE=4/4 NOOSFERO_BUNDLE_OPTS=install bundle exec rake test:noosfero_plugins ;; esac : diff --git a/lib/tasks/plugins_tests.rake b/lib/tasks/plugins_tests.rake index d3278dd..5359bb2 100644 --- a/lib/tasks/plugins_tests.rake +++ b/lib/tasks/plugins_tests.rake @@ -25,7 +25,7 @@ def enable_plugins(plugins) plugins = Array(plugins) command = ['./script/noosfero-plugins', '-q', 'enable', *plugins] puts plugins.join(' ') - system *command + Bundler.clean_system *command end def disable_plugins(plugins = '*') diff --git a/script/noosfero-plugins b/script/noosfero-plugins index 28d3bc2..65bc35f 100755 --- a/script/noosfero-plugins +++ b/script/noosfero-plugins @@ -79,7 +79,7 @@ run(){ _install(){ # export so that recursive enables for dependencies inherit this option too - export BUNDLE_OPTS='install' + export NOOSFERO_BUNDLE_OPTS='install' _enable "$1" } @@ -119,8 +119,8 @@ _enable(){ if [ -e $source/Gemfile ]; then gemfile=$(mktemp --tmpdir=.) cat $NOOSFERO_DIR/Gemfile $source/Gemfile > $gemfile - if [ -z "$BUNDLE_OPTS" ]; then BUNDLE_OPTS="--local"; fi - if ! RUBYOPT='' BUNDLE_GEMFILE="$gemfile" bundle $BUNDLE_OPTS --quiet; then + if [ -z "$NOOSFERO_BUNDLE_OPTS" ]; then NOOSFERO_BUNDLE_OPTS="--local"; fi + if ! RUBYOPT='' BUNDLE_GEMFILE="$gemfile" bundle $NOOSFERO_BUNDLE_OPTS --quiet; then dependencies_ok=false else mv "$gemfile".lock Gemfile.lock -- libgit2 0.21.2