Sha256: c622addc9465a2703f63d4377e6b2e124744a1fbc4ba7f6f54d912a9515b4658

Contents?: true

Size: 1.41 KB

Versions: 1

Compression:

Stored size: 1.41 KB

Contents

#!/bin/bash --login

# '--login' is needed to deal with the following warning otherwise emitted by rvm:
#   You need to change your terminal emulator preferences to allow login shell.
#   Sometimes it is required to use `/bin/bash --login` as the command.
#   Please visit https://rvm.io/integration/gnome-terminal/ for a example.

rvm gemset create observed-test
rvm gemset use observed-test

observed_dir=`dirname $0`

cd $observed_dir

observed_dir=`pwd`

plugins_dir=$observed_dir/plugins
integrations_dir=$observed_dir/integrations
integrations="clockwork eventmachine"
plugins="http fluentd gauge"

#cd $observed_dir

dirs=$observed_dir

for integration in $integrations
do
  dirs="$dirs $integrations_dir/observed-$integration"
done

for plugin in $plugins
do
  dirs="$dirs $plugins_dir/observed-$plugin"
done

echo $dirs

function quit_on_failure {
  if [[ $? -ne 0 ]]; then
    quit 1
  fi
}

function quit {
  rvm --force gemset delete observed-test
  if [[ $1 == "" ]]; then
    exit 0
  fi
  exit $1
}

for target in $dirs
do
  echo Target: $target
  cd $target
  echo Current directory: `pwd`
  export BUNDLE_GEMFILE=$target/Gemfile
  bundle install
  if [[ $? -ne 0 ]]; then
    bundle update
  fi
  if [ -d spec ]
  then
    bundle exec rspec
  fi
  quit_on_failure

  if [ -d features ]
  then
    bundle exec cucumber
  fi
  quit_on_failure

  rake install
  if [[ $? -ne 0 ]]; then
    gem install pkg/*.gem
  fi

done

quit

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
observed-0.2.0.rc1 run-integration-tests