From 799bd027b6dc153bd4f00a31eb73f0bb834aac12 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 9 Jul 2024 12:48:37 +0100 Subject: [PATCH 01/17] Pin CCK to passing version --- cucumber.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cucumber.gemspec b/cucumber.gemspec index cd97804cd..1ccc3e54e 100644 --- a/cucumber.gemspec +++ b/cucumber.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |s| s.add_dependency 'multi_test', '~> 1.1' s.add_dependency 'sys-uname', '~> 1.2' - s.add_development_dependency 'cucumber-compatibility-kit', '~> 15.0' + s.add_development_dependency 'cucumber-compatibility-kit', '15.0' # Only needed whilst we are testing the formatters. Can be removed once we remove tests for those s.add_development_dependency 'nokogiri', '~> 1.14' s.add_development_dependency 'rake', '~> 13.1' From cf30f7f5d0539e0adc21d4826adf4473c2726470 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 9 Jul 2024 12:48:43 +0100 Subject: [PATCH 02/17] Add new steps --- .../examples-tables/examples-tables.feature.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/compatibility/features/examples-tables/examples-tables.feature.rb b/compatibility/features/examples-tables/examples-tables.feature.rb index 9b0bcd5a6..f346c974e 100644 --- a/compatibility/features/examples-tables/examples-tables.feature.rb +++ b/compatibility/features/examples-tables/examples-tables.feature.rb @@ -4,6 +4,10 @@ @count = initial_count end +Given('there are {int} friends') do |initial_friends| + @friends = initial_friends +end + When('I eat {int} cucumbers') do |eat_count| @count -= eat_count end @@ -11,3 +15,9 @@ Then('I should have {int} cucumbers') do |expected_count| expect(@count).to eq(expected_count) end + +Then('each person can eat {int} cucumbers') do |expected_share| + share = (@count / (1 + @friends)).floor + + expect(share).to eq(expected_share) +end From 342bc7909b0a95425f7b8773c4d0145b22bf9a96 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 9 Jul 2024 13:11:32 +0100 Subject: [PATCH 03/17] Spike solution for loading files from cck --- compatibility/features/attachments/attachments.feature.rb | 5 ++++- compatibility/features/attachments/env.rb | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 compatibility/features/attachments/env.rb diff --git a/compatibility/features/attachments/attachments.feature.rb b/compatibility/features/attachments/attachments.feature.rb index 21de6c26a..24efdaac1 100644 --- a/compatibility/features/attachments/attachments.feature.rb +++ b/compatibility/features/attachments/attachments.feature.rb @@ -29,7 +29,10 @@ end When('a PNG image is attached') do - attach(File.open("#{__dir__}/cucumber.png"), 'image/png') + path = "#{__dir__}/cucumber.png" + gem_path = Gem.loaded_specs['cucumber-compatibility-kit'].full_gem_path + alternate_path = "#{gem_path}/features/attachments/cucumber.png" + attach(File.open(alternate_path), 'image/png') end When('a PDF document is attached and renamed') do diff --git a/compatibility/features/attachments/env.rb b/compatibility/features/attachments/env.rb new file mode 100644 index 000000000..ce72466cb --- /dev/null +++ b/compatibility/features/attachments/env.rb @@ -0,0 +1,3 @@ +puts 'hi' + +#$gem_path = CCK::Examples.feature_code_for('attachments') From ccc0b5abf35841e2d73fe9d1c591f7c76d6c0ccf Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 9 Jul 2024 13:14:59 +0100 Subject: [PATCH 04/17] Remove env.rb - add note about bloat of errors checking being 200+ blank objects --- compatibility/features/attachments/env.rb | 3 --- compatibility/support/cck/messages_comparator.rb | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 compatibility/features/attachments/env.rb diff --git a/compatibility/features/attachments/env.rb b/compatibility/features/attachments/env.rb deleted file mode 100644 index ce72466cb..000000000 --- a/compatibility/features/attachments/env.rb +++ /dev/null @@ -1,3 +0,0 @@ -puts 'hi' - -#$gem_path = CCK::Examples.feature_code_for('attachments') diff --git a/compatibility/support/cck/messages_comparator.rb b/compatibility/support/cck/messages_comparator.rb index e0f49c4d1..31dbeb473 100644 --- a/compatibility/support/cck/messages_comparator.rb +++ b/compatibility/support/cck/messages_comparator.rb @@ -51,6 +51,7 @@ def compare_message(detected, expected) return if ignorable?(detected) return if incomparable?(detected) + # TODO: This needs refactoring as it's becoming rather large and bloated all_errors << CCK::KeysChecker.compare(detected, expected) compare_sub_messages(detected, expected) end From 18b9166412fd748424cf9a6f9292c0351f244c4e Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 9 Jul 2024 13:18:45 +0100 Subject: [PATCH 05/17] Use path in gem proper for assets --- .../features/attachments/attachments.feature.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/compatibility/features/attachments/attachments.feature.rb b/compatibility/features/attachments/attachments.feature.rb index 24efdaac1..cc796c321 100644 --- a/compatibility/features/attachments/attachments.feature.rb +++ b/compatibility/features/attachments/attachments.feature.rb @@ -3,6 +3,10 @@ # This blank hook has been re-added in. See https://github.com/cucumber/compatibility-kit/issues/83 for more details Before { nil } +def gem_path + Gem.loaded_specs['cucumber-compatibility-kit'].full_gem_path +end + When('the string {string} is attached as {string}') do |text, media_type| attach(text, media_type) end @@ -25,16 +29,13 @@ end When('a JPEG image is attached') do - attach(File.open("#{__dir__}/cucumber.jpeg"), 'image/jpeg') + attach(File.open("#{gem_path}/features/attachments/cucumber.jpeg"), 'image/jpeg') end When('a PNG image is attached') do - path = "#{__dir__}/cucumber.png" - gem_path = Gem.loaded_specs['cucumber-compatibility-kit'].full_gem_path - alternate_path = "#{gem_path}/features/attachments/cucumber.png" - attach(File.open(alternate_path), 'image/png') + attach(File.open("#{gem_path}/features/attachments/cucumber.png"), 'image/png') end When('a PDF document is attached and renamed') do - attach(File.open("#{__dir__}/document.pdf"), 'document/pdf', 'renamed.pdf') + attach(File.open("#{gem_path}/features/attachments/document.pdf"), 'document/pdf', 'renamed.pdf') end From f180169dab231bd66f4c7f62234d72d8408f7500 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 9 Jul 2024 13:20:19 +0100 Subject: [PATCH 06/17] Remove legacy duplicated assets and DRY up path ref --- .../features/attachments/attachments.feature.rb | 10 +++++----- .../features/attachments/cucumber.jpeg | Bin 1444 -> 0 bytes compatibility/features/attachments/cucumber.png | Bin 1739 -> 0 bytes compatibility/features/attachments/document.pdf | Bin 10060 -> 0 bytes 4 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 compatibility/features/attachments/cucumber.jpeg delete mode 100644 compatibility/features/attachments/cucumber.png delete mode 100644 compatibility/features/attachments/document.pdf diff --git a/compatibility/features/attachments/attachments.feature.rb b/compatibility/features/attachments/attachments.feature.rb index cc796c321..785ce9baa 100644 --- a/compatibility/features/attachments/attachments.feature.rb +++ b/compatibility/features/attachments/attachments.feature.rb @@ -3,8 +3,8 @@ # This blank hook has been re-added in. See https://github.com/cucumber/compatibility-kit/issues/83 for more details Before { nil } -def gem_path - Gem.loaded_specs['cucumber-compatibility-kit'].full_gem_path +def cck_asset_path + "#{Gem.loaded_specs['cucumber-compatibility-kit'].full_gem_path}/features/attachments" end When('the string {string} is attached as {string}') do |text, media_type| @@ -29,13 +29,13 @@ def gem_path end When('a JPEG image is attached') do - attach(File.open("#{gem_path}/features/attachments/cucumber.jpeg"), 'image/jpeg') + attach(File.open("#{cck_asset_path}/cucumber.jpeg"), 'image/jpeg') end When('a PNG image is attached') do - attach(File.open("#{gem_path}/features/attachments/cucumber.png"), 'image/png') + attach(File.open("#{cck_asset_path}/cucumber.png"), 'image/png') end When('a PDF document is attached and renamed') do - attach(File.open("#{gem_path}/features/attachments/document.pdf"), 'document/pdf', 'renamed.pdf') + attach(File.open("#{cck_asset_path}/document.pdf"), 'document/pdf', 'renamed.pdf') end diff --git a/compatibility/features/attachments/cucumber.jpeg b/compatibility/features/attachments/cucumber.jpeg deleted file mode 100644 index e833d6c77d33e620ae49d01c6341ad7e5543bbd1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1444 zcmex=ma3|jiIItm zOAI4iKMQ#V{6EAX$ibk;pvlar#K0uT$SlbC{|JK&&=V}oKwrQC2Ma43I|Cy#)Bjrx z93W3JFj%5R(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+oN(d8?&{>zqn{JdOYJ zpDR~h9MUx8cipWf_R8znWtJ&uK2N+Xmx{{Kw?qP#Uw diff --git a/compatibility/features/attachments/cucumber.png b/compatibility/features/attachments/cucumber.png deleted file mode 100644 index 2760899aa0ce16aeaaea93d3118a32e7ac5bec8d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1739 zcmV;+1~mDJP)G+r@kQ0VOJz1t=x5=pe3owlM@Ei<#*ZtpGI zgKd}Iv=WU6L@O5L5Qs#)gFvk*7OQ`VCsjOx5<>9^RV-lQA0`qL#Hi6fjMC@#y`7oe zS+={g-EDP}m+f}vz4x2%_`Ec`caU@Gwv+u9&;ebh;EPxToe6TQSS7$RIEHqf|0i z0O+ z#n5`Lu?_+l5a?76FBT_ov)oVPu)W&2iyqQk6q$E2`kQlqo37e8-)c+O?QiP<=H+=W zgC{tLKe`UI8wSZ$`}IIZS7^VP!&SQ9uqqj{=4V~1HP0i=kNxUV+pBnmxV8-q#Bxu7a+-a2h-P!vK`Neu>T>`ydm{x2F*T=U zFja;RD&fUT?=ygOHKmEIjm9$XXg4i$m^A1Td}8TX_oouO^1 zftu}jxiw*Sqct@^-zMG^t)7q>c1_O=)^$NOakew|C1vwbb(rq-=>$Sb3W6-RZHa~m zCJ-n2XtkjN1C$hf07a9cuvH0K135T-J;#nfDUID~Sv*Yz!r1hE3|a|Q4_9AFEWLHK zWz~oq!$8|OVjZ(mf6Y*Z+@G&h%4HXA<`4i@t!XO}{GYwU7nxru-K+|Xtu%RHv$V5t zB%F}kxeBctB<7atq+W_2XaHsIuS|aaB@`qli21Zmg1ge~X)cg!Z$@+@T2Kf6wH3yz z&3Yvsd2vMF!t&A=G!b@&(o#XX>H~4DCJ(w*r-TNAhSk2Rta1dYR_3O9WK; zw#R~odmNn4Rrysbu1(x67Wr<38~#FiG1`n}wO&7`@#)Xk3f`-e^xfhbRWBNCp0aZ6 zG7j-w;#H4aR;4%|7`O;-+)Hl;uEM%I>mVnijiapH>2)nQ~8L|KJMiw<@G*t1yFW9;lFYc#uS`DwjogG)sqA zR1ZXz{)UVWQ#sGl0$Aj@M%qBOs8U>G?P+&{nu~!`wccEicA`NtKbHn#g?=au3r^~) z3?!GiqlV-fJj2A0p}mr}21v220F29iQ1fLV>-W%pUD-_S!;=aJIQ+*`W9=9^HPvL{ z0;-_op8_N*ciN&xk6wP@c=5J5d#{rWB-U?ag_zePQ!sYV&o8}(nae94B=$6zwdRg$ z{h^gdI-K$AkW4|MJIzg%@h!p>_RSE#rObbMsUUTO7bj4~!21~&^MANd_d&CC2wth| hfX@)Vpvv|h{{nxzjlgvW5(5AL002ovPDHLkV1gBrLk9o= diff --git a/compatibility/features/attachments/document.pdf b/compatibility/features/attachments/document.pdf deleted file mode 100644 index fc73b32aad1d5f653f80d65c1563a06ed24b9629..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10060 zcmaKy2Q*x3*T;z{AzBC$Z6bObgBb=PdM9dh#uzQSQKAdcd#}-3^e%cQdJTeTiRdMW z&NuG8?|a|!ecxGUtvP2u``ORg`}yy)X3hKH_{zc7#0idY05Ge)v48KJn093Mdu!dRv?F9bYNy@?siCP3G zWd%bbBoJ_069g_$0byf?GzWkne8R#2N2CJ+W{vBbrXM+u+sXA%a_Q*txv!JrB!nY~ z@ZFyFCT$@ljlEBSrri`7BDeeSAZ@T$_R!+ z0Q|h%s4(IvZ`58p0`9g$6&I+6bZ~+rU%?#yFmjlr3^0~YHhkX8-kKY9K_&VB zD2AVl3;M5;*>!v1sxJ9^zo@Z3v1IYVoWN$TZ9yzSE{5-Y9C-x+%FO5&MxFFAXwg0Z z`In+9DNkMnGe_VNYy@3qMoeh86L4~I3q0rK+G@bV30oZkY%rI7Z#C3#@d>(EAG{oO z&)83Gg|-PeZA}$@R4W*1;altuDkOZF=bJOgCN(a7%t?GC{?+B!|1j3m&&!>fSmfQs z)_80|T!08%C-8UuD_VXp2b*tIp!vuwPw>`>+F+liasy(I-2AIFspI_6I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K7IfP4>vC-9~U1N4}hDCiwgkaLaodXhVt;ESctnBD6jy*4Y&gj z?qG_)Xa~?8Gx2Y@!=3A&6aG#Za90o%LLmloMBI)4ciL)B#>hWt32|A8JCD1vaig-4 zl~A{pmX%P1*`WXr6IAvV$hUu()!sUyQkS(cwY?)cR1sztD6HfyfLRoU*&tASjpSK{mk-RP4*-J!x)2Z-CqECWkoo{VZh$Tr z4B-TUxp`2x{Cp^4gO3k2iYll+svr`t0bs7X82_llzfeQ}AA!LQMosz`W+!UUvKv4e za4OuRtwio8Ysx(-Ni+~AM%FS`LuhnN|M=-+IN94vH(9m9%!8xbjGtn*yYS+8?2GlV zjj^uG8YF*e&jWuN={#9&U-eE~))wQ{gfTRi?Hzl|6C;^Pw6W9Wk#D7Tu2K1Yf?|g0 z5(URNfup+Q$a<~Ia1u*GOxQzuf|UX@8^bgImn6#nV#%tCzpkvMaXR1L<4Z{DP@tXHyZUzZ`gmg%pH*Pzv$?ny0{YrO1l5I zf+THFaMay~|5GO%GXLlq6BtUqC{>}jn?D4rirPVSTMZkFJDv&vy4$;d(X^`r!W0+P z0Nl8!KKSbZK)_%gFu)Y>Pa6n@1>GG0n}6DP_)%2Pf7n1=sE+w}8x+EYqIv$^#s%X2 z?|5J+s=NNf5AwhGL7@M&E%v> m7F4yhMZHV@?B74y?H|>0M8X`9f7A-f#|y?~V31Un!u=m?NoWHA From c8d7302b9c23e405bf5a8b48b279d892ee8b69de Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 9 Jul 2024 13:21:53 +0100 Subject: [PATCH 07/17] Remove duplicate assets for hooks test --- compatibility/features/hooks/cucumber.svg | 7 ------- compatibility/features/hooks/hooks.feature.rb | 6 +++++- 2 files changed, 5 insertions(+), 8 deletions(-) delete mode 100644 compatibility/features/hooks/cucumber.svg diff --git a/compatibility/features/hooks/cucumber.svg b/compatibility/features/hooks/cucumber.svg deleted file mode 100644 index e76ff7faf..000000000 --- a/compatibility/features/hooks/cucumber.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/compatibility/features/hooks/hooks.feature.rb b/compatibility/features/hooks/hooks.feature.rb index caa444c07..2705249d6 100644 --- a/compatibility/features/hooks/hooks.feature.rb +++ b/compatibility/features/hooks/hooks.feature.rb @@ -8,6 +8,10 @@ # no-op end +def cck_asset_path + "#{Gem.loaded_specs['cucumber-compatibility-kit'].full_gem_path}/features/attachments" +end + When('a step passes') do # no-op end @@ -25,5 +29,5 @@ end After('@with-attachment') do - attach(File.open("#{__dir__}/cucumber.svg"), 'image/svg+xml') + attach(File.open("#{cck_asset_path}/cucumber.svg"), 'image/svg+xml') end From 1a10504fb34a9b82fe518cc3ecfc64bf3bf38475 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 9 Jul 2024 13:23:24 +0100 Subject: [PATCH 08/17] Remove unused retry arguments file --- compatibility/features/retry/retry.arguments.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 compatibility/features/retry/retry.arguments.txt diff --git a/compatibility/features/retry/retry.arguments.txt b/compatibility/features/retry/retry.arguments.txt deleted file mode 100644 index cf83a5556..000000000 --- a/compatibility/features/retry/retry.arguments.txt +++ /dev/null @@ -1 +0,0 @@ ---retry 2 From d958649c29a7de1f59c7239e26accfe2750e7553 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 9 Jul 2024 13:23:45 +0100 Subject: [PATCH 09/17] Fix path to hooks assets --- compatibility/features/hooks/hooks.feature.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compatibility/features/hooks/hooks.feature.rb b/compatibility/features/hooks/hooks.feature.rb index 2705249d6..2eb59a0ea 100644 --- a/compatibility/features/hooks/hooks.feature.rb +++ b/compatibility/features/hooks/hooks.feature.rb @@ -9,7 +9,7 @@ end def cck_asset_path - "#{Gem.loaded_specs['cucumber-compatibility-kit'].full_gem_path}/features/attachments" + "#{Gem.loaded_specs['cucumber-compatibility-kit'].full_gem_path}/features/hooks" end When('a step passes') do From b1970d18bd75d352d01f00e5f7df34424ae85dee Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 9 Jul 2024 13:26:48 +0100 Subject: [PATCH 10/17] Rename of steps files to closer align to ruby conventions --- .../attachments/{attachments.feature.rb => attachments_steps.rb} | 0 compatibility/features/cdata/{cdata.feature.rb => cdata_steps.rb} | 0 .../data-tables/{data-tables.feature.rb => data-tables_steps.rb} | 0 .../{examples-tables.feature.rb => examples-tables_steps.rb} | 0 compatibility/features/hooks/{hooks.feature.rb => hooks_steps.rb} | 0 .../features/minimal/{minimal.feature.rb => minimal_steps.rb} | 0 .../{parameter-types.feature.rb => parameter-types_steps.rb} | 0 .../features/pending/{pending.feature.rb => pending_steps.rb} | 0 compatibility/features/retry/{retry.feature.rb => retry_steps.rb} | 0 compatibility/features/rules/{rules.feature.rb => rules_steps.rb} | 0 .../features/skipped/{skipped.feature.rb => skipped_steps.rb} | 0 .../{stack-traces.feature.rb => stack-traces_steps.rb} | 0 .../undefined/{undefined.feature.rb => undefined_steps.rb} | 0 ...-parameter-type.feature.rb => unknown-parameter-type_steps.rb} | 0 14 files changed, 0 insertions(+), 0 deletions(-) rename compatibility/features/attachments/{attachments.feature.rb => attachments_steps.rb} (100%) rename compatibility/features/cdata/{cdata.feature.rb => cdata_steps.rb} (100%) rename compatibility/features/data-tables/{data-tables.feature.rb => data-tables_steps.rb} (100%) rename compatibility/features/examples-tables/{examples-tables.feature.rb => examples-tables_steps.rb} (100%) rename compatibility/features/hooks/{hooks.feature.rb => hooks_steps.rb} (100%) rename compatibility/features/minimal/{minimal.feature.rb => minimal_steps.rb} (100%) rename compatibility/features/parameter-types/{parameter-types.feature.rb => parameter-types_steps.rb} (100%) rename compatibility/features/pending/{pending.feature.rb => pending_steps.rb} (100%) rename compatibility/features/retry/{retry.feature.rb => retry_steps.rb} (100%) rename compatibility/features/rules/{rules.feature.rb => rules_steps.rb} (100%) rename compatibility/features/skipped/{skipped.feature.rb => skipped_steps.rb} (100%) rename compatibility/features/stack-traces/{stack-traces.feature.rb => stack-traces_steps.rb} (100%) rename compatibility/features/undefined/{undefined.feature.rb => undefined_steps.rb} (100%) rename compatibility/features/unknown-parameter-type/{unknown-parameter-type.feature.rb => unknown-parameter-type_steps.rb} (100%) diff --git a/compatibility/features/attachments/attachments.feature.rb b/compatibility/features/attachments/attachments_steps.rb similarity index 100% rename from compatibility/features/attachments/attachments.feature.rb rename to compatibility/features/attachments/attachments_steps.rb diff --git a/compatibility/features/cdata/cdata.feature.rb b/compatibility/features/cdata/cdata_steps.rb similarity index 100% rename from compatibility/features/cdata/cdata.feature.rb rename to compatibility/features/cdata/cdata_steps.rb diff --git a/compatibility/features/data-tables/data-tables.feature.rb b/compatibility/features/data-tables/data-tables_steps.rb similarity index 100% rename from compatibility/features/data-tables/data-tables.feature.rb rename to compatibility/features/data-tables/data-tables_steps.rb diff --git a/compatibility/features/examples-tables/examples-tables.feature.rb b/compatibility/features/examples-tables/examples-tables_steps.rb similarity index 100% rename from compatibility/features/examples-tables/examples-tables.feature.rb rename to compatibility/features/examples-tables/examples-tables_steps.rb diff --git a/compatibility/features/hooks/hooks.feature.rb b/compatibility/features/hooks/hooks_steps.rb similarity index 100% rename from compatibility/features/hooks/hooks.feature.rb rename to compatibility/features/hooks/hooks_steps.rb diff --git a/compatibility/features/minimal/minimal.feature.rb b/compatibility/features/minimal/minimal_steps.rb similarity index 100% rename from compatibility/features/minimal/minimal.feature.rb rename to compatibility/features/minimal/minimal_steps.rb diff --git a/compatibility/features/parameter-types/parameter-types.feature.rb b/compatibility/features/parameter-types/parameter-types_steps.rb similarity index 100% rename from compatibility/features/parameter-types/parameter-types.feature.rb rename to compatibility/features/parameter-types/parameter-types_steps.rb diff --git a/compatibility/features/pending/pending.feature.rb b/compatibility/features/pending/pending_steps.rb similarity index 100% rename from compatibility/features/pending/pending.feature.rb rename to compatibility/features/pending/pending_steps.rb diff --git a/compatibility/features/retry/retry.feature.rb b/compatibility/features/retry/retry_steps.rb similarity index 100% rename from compatibility/features/retry/retry.feature.rb rename to compatibility/features/retry/retry_steps.rb diff --git a/compatibility/features/rules/rules.feature.rb b/compatibility/features/rules/rules_steps.rb similarity index 100% rename from compatibility/features/rules/rules.feature.rb rename to compatibility/features/rules/rules_steps.rb diff --git a/compatibility/features/skipped/skipped.feature.rb b/compatibility/features/skipped/skipped_steps.rb similarity index 100% rename from compatibility/features/skipped/skipped.feature.rb rename to compatibility/features/skipped/skipped_steps.rb diff --git a/compatibility/features/stack-traces/stack-traces.feature.rb b/compatibility/features/stack-traces/stack-traces_steps.rb similarity index 100% rename from compatibility/features/stack-traces/stack-traces.feature.rb rename to compatibility/features/stack-traces/stack-traces_steps.rb diff --git a/compatibility/features/undefined/undefined.feature.rb b/compatibility/features/undefined/undefined_steps.rb similarity index 100% rename from compatibility/features/undefined/undefined.feature.rb rename to compatibility/features/undefined/undefined_steps.rb diff --git a/compatibility/features/unknown-parameter-type/unknown-parameter-type.feature.rb b/compatibility/features/unknown-parameter-type/unknown-parameter-type_steps.rb similarity index 100% rename from compatibility/features/unknown-parameter-type/unknown-parameter-type.feature.rb rename to compatibility/features/unknown-parameter-type/unknown-parameter-type_steps.rb From 63d463e1a4a9c5d7740afa15c2fbc573fa3468d2 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 9 Jul 2024 13:28:35 +0100 Subject: [PATCH 11/17] Unrestrict CCK again now fixes are in --- cucumber.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cucumber.gemspec b/cucumber.gemspec index 1ccc3e54e..cd97804cd 100644 --- a/cucumber.gemspec +++ b/cucumber.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |s| s.add_dependency 'multi_test', '~> 1.1' s.add_dependency 'sys-uname', '~> 1.2' - s.add_development_dependency 'cucumber-compatibility-kit', '15.0' + s.add_development_dependency 'cucumber-compatibility-kit', '~> 15.0' # Only needed whilst we are testing the formatters. Can be removed once we remove tests for those s.add_development_dependency 'nokogiri', '~> 1.14' s.add_development_dependency 'rake', '~> 13.1' From eac979a0aab7ba1235a5aac6ad930eb06d2141ad Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 9 Jul 2024 14:04:15 +0100 Subject: [PATCH 12/17] Bump CCK to v16 --- compatibility/cck_spec.rb | 2 +- compatibility/support/shared_examples.rb | 2 +- cucumber.gemspec | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compatibility/cck_spec.rb b/compatibility/cck_spec.rb index 37a3aec17..0aa162cd6 100644 --- a/compatibility/cck_spec.rb +++ b/compatibility/cck_spec.rb @@ -3,7 +3,7 @@ require_relative 'support/shared_examples' require_relative 'support/cck/examples' -require 'cucumber-compatibility-kit' +require 'cck/examples' describe 'Cucumber Compatibility Kit', type: :feature, cck: true do let(:cucumber_command) { 'bundle exec cucumber --publish-quiet --profile none --format message' } diff --git a/compatibility/support/shared_examples.rb b/compatibility/support/shared_examples.rb index 72dbd3efc..4c849c616 100644 --- a/compatibility/support/shared_examples.rb +++ b/compatibility/support/shared_examples.rb @@ -7,7 +7,7 @@ require_relative 'cck/helpers' require_relative 'cck/messages_comparator' -require 'cucumber-compatibility-kit' +require 'cck/helpers' RSpec.shared_examples 'cucumber compatibility kit' do include CCK::Helpers diff --git a/cucumber.gemspec b/cucumber.gemspec index cd97804cd..82707421e 100644 --- a/cucumber.gemspec +++ b/cucumber.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |s| s.add_dependency 'multi_test', '~> 1.1' s.add_dependency 'sys-uname', '~> 1.2' - s.add_development_dependency 'cucumber-compatibility-kit', '~> 15.0' + s.add_development_dependency 'cucumber-compatibility-kit', '~> 16.0' # Only needed whilst we are testing the formatters. Can be removed once we remove tests for those s.add_development_dependency 'nokogiri', '~> 1.14' s.add_development_dependency 'rake', '~> 13.1' From 89651c1572a5bd18e2585721daf61295628f9c68 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 9 Jul 2024 14:08:45 +0100 Subject: [PATCH 13/17] Remove redundant require call and fix up attachments to be v16 conformant --- compatibility/features/attachments/attachments_steps.rb | 3 --- compatibility/support/shared_examples.rb | 2 -- 2 files changed, 5 deletions(-) diff --git a/compatibility/features/attachments/attachments_steps.rb b/compatibility/features/attachments/attachments_steps.rb index 785ce9baa..d639fbdd3 100644 --- a/compatibility/features/attachments/attachments_steps.rb +++ b/compatibility/features/attachments/attachments_steps.rb @@ -1,8 +1,5 @@ # frozen_string_literal: true -# This blank hook has been re-added in. See https://github.com/cucumber/compatibility-kit/issues/83 for more details -Before { nil } - def cck_asset_path "#{Gem.loaded_specs['cucumber-compatibility-kit'].full_gem_path}/features/attachments" end diff --git a/compatibility/support/shared_examples.rb b/compatibility/support/shared_examples.rb index 4c849c616..7fb6f31b9 100644 --- a/compatibility/support/shared_examples.rb +++ b/compatibility/support/shared_examples.rb @@ -7,8 +7,6 @@ require_relative 'cck/helpers' require_relative 'cck/messages_comparator' -require 'cck/helpers' - RSpec.shared_examples 'cucumber compatibility kit' do include CCK::Helpers From 5f149a5911c86f789ed87e661900639601245141 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 9 Jul 2024 15:29:04 +0100 Subject: [PATCH 14/17] Bump minimum ruby --- cucumber.gemspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cucumber.gemspec b/cucumber.gemspec index 82707421e..054c167e2 100644 --- a/cucumber.gemspec +++ b/cucumber.gemspec @@ -19,8 +19,8 @@ Gem::Specification.new do |s| 'source_code_uri' => 'https://github.com/cucumber/cucumber-ruby' } - s.required_ruby_version = '>= 2.7' - s.required_rubygems_version = '>= 3.0.1' + s.required_ruby_version = '>= 3.0' + s.required_rubygems_version = '>= 3.2.8' s.add_dependency 'builder', '~> 3.2' s.add_dependency 'cucumber-ci-environment', '> 9', '< 11' From dc2eb3b4fc648c6dad4a74ba1e2ff412d741907b Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 9 Jul 2024 15:29:50 +0100 Subject: [PATCH 15/17] Update workflows to ruby 3.0 --- .github/workflows/release.yaml | 2 +- .github/workflows/rubocop.yaml | 2 +- .github/workflows/test.yaml | 2 +- .rubocop.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a9f5e1a2b..90f7be8d0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,7 +19,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - ruby: ["2.7", "3.0", "3.1", "3.2"] + ruby: ['3.0', '3.1', '3.2', '3.3'] include: - os: ubuntu-latest ruby: jruby-9.4 diff --git a/.github/workflows/rubocop.yaml b/.github/workflows/rubocop.yaml index de7545865..389a1ebb7 100644 --- a/.github/workflows/rubocop.yaml +++ b/.github/workflows/rubocop.yaml @@ -15,6 +15,6 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7 + ruby-version: '3.0' bundler-cache: true - run: bundle exec rubocop diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 513f24864..84fb8b029 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -17,7 +17,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - ruby: ["2.7", "3.0", "3.1", "3.2"] + ruby: ['3.0', '3.1', '3.2', '3.3'] include: - os: ubuntu-latest ruby: jruby-9.4 diff --git a/.rubocop.yml b/.rubocop.yml index 68770cc7d..7678b7c1c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -13,7 +13,7 @@ require: AllCops: NewCops: disable # Keep this inline with the lowest ruby version in the gemspec - TargetRubyVersion: 2.7 + TargetRubyVersion: 3.0 # Display cop name / style guide references DisplayCopNames: true DisplayStyleGuide: true From ea323be9c51ed2c0291dd33b2bdc6ea1e2337ae1 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 9 Jul 2024 15:34:32 +0100 Subject: [PATCH 16/17] Update rubocop to a version to avoid a bug causing execution failure and regenerate TODO --- .rubocop.yml | 7 --- .rubocop_todo.yml | 128 ++++++++++++---------------------------------- cucumber.gemspec | 2 +- 3 files changed, 34 insertions(+), 103 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 7678b7c1c..59524f3a3 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -34,13 +34,6 @@ Layout/TrailingWhitespace: - spec/cucumber/formatter/pretty_spec.rb - spec/cucumber/formatter/progress_spec.rb -# TODO: [LH] - This needs a re-review. I think we can pretty much delete / phase this out with incremental updates -# We exclude proto_world for documentation (rdoc) purpose -Lint/UselessMethodDefinition: - Enabled: true - Exclude: - - lib/cucumber/glue/proto_world.rb - # Rubocop doesn't like method names in other languages but as Cucumber supports multiple languages, this cop needs to be disabled Naming/AsciiIdentifiers: Enabled: false diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 8d2129d91..e0d2e80c1 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2024-02-01 10:58:34 UTC using RuboCop version 1.56.4. +# on 2024-07-09 14:33:36 UTC using RuboCop version 1.61.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -8,32 +8,8 @@ # TODO - [LH] -> Oct '23 - 355 files inspected, 642 offenses detected, 205 offenses autocorrectable # TODO - [LH] -> Dec '23 - 350 files inspected, 595 offenses detected, 171 offenses autocorrectable -# TODO - [LH] -> Feb '23 - 370 files inspected, 635 offenses detected, 166 offenses autocorrectable - -# Offense count: 10 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle. -# SupportedHashRocketStyles: key, separator, table -# SupportedColonStyles: key, separator, table -# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit -Layout/HashAlignment: - Exclude: - - 'lib/cucumber/cli/options.rb' - -# Offense count: 19 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: AllowInHeredoc. -Layout/TrailingWhitespace: - Exclude: - - 'lib/cucumber/multiline_argument/data_table.rb' - -# Offense count: 3 -# This cop supports safe autocorrection (--autocorrect). -Lint/AmbiguousOperator: - Exclude: - - 'lib/cucumber/multiline_argument/data_table.rb' - - 'lib/cucumber/running_test_case.rb' - - 'spec/cucumber/formatter/spec_helper.rb' +# TODO - [LH] -> Feb '24 - 370 files inspected, 635 offenses detected, 166 offenses autocorrectable +# TODO - [LH] -> Jul '24 - 370 files inspected, 637 offenses detected, 97 offenses autocorrectable # Offense count: 4 Lint/RescueException: @@ -43,6 +19,13 @@ Lint/RescueException: - 'lib/cucumber/glue/invoke_in_world.rb' - 'lib/cucumber/glue/proto_world.rb' +# Offense count: 2 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: AutoCorrect. +Lint/UselessMethodDefinition: + Exclude: + - 'lib/cucumber/glue/proto_world.rb' + # Offense count: 60 # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes. Metrics/AbcSize: @@ -57,7 +40,7 @@ Metrics/BlockLength: # Offense count: 13 # Configuration parameters: CountComments, CountAsOne. Metrics/ClassLength: - Max: 523 + Max: 515 # Offense count: 8 # Configuration parameters: AllowedMethods, AllowedPatterns. @@ -67,9 +50,9 @@ Metrics/CyclomaticComplexity: # Offense count: 74 # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. Metrics/MethodLength: - Max: 72 + Max: 64 -# Offense count: 17 +# Offense count: 16 # Configuration parameters: CountComments, CountAsOne. Metrics/ModuleLength: Max: 804 @@ -87,37 +70,14 @@ Naming/FileName: Exclude: - 'features/lib/step_definitions/iso-8859-1_steps.rb' -# Offense count: 2 +# Offense count: 1 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyleForLeadingUnderscores. # SupportedStylesForLeadingUnderscores: disallowed, required, optional Naming/MemoizedInstanceVariableName: Exclude: - - 'lib/cucumber/formatter/json.rb' - 'lib/cucumber/multiline_argument/data_table.rb' -## Offense count: 14 -## Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. -## AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to -#Naming/MethodParameterName: -# Exclude: -# - 'lib/cucumber/cli/options.rb' -# - 'lib/cucumber/formatter/ansicolor.rb' -# - 'lib/cucumber/formatter/console.rb' -# - 'lib/cucumber/gherkin/formatter/ansi_escapes.rb' -# - 'lib/cucumber/multiline_argument/data_table.rb' - -# Offense count: 8 -# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns. -# SupportedStyles: snake_case, normalcase, non_integer -# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64 -Naming/VariableNumber: - Exclude: - - 'examples/i18n/bg/lib/calculator.rb' - - 'examples/i18n/ru/lib/calculator.rb' - - 'examples/i18n/uk/lib/calculator.rb' - - 'examples/i18n/uz/lib/calculator.rb' - # Offense count: 2 RSpec/AnyInstance: Exclude: @@ -130,31 +90,17 @@ RSpec/Capybara/FeatureMethods: Exclude: - 'spec/cucumber/filters/activate_steps_spec.rb' -# Offense count: 15 +# Offense count: 5 # Configuration parameters: Prefixes, AllowedPatterns. # Prefixes: when, with, without RSpec/ContextWording: Exclude: - - 'spec/cucumber/cli/options_spec.rb' - - 'spec/cucumber/cli/rerun_spec.rb' - - 'spec/cucumber/configuration_spec.rb' - 'spec/cucumber/filters/tag_limits_spec.rb' - 'spec/cucumber/formatter/http_io_spec.rb' - 'spec/cucumber/formatter/junit_spec.rb' - 'spec/cucumber/formatter/publish_banner_printer_spec.rb' - - 'spec/cucumber/glue/step_definition_spec.rb' - 'spec/support/shared_context/http_server.rb' -# Offense count: 8 -# This cop supports unsafe autocorrection (--autocorrect-all). -# Configuration parameters: SkipBlocks, EnforcedStyle. -# SupportedStyles: described_class, explicit -RSpec/DescribedClass: - Exclude: - - 'spec/cucumber/cli/profile_loader_spec.rb' - - 'spec/cucumber/formatter/json_spec.rb' - - 'spec/cucumber/multiline_argument/data_table_spec.rb' - # Offense count: 2 # This cop supports unsafe autocorrection (--autocorrect-all). RSpec/EmptyExampleGroup: @@ -162,14 +108,6 @@ RSpec/EmptyExampleGroup: - 'spec/cucumber/filters/activate_steps_spec.rb' - 'spec/cucumber/running_test_case_spec.rb' -# Offense count: 4 -# This cop supports safe autocorrection (--autocorrect). -RSpec/EmptyLineAfterFinalLet: - Exclude: - - 'spec/cucumber/cli/main_spec.rb' - - 'spec/cucumber/configuration_spec.rb' - - 'spec/cucumber/hooks_spec.rb' - # Offense count: 82 # Configuration parameters: CountAsOne. RSpec/ExampleLength: @@ -201,7 +139,7 @@ RSpec/ExpectOutput: Exclude: - 'spec/cucumber/formatter/interceptor_spec.rb' -# Offense count: 62 +# Offense count: 61 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: implicit, each, example @@ -276,23 +214,6 @@ RSpec/RepeatedExampleGroupDescription: Exclude: - 'spec/cucumber/glue/proto_world_spec.rb' -# Offense count: 31 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: EnforcedStyle. -# SupportedStyles: and_return, block -RSpec/ReturnFromStub: - Exclude: - - 'spec/cucumber/cli/configuration_spec.rb' - - 'spec/cucumber/cli/main_spec.rb' - - 'spec/cucumber/cli/options_spec.rb' - - 'spec/cucumber/cli/profile_loader_spec.rb' - - 'spec/cucumber/cli/rerun_spec.rb' - - 'spec/cucumber/configuration_spec.rb' - - 'spec/cucumber/filters/tag_limits/verifier_spec.rb' - - 'spec/cucumber/formatter/interceptor_spec.rb' - - 'spec/cucumber/formatter/junit_spec.rb' - - 'spec/cucumber/glue/registry_and_more_spec.rb' - # Offense count: 3 # This cop supports safe autocorrection (--autocorrect). RSpec/ScatteredLet: @@ -352,6 +273,23 @@ Style/GlobalVars: - 'features/lib/support/env.rb' - 'spec/cucumber/cli/options_spec.rb' +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: literals, strict +Style/MutableConstant: + Exclude: + - 'lib/cucumber/formatter/unicode.rb' + +# Offense count: 5 +# This cop supports safe autocorrection (--autocorrect). +Style/RedundantFreeze: + Exclude: + - 'lib/cucumber/cli/options.rb' + - 'lib/cucumber/file_specs.rb' + - 'lib/cucumber/runtime.rb' + - 'lib/cucumber/term/ansicolor.rb' + # Offense count: 6 # This cop supports safe autocorrection (--autocorrect). Style/StderrPuts: diff --git a/cucumber.gemspec b/cucumber.gemspec index 054c167e2..2aec488b8 100644 --- a/cucumber.gemspec +++ b/cucumber.gemspec @@ -39,7 +39,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'nokogiri', '~> 1.14' s.add_development_dependency 'rake', '~> 13.1' s.add_development_dependency 'rspec', '~> 3.12' - s.add_development_dependency 'rubocop', '~> 1.56.4' + s.add_development_dependency 'rubocop', '~> 1.61.0' s.add_development_dependency 'rubocop-capybara', '~> 2.19.0' s.add_development_dependency 'rubocop-packaging', '~> 0.5.2' s.add_development_dependency 'rubocop-rake', '~> 0.6.0' From a3578da188b1e157d825c5caff817af1672ed60e Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Wed, 10 Jul 2024 11:31:59 +0100 Subject: [PATCH 17/17] Changelog entries for v10 --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aaf4bd422..bf6ca8a2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,15 @@ This document is formatted according to the principles of [Keep A CHANGELOG](htt Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CONTRIBUTING.md) for more info on how to contribute to Cucumber. ## [Unreleased] +### Changed +- Updated `cucumber-compatibility-kit` to v16 ([luke-hill](https://github.com/luke-hill)) +- Changed compatibility testing to fully lean on external assets instead of duplicating them ([luke-hill](https://github.com/luke-hill)) + +### Fixed +- Fixed an issue where a change to one example in compatibility testing wasn't fully adhered to ([luke-hill](https://github.com/luke-hill)) + +### Removed +- Removed support for Ruby 2.7 ([luke-hill](https://github.com/luke-hill)) ## [9.2.0] - 2024-03-19 ### Changed