Skip to content

Updates from rspec-dev (2020-01-23) #2269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2019-12-18T14:01:39+00:00 from the rspec-dev repo.
# This file was generated on 2020-01-23T22:37:16+03:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

version: "{build}"
Expand Down Expand Up @@ -33,6 +33,9 @@ test_script:

environment:
matrix:
- ruby_version: 200
- ruby_version: 21
- ruby_version: 22
- ruby_version: 23-x64
- ruby_version: 24-x64
- ruby_version: 25-x64
Expand Down
7 changes: 5 additions & 2 deletions script/clone_all_rspec_repos
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2019-12-18T14:01:39+00:00 from the rspec-dev repo.
# This file was generated on 2020-01-23T22:37:16+03:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

set -e
Expand All @@ -13,7 +13,10 @@ if is_mri; then
clone_repo "rspec-expectations"
clone_repo "rspec-mocks"
clone_repo "rspec-rails"
clone_repo "rspec-support"

if rspec_support_compatible; then
clone_repo "rspec-support"
fi

popd
else
Expand Down
22 changes: 15 additions & 7 deletions script/functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2019-12-18T14:01:39+00:00 from the rspec-dev repo.
# This file was generated on 2020-01-23T22:37:16+03:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Expand All @@ -13,7 +13,7 @@ MAINTENANCE_BRANCH=`cat maintenance-branch`

# Don't allow rubygems to pollute what's loaded. Also, things boot faster
# without the extra load time of rubygems. Only works on MRI Ruby 1.9+
if is_mri; then
if is_mri_192_plus; then
export RUBYOPT="--disable=gem"
fi

Expand Down Expand Up @@ -47,7 +47,12 @@ function run_cukes {

echo "${PWD}/bin/cucumber"

if is_jruby; then
if is_mri_192; then
# For some reason we get SystemStackError on 1.9.2 when using
# the bin/cucumber approach below. That approach is faster
# (as it avoids the bundler tax), so we use it on rubies where we can.
bundle exec cucumber --strict
elif is_jruby; then
# For some reason JRuby doesn't like our improved bundler setup
RUBYOPT="-I${PWD}/../bundle -rbundler/setup" \
PATH="${PWD}/bin:$PATH" \
Expand Down Expand Up @@ -158,8 +163,6 @@ function check_documentation_coverage {
end
"

echo "bin/yard doc --no-cache"

# Some warnings only show up when generating docs, so do that as well.
bin/yard doc --no-cache | ruby -e "
while line = gets
Expand All @@ -184,6 +187,11 @@ 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"
fold "rspec-support specs" run_spec_suite_for "rspec-support"
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"
fi
}
30 changes: 27 additions & 3 deletions script/predicate_functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2019-12-18T14:01:39+00:00 from the rspec-dev repo.
# This file was generated on 2020-01-23T22:37:16+03:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

function is_mri {
Expand Down Expand Up @@ -65,8 +65,28 @@ function is_ruby_23_plus {
fi
}

function is_ruby_25_plus {
if ruby -e "exit(RUBY_VERSION.to_f >= 2.5)"; then
return 0
else
return 1
fi
}

function is_mri_27 {
if is_mri; then
if ruby -e "exit(RUBY_VERSION.to_f == 2.7)"; then
return 0
else
return 1
fi
else
return 1
fi
}

function rspec_rails_compatible {
if is_ruby_23_plus; then
if is_ruby_25_plus; then
return 0
else
return 1
Expand All @@ -89,7 +109,11 @@ function additional_specs_available {
function documentation_enforced {
if [ -x ./bin/yard ]; then
if is_mri_2plus; then
return 0
if is_mri_27; then
return 1
else
return 0
fi
else
return 1
fi
Expand Down
2 changes: 1 addition & 1 deletion script/run_build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2019-12-18T14:01:39+00:00 from the rspec-dev repo.
# This file was generated on 2020-01-23T22:37:16+03:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

set -e
Expand Down
2 changes: 1 addition & 1 deletion script/travis_functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2019-12-18T14:01:39+00:00 from the rspec-dev repo.
# This file was generated on 2020-01-23T22:37:16+03:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

# Taken from:
Expand Down
12 changes: 9 additions & 3 deletions script/update_rubygems_and_install_bundler
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#!/bin/bash
# This file was generated on 2019-12-18T14:01:39+00:00 from the rspec-dev repo.
# This file was generated on 2020-01-23T22:37:16+03:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

set -e
source script/functions.sh

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