From 15b8bda5a47126a493a91fc8efeb6939d761dd31 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Mon, 15 Jul 2024 21:58:17 +0100 Subject: [PATCH] Add workaround for cucumber --- ci/script/functions.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ci/script/functions.sh b/ci/script/functions.sh index b13d0e3..c77abcc 100644 --- a/ci/script/functions.sh +++ b/ci/script/functions.sh @@ -65,6 +65,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`.