File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -74,10 +74,15 @@ Run a single test
7474` $ rake test TEST=path/to/test.rb TESTOPTS="--name=test_something" `
7575
7676Run tests against different Rails versions by setting the RAILS_VERSION variable
77- and bundling gems.
77+ and bundling gems. (save this script somewhere executable and run from top of AMS repository)
7878
7979``` bash
80- for version in 4.0 4.1 4.2 master; do
80+ #! /usr/bin/env bash
81+
82+ rcommand=' puts YAML.load_file("./.travis.yml")["env"]["matrix"].join(" ").gsub("RAILS_VERSION=", "")'
83+ versions=$( ruby -ryaml -e " $rcommand " )
84+
85+ for version in ${versions[@]} ; do
8186 export RAILS_VERSION=" $version "
8287 rm -f Gemfile.lock
8388 bundle check || bundle --local || bundle
@@ -88,7 +93,12 @@ for version in 4.0 4.1 4.2 master; do
8893 else
8994 # red in ANSI
9095 echo -e " \033[31m **** Tests failed against Rails ${RAILS_VERSION} **** \033[0m"
91- fi
96+ read -p ' [Enter] any key to continue, [q] to quit...' prompt
97+ if [ " $prompt " = ' q' ]; then
98+ unset RAILS_VERSION
99+ exit 1
100+ fi
101+ fi
92102 unset RAILS_VERSION
93103done
94104```
You can’t perform that action at this time.
0 commit comments