Skip to content

Commit

Permalink
[core] Syncing older travis changes
Browse files Browse the repository at this point in the history
This commit was imported from rspec/rspec-core@b91a276.
  • Loading branch information
JonRowe committed Dec 28, 2019
1 parent 7a3749e commit c91b197
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
7 changes: 5 additions & 2 deletions rspec-core/script/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ source $SCRIPT_DIR/travis_functions.sh
source $SCRIPT_DIR/predicate_functions.sh

# If JRUBY_OPTS isn't set, use these.
# see http://docs.travis-ci.com/user/ci-environment/
# see https://docs.travis-ci.com/user/ci-environment/
export JRUBY_OPTS=${JRUBY_OPTS:-"--server -Xcompile.invokedynamic=false"}
SPECS_HAVE_RUN_FILE=specs.out
MAINTENANCE_BRANCH=`cat maintenance-branch`
Expand Down Expand Up @@ -187,7 +187,10 @@ function run_all_spec_suites {
fold "rspec-core specs" run_spec_suite_for "rspec-core"
fold "rspec-expectations specs" run_spec_suite_for "rspec-expectations"
fold "rspec-mocks specs" run_spec_suite_for "rspec-mocks"
fold "rspec-rails specs" run_spec_suite_for "rspec-rails"

if rspec_rails_compatible; then
fold "rspec-rails specs" run_spec_suite_for "rspec-rails"
fi

if rspec_support_compatible; then
fold "rspec-support specs" run_spec_suite_for "rspec-support"
Expand Down
8 changes: 8 additions & 0 deletions rspec-core/script/predicate_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ function is_ruby_23_plus {
fi
}

function rspec_rails_compatible {
if is_ruby_23_plus; then
return 0
else
return 1
fi
}

function rspec_support_compatible {
if [ "$MAINTENANCE_BRANCH" != "2-99-maintenance" ] && [ "$MAINTENANCE_BRANCH" != "2-14-maintenance" ]; then
return 0
Expand Down
4 changes: 2 additions & 2 deletions rspec-core/script/update_rubygems_and_install_bundler
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ set -e
source script/functions.sh

if is_ruby_23_plus; then
gem update --system
gem install bundler
yes | gem update --system
yes | gem install bundler
else
echo "Warning installing older versions of Rubygems / Bundler"
gem update --system '2.7.8'
Expand Down

0 comments on commit c91b197

Please sign in to comment.