CONTRIBUTING.md in active_model_serializers-0.10.0.rc5 vs CONTRIBUTING.md in active_model_serializers-0.10.0

- old
+ new

@@ -5,11 +5,11 @@ ##### Consult the documentation See if your issue can be resolved by information in the documentation. - [0.10 (master) Documentation](https://github.com/rails-api/active_model_serializers/tree/master/docs) - - [![API Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://www.rubydoc.info/github/rails-api/active_model_serializers/v0.10.0.rc5) + - [![API Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://www.rubydoc.info/github/rails-api/active_model_serializers/v0.10.0) - [Guides](docs) - [0.9 (0-9-stable) Documentation](https://github.com/rails-api/active_model_serializers/tree/0-9-stable) - [0.8 (0-8-stable) Documentation](https://github.com/rails-api/active_model_serializers/tree/0-8-stable) ##### Check for an existing issue @@ -72,24 +72,34 @@ Run a single test `$ rake test TEST=path/to/test.rb TESTOPTS="--name=test_something"` Run tests against different Rails versions by setting the RAILS_VERSION variable -and bundling gems. +and bundling gems. (save this script somewhere executable and run from top of AMS repository) ```bash -for version in 4.0 4.1 4.2 master; do +#!/usr/bin/env bash + +rcommand='puts YAML.load_file("./.travis.yml")["env"]["matrix"].join(" ").gsub("RAILS_VERSION=", "")' +versions=$(ruby -ryaml -e "$rcommand") + +for version in ${versions[@]}; do export RAILS_VERSION="$version" rm -f Gemfile.lock bundle check || bundle --local || bundle bundle exec rake test if [ "$?" -eq 0 ]; then # green in ANSI echo -e "\033[32m **** Tests passed against Rails ${RAILS_VERSION} **** \033[0m" else # red in ANSI echo -e "\033[31m **** Tests failed against Rails ${RAILS_VERSION} **** \033[0m" - fi + read -p '[Enter] any key to continue, [q] to quit...' prompt + if [ "$prompt" = 'q' ]; then + unset RAILS_VERSION + exit 1 + fi +fi unset RAILS_VERSION done ```