From 6201782ea35b9253339dd0fc0d9fca5eebb8d129 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Fri, 8 Jan 2021 09:17:14 +0000 Subject: [PATCH 01/11] Updated ci build scripts (from rspec-dev)3-10-maintenance --- .github/workflows/ci.yml | 25 +++++++++++++++++++++- .rubocop_rspec_base.yml | 2 +- .travis.yml | 7 +----- script/ci_functions.sh | 2 +- script/clone_all_rspec_repos | 2 +- script/cucumber.sh | 8 +++++++ script/functions.sh | 2 +- script/legacy_setup.sh | 20 +++++++++++++++++ script/predicate_functions.sh | 2 +- script/run_build | 2 +- script/update_rubygems_and_install_bundler | 2 +- 11 files changed, 60 insertions(+), 14 deletions(-) create mode 100755 script/cucumber.sh create mode 100755 script/legacy_setup.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bafebb738..76ea6108a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -# This file was generated on 2020-12-27T14:29:50+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-08T09:17:14+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. name: RSpec CI @@ -67,6 +67,29 @@ jobs: - run: bundle install --binstubs --standalone - run: script/run_build + legacy: + name: Legacy Ruby Builds (${{ matrix.container.version }}) + runs-on: ubuntu-20.04 + container: ${{ matrix.container.tag }} + strategy: + fail-fast: false + matrix: + container: + - version: "2.0" + tag: rspec/ci:2.0.0 + - version: "1.9.3" + tag: rspec/ci:1.9.3 + - version: "JRuby 1.7" + tag: rspec/ci:jruby-1.7 + env: + LEGACY_CI: true + JRUBY_OPTS: ${{ matrix.container.jruby_opts || '--dev' }} + steps: + - uses: actions/checkout@v2 + - run: script/legacy_setup.sh + - run: bundle exec bin/rspec + - run: bundle exec script/cucumber.sh + windows: name: Ruby ${{ matrix.ruby }} (Windows) runs-on: windows-latest diff --git a/.rubocop_rspec_base.yml b/.rubocop_rspec_base.yml index 46e0d3b9b..3984b481f 100644 --- a/.rubocop_rspec_base.yml +++ b/.rubocop_rspec_base.yml @@ -1,4 +1,4 @@ -# This file was generated on 2020-12-27T14:29:50+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-08T09:17:14+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. # This file contains defaults for RSpec projects. Individual projects diff --git a/.travis.yml b/.travis.yml index dfd9a31e7..06b88984a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -# This file was generated on 2020-12-27T14:29:50+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-08T09:17:14+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. # In order to install old Rubies, we need to use old Ubuntu distibution. @@ -17,12 +17,7 @@ script: "script/run_build" rvm: - 1.8.7 - 1.9.2 - - 1.9.3 - - 2.0.0 - ree - - jruby-1.7 -env: - - JRUBY_OPTS='--dev' matrix: include: - rvm: jruby-1.7 diff --git a/script/ci_functions.sh b/script/ci_functions.sh index ddd6c9566..3a51d623b 100644 --- a/script/ci_functions.sh +++ b/script/ci_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2020-12-27T14:29:50+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-08T09:17:14+00: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: diff --git a/script/clone_all_rspec_repos b/script/clone_all_rspec_repos index 54ab1d386..82f6e55db 100755 --- a/script/clone_all_rspec_repos +++ b/script/clone_all_rspec_repos @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2020-12-27T14:29:50+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-08T09:17:14+00: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 diff --git a/script/cucumber.sh b/script/cucumber.sh new file mode 100755 index 000000000..fb01fe858 --- /dev/null +++ b/script/cucumber.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# This file was generated on 2021-01-08T09:17:14+00: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 + +run_cukes diff --git a/script/functions.sh b/script/functions.sh index f0f587f01..bebbbbd02 100644 --- a/script/functions.sh +++ b/script/functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2020-12-27T14:29:50+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-08T09:17:14+00: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 )" diff --git a/script/legacy_setup.sh b/script/legacy_setup.sh new file mode 100755 index 000000000..7adca8c27 --- /dev/null +++ b/script/legacy_setup.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# This file was generated on 2021-01-08T09:17:14+00: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 + +bundle install --standalone --binstubs + +if [ -x ./bin/rspec ]; then + echo "RSpec bin detected" +else + if [ -x ./exe/rspec ]; then + cp ./exe/rspec ./bin/rspec + echo "RSpec restored from exe" + else + echo "No RSpec bin available" + exit 1 + fi +fi diff --git a/script/predicate_functions.sh b/script/predicate_functions.sh index d4bf05597..89ae61793 100644 --- a/script/predicate_functions.sh +++ b/script/predicate_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2020-12-27T14:29:50+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-08T09:17:14+00: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 { diff --git a/script/run_build b/script/run_build index 8a8fc88ed..572520d2c 100755 --- a/script/run_build +++ b/script/run_build @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2020-12-27T14:29:50+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-08T09:17:14+00: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 diff --git a/script/update_rubygems_and_install_bundler b/script/update_rubygems_and_install_bundler index 007992f08..a9e7f3df2 100755 --- a/script/update_rubygems_and_install_bundler +++ b/script/update_rubygems_and_install_bundler @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2020-12-27T14:29:50+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-08T09:17:14+00: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 From a6c4270ca97011323dafded3fa82d9c5f50d5eb1 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Sat, 2 Jan 2021 18:35:44 +0000 Subject: [PATCH 02/11] Ignore extra JRuby line from 1.7 --- lib/rspec/support/spec/shell_out.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rspec/support/spec/shell_out.rb b/lib/rspec/support/spec/shell_out.rb index d9d2afcaf..864e540b3 100644 --- a/lib/rspec/support/spec/shell_out.rb +++ b/lib/rspec/support/spec/shell_out.rb @@ -92,7 +92,7 @@ def strip_known_warnings(input) if Ruby.jruby? def filter(output) output.each_line.reject do |line| - line.include?("lib/ruby/shared/rubygems/defaults/jruby") + line.include?("lib/ruby/shared/rubygems") end.join($/) end else From c88e2c429674b17a93eb8846fa4f0b9bc5afcf93 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Mon, 4 Jan 2021 08:41:36 +0000 Subject: [PATCH 03/11] Expand JRuby pending check to exclude 1.7 --- spec/rspec/support/ruby_features_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/rspec/support/ruby_features_spec.rb b/spec/rspec/support/ruby_features_spec.rb index 942041f37..d9622a5fb 100644 --- a/spec/rspec/support/ruby_features_spec.rb +++ b/spec/rspec/support/ruby_features_spec.rb @@ -165,7 +165,7 @@ def ripper_can_parse_source_referencing_keyword_arguments? end it 'returns whether Ripper is correctly implemented in the current environment' do - if RSpec::Support::Ruby.jruby? && RSpec::Support::Ruby.jruby_version < '9.2.1.0' + if RSpec::Support::Ruby.jruby? && RSpec::Support::Ruby.jruby_version.between?('9.0.0.0', '9.2.1.0') pending "Ripper is not supported on JRuby 9.1.17.0 despite this tests claims" end expect(RubyFeatures.ripper_supported?).to eq(ripper_is_implemented? && ripper_works_correctly?) From d8604d5a06b4b957db66eeba7b62f7d35907ddf4 Mon Sep 17 00:00:00 2001 From: Phil Pirozhkov Date: Thu, 31 Dec 2020 01:50:03 +0300 Subject: [PATCH 04/11] Fix simplecov source file filter simplecov 0.20.0 does filtering with abosulute file paths. We were not excluding `bundle` directory. Before (https://github.com/rspec/rspec-support/runs/1627962469) ``` Coverage report generated for RSpec to /home/runner/work/rspec-support/rspec-support/coverage. 956 / 1444 LOC (66.2%) covered. Coverage report generated for RSpec to /home/runner/work/rspec-support/rspec-expectations/coverage. 3116 / 3596 LOC (86.65%) covered. ``` After (https://github.com/rspec/rspec-support/pull/480/checks?check_run_id=1628102829) ``` Coverage report generated for RSpec to /home/runner/work/rspec-support/rspec-support/coverage. 519 / 544 LOC (95.4%) covered. Coverage report generated for RSpec to /home/runner/work/rspec-support/rspec-expectations/coverage. 2767 / 2797 LOC (98.93%) covered. ``` Debug output, excerpt from `coverage/index.html` (https://github.com/rspec/rspec-expectations/pull/1273/checks?check_run_id=1628049675): ``` ...bundle/ruby/2.7.0/gems/diff-lcs-1.4.4/lib/diff/lcs.rb">bundle/ruby/2.7.0/gems/diff-lcs-1.4.4/lib/diff/lcs.rb ... 33.08 % ``` --- lib/rspec/support/spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rspec/support/spec.rb b/lib/rspec/support/spec.rb index d914b1044..b53829a98 100644 --- a/lib/rspec/support/spec.rb +++ b/lib/rspec/support/spec.rb @@ -65,8 +65,8 @@ def self.setup_simplecov(&block) def self.start_simplecov(&block) SimpleCov.start do - add_filter "./bundle/" - add_filter "./tmp/" + add_filter "bundle/" + add_filter "tmp/" add_filter do |source_file| # Filter out `spec` directory except when it is under `lib` # (as is the case in rspec-support) From 34968a4c5c21d863d76b1677e50c4b92d0cc4580 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Fri, 22 Jan 2021 11:01:16 +0000 Subject: [PATCH 05/11] Backported pinned gems --- Gemfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 3652d838c..b19de7d41 100644 --- a/Gemfile +++ b/Gemfile @@ -29,14 +29,18 @@ end if RUBY_VERSION < '2.3.0' && !!(RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/) gem "childprocess", "< 1.0.0" +elsif RUBY_VERSION < '2.0.0' + gem "childprocess", "< 1.0.0" elsif RUBY_VERSION < '2.3.0' gem "childprocess", "< 3.0.0" else gem "childprocess", ">= 3.0.0" end -### dep for ci/coverage -gem 'simplecov', '~> 0.8' +group :coverage do + ### dep for ci/coverage + gem 'simplecov', '~> 0.8' +end if RUBY_VERSION < '2.0.0' || RUBY_ENGINE == 'java' gem 'json', '< 2.0.0' # is a dependency of simplecov From 34f6c85b3771d376c3411265512cfa7f13449576 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Fri, 22 Jan 2021 11:27:18 +0000 Subject: [PATCH 06/11] Updated ci build scripts (from rspec-dev)3-10-maintenance --- .github/workflows/ci.yml | 18 ++++++++++++++++-- .rubocop_rspec_base.yml | 2 +- .travis.yml | 7 +------ script/ci_functions.sh | 2 +- script/clone_all_rspec_repos | 2 +- script/cucumber.sh | 2 +- script/functions.sh | 2 +- script/legacy_setup.sh | 4 ++-- script/predicate_functions.sh | 2 +- script/run_build | 3 ++- script/update_rubygems_and_install_bundler | 2 +- 11 files changed, 28 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76ea6108a..5f80b4737 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -# This file was generated on 2021-01-08T09:17:14+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-22T11:27:18+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. name: RSpec CI @@ -70,7 +70,9 @@ jobs: legacy: name: Legacy Ruby Builds (${{ matrix.container.version }}) runs-on: ubuntu-20.04 - container: ${{ matrix.container.tag }} + container: + image: ${{ matrix.container.tag }} + options: ${{ matrix.container.options || '--add-host github-complains-if-this-is-empty.com:127.0.0.1' }} strategy: fail-fast: false matrix: @@ -79,13 +81,25 @@ jobs: tag: rspec/ci:2.0.0 - version: "1.9.3" tag: rspec/ci:1.9.3 + - version: "1.9.2" + tag: rspec/ci:1.9.2 + options: "--add-host rubygems.org:151.101.0.70 --add-host api.rubygems.org:151.101.0.70" + - version: "REE" + tag: rspec/ci:ree + options: "--add-host rubygems.org:151.101.0.70 --add-host api.rubygems.org:151.101.0.70" - version: "JRuby 1.7" tag: rspec/ci:jruby-1.7 + - version: "JRuby 1.7 1.8 mode" + tag: rspec/ci:jruby-1.7 + jruby_opts: '--dev --1.8' + pre: gem uninstall jruby-openssl + options: "--add-host rubygems.org:151.101.0.70 --add-host api.rubygems.org:151.101.0.70" env: LEGACY_CI: true JRUBY_OPTS: ${{ matrix.container.jruby_opts || '--dev' }} steps: - uses: actions/checkout@v2 + - run: ${{ matrix.container.pre }} - run: script/legacy_setup.sh - run: bundle exec bin/rspec - run: bundle exec script/cucumber.sh diff --git a/.rubocop_rspec_base.yml b/.rubocop_rspec_base.yml index 3984b481f..bc2e4a37b 100644 --- a/.rubocop_rspec_base.yml +++ b/.rubocop_rspec_base.yml @@ -1,4 +1,4 @@ -# This file was generated on 2021-01-08T09:17:14+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-22T11:27:18+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. # This file contains defaults for RSpec projects. Individual projects diff --git a/.travis.yml b/.travis.yml index 06b88984a..5a531c5f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -# This file was generated on 2021-01-08T09:17:14+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-22T11:27:18+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. # In order to install old Rubies, we need to use old Ubuntu distibution. @@ -16,12 +16,7 @@ bundler_args: "--binstubs --standalone --without documentation --path ../bundle" script: "script/run_build" rvm: - 1.8.7 - - 1.9.2 - - ree matrix: - include: - - rvm: jruby-1.7 - env: JRUBY_OPTS='--dev --1.8' fast_finish: true branches: only: diff --git a/script/ci_functions.sh b/script/ci_functions.sh index 3a51d623b..1038e06f5 100644 --- a/script/ci_functions.sh +++ b/script/ci_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2021-01-08T09:17:14+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-22T11:27:18+00: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: diff --git a/script/clone_all_rspec_repos b/script/clone_all_rspec_repos index 82f6e55db..f9e2d57bd 100755 --- a/script/clone_all_rspec_repos +++ b/script/clone_all_rspec_repos @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2021-01-08T09:17:14+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-22T11:27:18+00: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 diff --git a/script/cucumber.sh b/script/cucumber.sh index fb01fe858..7a7c689d9 100755 --- a/script/cucumber.sh +++ b/script/cucumber.sh @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2021-01-08T09:17:14+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-22T11:27:18+00: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 diff --git a/script/functions.sh b/script/functions.sh index bebbbbd02..4ed113771 100644 --- a/script/functions.sh +++ b/script/functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2021-01-08T09:17:14+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-22T11:27:18+00: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 )" diff --git a/script/legacy_setup.sh b/script/legacy_setup.sh index 7adca8c27..79e7c3bac 100755 --- a/script/legacy_setup.sh +++ b/script/legacy_setup.sh @@ -1,11 +1,11 @@ #!/bin/bash -# This file was generated on 2021-01-08T09:17:14+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-22T11:27:18+00: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 -bundle install --standalone --binstubs +bundle install --standalone --binstubs --without coverage documentation if [ -x ./bin/rspec ]; then echo "RSpec bin detected" diff --git a/script/predicate_functions.sh b/script/predicate_functions.sh index 89ae61793..2c7fea3da 100644 --- a/script/predicate_functions.sh +++ b/script/predicate_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2021-01-08T09:17:14+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-22T11:27:18+00: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 { diff --git a/script/run_build b/script/run_build index 572520d2c..99dbf8e30 100755 --- a/script/run_build +++ b/script/run_build @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2021-01-08T09:17:14+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-22T11:27:18+00: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 @@ -30,6 +30,7 @@ fi if supports_cross_build_checks; then fold "one-by-one specs" run_specs_one_by_one + export NO_COVERAGE=true run_all_spec_suites else echo "Skipping the rest of the build on non-MRI rubies" diff --git a/script/update_rubygems_and_install_bundler b/script/update_rubygems_and_install_bundler index a9e7f3df2..9a5d90033 100755 --- a/script/update_rubygems_and_install_bundler +++ b/script/update_rubygems_and_install_bundler @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2021-01-08T09:17:14+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-22T11:27:18+00: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 From b9b3a63092a4800077a677cf94516472e6b64896 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Fri, 22 Jan 2021 20:05:02 +0000 Subject: [PATCH 07/11] Updated ci build scripts (from rspec-dev)3-10-maintenance --- .github/workflows/ci.yml | 5 ++++- .rubocop_rspec_base.yml | 2 +- script/ci_functions.sh | 2 +- script/clone_all_rspec_repos | 2 +- script/cucumber.sh | 2 +- script/functions.sh | 2 +- script/legacy_setup.sh | 2 +- script/predicate_functions.sh | 2 +- script/run_build | 2 +- script/update_rubygems_and_install_bundler | 2 +- 10 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f80b4737..01c2904a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -# This file was generated on 2021-01-22T11:27:18+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-22T20:05:01+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. name: RSpec CI @@ -84,6 +84,9 @@ jobs: - version: "1.9.2" tag: rspec/ci:1.9.2 options: "--add-host rubygems.org:151.101.0.70 --add-host api.rubygems.org:151.101.0.70" + - version: "1.8.7" + tag: rspec/ci:1.8.7 + options: "--add-host rubygems.org:151.101.0.70 --add-host api.rubygems.org:151.101.0.70" - version: "REE" tag: rspec/ci:ree options: "--add-host rubygems.org:151.101.0.70 --add-host api.rubygems.org:151.101.0.70" diff --git a/.rubocop_rspec_base.yml b/.rubocop_rspec_base.yml index bc2e4a37b..09d20e02e 100644 --- a/.rubocop_rspec_base.yml +++ b/.rubocop_rspec_base.yml @@ -1,4 +1,4 @@ -# This file was generated on 2021-01-22T11:27:18+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-22T20:05:01+00:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. # This file contains defaults for RSpec projects. Individual projects diff --git a/script/ci_functions.sh b/script/ci_functions.sh index 1038e06f5..c45d19a41 100644 --- a/script/ci_functions.sh +++ b/script/ci_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2021-01-22T11:27:18+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-22T20:05:01+00: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: diff --git a/script/clone_all_rspec_repos b/script/clone_all_rspec_repos index f9e2d57bd..fdc9a2155 100755 --- a/script/clone_all_rspec_repos +++ b/script/clone_all_rspec_repos @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2021-01-22T11:27:18+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-22T20:05:01+00: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 diff --git a/script/cucumber.sh b/script/cucumber.sh index 7a7c689d9..3f8b0f0bd 100755 --- a/script/cucumber.sh +++ b/script/cucumber.sh @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2021-01-22T11:27:18+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-22T20:05:01+00: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 diff --git a/script/functions.sh b/script/functions.sh index 4ed113771..e752bcbb5 100644 --- a/script/functions.sh +++ b/script/functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2021-01-22T11:27:18+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-22T20:05:01+00: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 )" diff --git a/script/legacy_setup.sh b/script/legacy_setup.sh index 79e7c3bac..0ceed563d 100755 --- a/script/legacy_setup.sh +++ b/script/legacy_setup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2021-01-22T11:27:18+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-22T20:05:01+00: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 diff --git a/script/predicate_functions.sh b/script/predicate_functions.sh index 2c7fea3da..ffdc5755d 100644 --- a/script/predicate_functions.sh +++ b/script/predicate_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2021-01-22T11:27:18+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-22T20:05:01+00: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 { diff --git a/script/run_build b/script/run_build index 99dbf8e30..ea5a99e7a 100755 --- a/script/run_build +++ b/script/run_build @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2021-01-22T11:27:18+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-22T20:05:01+00: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 diff --git a/script/update_rubygems_and_install_bundler b/script/update_rubygems_and_install_bundler index 9a5d90033..d19258b7d 100755 --- a/script/update_rubygems_and_install_bundler +++ b/script/update_rubygems_and_install_bundler @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2021-01-22T11:27:18+00:00 from the rspec-dev repo. +# This file was generated on 2021-01-22T20:05:01+00: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 From 49296c8a4fc6f3724d3e220acbc6de0386dda2d2 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Fri, 22 Jan 2021 20:12:48 +0000 Subject: [PATCH 08/11] Remove .travis.yml --- .travis.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5a531c5f8..000000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -# This file was generated on 2021-01-22T11:27:18+00:00 from the rspec-dev repo. -# DO NOT modify it by hand as your changes will get lost the next time it is generated. - -# In order to install old Rubies, we need to use old Ubuntu distibution. -dist: trusty -language: ruby -email: false -cache: - directories: - - ../bundle -before_install: - - "script/update_rubygems_and_install_bundler" - - unset _JAVA_OPTIONS - - "script/clone_all_rspec_repos" -bundler_args: "--binstubs --standalone --without documentation --path ../bundle" -script: "script/run_build" -rvm: - - 1.8.7 -matrix: - fast_finish: true -branches: - only: - - main - - /^\d+-\d+-maintenance$/ - - /^\d+-\d+-dev$/ From 50a45555738a82f86a9f2cd5211f37c00055134d Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Fri, 22 Jan 2021 20:56:31 +0000 Subject: [PATCH 09/11] Update build status --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d0ae3afda..2cc9a2a50 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# RSpec::Support +# RSpec::Support [![Build Status](https://github.com/rspec/rspec-support/workflows/RSpec%20CI/badge.svg?branch=3-10-maintenance)](https://github.com/rspec/rspec-support/actions) `RSpec::Support` provides common functionality to `RSpec::Core`, `RSpec::Expectations` and `RSpec::Mocks`. It is considered From b39cedde1ab90efeb45c5fa1a995d190b50b5e34 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Thu, 28 Jan 2021 22:34:37 +0000 Subject: [PATCH 10/11] Merge pull request #492 from rspec/bugfix-for-jruby Prevent JRuby build failure by sending to Kernel.require --- lib/rspec/support.rb | 7 ++++++- script/update_rubygems_and_install_bundler | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/rspec/support.rb b/lib/rspec/support.rb index 4bbbc64cd..b85eae3c2 100644 --- a/lib/rspec/support.rb +++ b/lib/rspec/support.rb @@ -14,7 +14,12 @@ module Support def self.define_optimized_require_for_rspec(lib, &require_relative) name = "require_rspec_#{lib}" - if Kernel.respond_to?(:require_relative) + if RUBY_PLATFORM == 'java' && !Kernel.respond_to?(:require) + # JRuby 9.1.17.0 has developed a regression for require + (class << self; self; end).__send__(:define_method, name) do |f| + Kernel.send(:require, "rspec/#{lib}/#{f}") + end + elsif Kernel.respond_to?(:require_relative) (class << self; self; end).__send__(:define_method, name) do |f| require_relative.call("#{lib}/#{f}") end diff --git a/script/update_rubygems_and_install_bundler b/script/update_rubygems_and_install_bundler index d19258b7d..546536180 100755 --- a/script/update_rubygems_and_install_bundler +++ b/script/update_rubygems_and_install_bundler @@ -13,3 +13,8 @@ else gem update --system '2.7.8' gem install bundler -v '1.17.3' fi + +echo "Setup complete" +ruby -v +gem -v +bundler -v From 76f13aab0506f8aa175795d456e1afa6e8d86644 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Thu, 28 Jan 2021 22:59:26 +0000 Subject: [PATCH 11/11] v3.10.2 --- Changelog.md | 8 ++++++++ lib/rspec/support/version.rb | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 44a942df0..9b56b6b3d 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,11 @@ +### 3.10.2 / 2021-01-28 +[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.10.1...v3.10.2) + +Bug Fixes: + +* Fix issue with `RSpec::Support.define_optimized_require_for_rspec` on JRuby + 9.1.17.0 (Jon Rowe, #492) + ### 3.10.1 / 2020-12-27 [Full Changelog](http://github.com/rspec/rspec-support/compare/v3.10.0...v3.10.1) diff --git a/lib/rspec/support/version.rb b/lib/rspec/support/version.rb index 0c399153f..8c7cffc7b 100644 --- a/lib/rspec/support/version.rb +++ b/lib/rspec/support/version.rb @@ -1,7 +1,7 @@ module RSpec module Support module Version - STRING = '3.10.1' + STRING = '3.10.2' end end end