From 1c1b2119cf02704cba479735cf7c529c38d0ca3f Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Mon, 15 Jul 2024 22:27:33 +0100 Subject: [PATCH 1/2] Updated ci build scripts (from rspec-dev) 3-13 --- .github/dependabot.yml | 2 +- .github/workflows/ci.yml | 2 +- .rubocop_rspec_base.yml | 2 +- script/ci_functions.sh | 2 +- script/clone_all_rspec_repos | 2 +- script/cucumber.sh | 2 +- script/functions.sh | 9 ++++++++- script/legacy_setup.sh | 2 +- script/predicate_functions.sh | 2 +- script/run_build | 2 +- script/run_rubocop | 2 +- script/update_rubygems_and_install_bundler | 2 +- 12 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c987b702d..c8d6ee094 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,4 +1,4 @@ -# This file was generated on 2024-07-09T08:58:35+02:00 from the rspec-dev repo. +# This file was generated on 2024-07-15T22:27:33+01: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: 2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4b75a4e9..aa95b8776 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -# This file was generated on 2024-07-09T08:58:35+02:00 from the rspec-dev repo. +# This file was generated on 2024-07-15T22:27:33+01: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 diff --git a/.rubocop_rspec_base.yml b/.rubocop_rspec_base.yml index 9212f012f..49b4c1f47 100644 --- a/.rubocop_rspec_base.yml +++ b/.rubocop_rspec_base.yml @@ -1,4 +1,4 @@ -# This file was generated on 2024-07-09T08:58:35+02:00 from the rspec-dev repo. +# This file was generated on 2024-07-15T22:27:33+01: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 2f19950ce..1e93b3079 100644 --- a/script/ci_functions.sh +++ b/script/ci_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2024-07-09T08:58:35+02:00 from the rspec-dev repo. +# This file was generated on 2024-07-15T22:27:33+01: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 2c8ce62c6..fdfdf341c 100755 --- a/script/clone_all_rspec_repos +++ b/script/clone_all_rspec_repos @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2024-07-09T08:58:35+02:00 from the rspec-dev repo. +# This file was generated on 2024-07-15T22:27:33+01: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 b465e7f30..3e3ce5bb4 100755 --- a/script/cucumber.sh +++ b/script/cucumber.sh @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2024-07-09T08:58:35+02:00 from the rspec-dev repo. +# This file was generated on 2024-07-15T22:27:33+01: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 c9a5d36e3..d715b9c16 100644 --- a/script/functions.sh +++ b/script/functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2024-07-09T08:58:35+02:00 from the rspec-dev repo. +# This file was generated on 2024-07-15T22:27:33+01: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 )" @@ -68,6 +68,13 @@ function run_cukes { RUBYOPT="-I${PWD}/../bundle -rbundler/setup" \ PATH="${PWD}/bin:$PATH" \ bin/cucumber --strict + elif is_ruby_head; then + # This is a monkey patch to fix an issue with cucumber using outdated hash syntax, remove when cucumber is updated or ruby 3.4 released + sed -i '$i\class Hash; alias :__initialize :initialize; def initialize(*args, **_kw, &block) = __initialize(*args, &block); end' bin/cucumber + + RUBYOPT="${RUBYOPT} -I${PWD}/../bundle -rbundler/setup" \ + PATH="${PWD}/bin:$PATH" \ + bin/cucumber --strict else # Prepare RUBYOPT for scenarios that are shelling out to ruby, # and PATH for those that are using `rspec` or `rake`. diff --git a/script/legacy_setup.sh b/script/legacy_setup.sh index e0804b342..635c77ab9 100755 --- a/script/legacy_setup.sh +++ b/script/legacy_setup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2024-07-09T08:58:35+02:00 from the rspec-dev repo. +# This file was generated on 2024-07-15T22:27:33+01: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 d03d71e8b..a9b928b41 100644 --- a/script/predicate_functions.sh +++ b/script/predicate_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2024-07-09T08:58:35+02:00 from the rspec-dev repo. +# This file was generated on 2024-07-15T22:27:33+01: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 a31b04040..70a4640dd 100755 --- a/script/run_build +++ b/script/run_build @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2024-07-09T08:58:35+02:00 from the rspec-dev repo. +# This file was generated on 2024-07-15T22:27:33+01: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/run_rubocop b/script/run_rubocop index 26e356ab1..be676538b 100755 --- a/script/run_rubocop +++ b/script/run_rubocop @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2024-07-09T08:58:35+02:00 from the rspec-dev repo. +# This file was generated on 2024-07-15T22:27:33+01: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 cc5764f13..c9fa78d63 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 2024-07-09T08:58:35+02:00 from the rspec-dev repo. +# This file was generated on 2024-07-15T22:27:33+01: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 167d9e5161bdd6f6b8efa8ca20b389205041f25d Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Mon, 15 Jul 2024 22:34:32 +0100 Subject: [PATCH 2/2] Fix for Ruby 3.4 output in cucumber scenarios --- features/step_definitions/additional_cli_steps.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/features/step_definitions/additional_cli_steps.rb b/features/step_definitions/additional_cli_steps.rb index b896a3adf..dc23738fc 100644 --- a/features/step_definitions/additional_cli_steps.rb +++ b/features/step_definitions/additional_cli_steps.rb @@ -9,6 +9,8 @@ table.raw.flatten.each do |string| if RUBY_VERSION == '1.8.7' && string =~ /\{.+=>.+\}/ warn "Skipping checking #{string} on 1.8.7 because hash ordering is not consistent" + elsif RUBY_VERSION.to_f > 3.3 + expect(all_output).to include_output_string string.gsub('undefined method `', "undefined method '") else expect(all_output).to include_output_string string end