From 1697d48e7afb9625c87b010465a796cc1b166b7f Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Mon, 11 Sep 2023 17:53:41 +0100 Subject: [PATCH 01/37] First interim working update --- cucumber.gemspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cucumber.gemspec b/cucumber.gemspec index 822abfc40..8658cc200 100644 --- a/cucumber.gemspec +++ b/cucumber.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |s| s.add_dependency 'builder', '~> 3.2', '>= 3.2.4' s.add_dependency 'cucumber-ci-environment', '~> 9.2', '>= 9.2.0' - s.add_dependency 'cucumber-core', '~> 11.1', '>= 11.1.0' + s.add_dependency 'cucumber-core', '~> 12.0' s.add_dependency 'cucumber-cucumber-expressions', '~> 16.1', '>= 16.1.2' s.add_dependency 'cucumber-gherkin', '>= 24', '< 26.2.1' s.add_dependency 'cucumber-html-formatter', '~> 20.4', '>= 20.4.0' @@ -33,7 +33,7 @@ Gem::Specification.new do |s| s.add_dependency 'multi_test', '~> 1.1', '>= 1.1.0' s.add_dependency 'sys-uname', '~> 1.2', '>= 1.2.3' - s.add_development_dependency 'cucumber-compatibility-kit', '~> 10.0' + s.add_development_dependency 'cucumber-compatibility-kit', '~> 11.0' # Only needed whilst we are testing the formatters. Can be removed once we remove tests for those s.add_development_dependency 'nokogiri', '~> 1.13', '>= 1.13.6' s.add_development_dependency 'pry', '~> 0.14', '>= 0.14.1' From dc4aaa96b0780b20fc56e3d5adc495eeb1c5f76e Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Mon, 11 Sep 2023 17:58:20 +0100 Subject: [PATCH 02/37] Update of all runtime dependencies --- cucumber.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cucumber.gemspec b/cucumber.gemspec index 8658cc200..a4d3281e5 100644 --- a/cucumber.gemspec +++ b/cucumber.gemspec @@ -25,7 +25,7 @@ Gem::Specification.new do |s| s.add_dependency 'cucumber-ci-environment', '~> 9.2', '>= 9.2.0' s.add_dependency 'cucumber-core', '~> 12.0' s.add_dependency 'cucumber-cucumber-expressions', '~> 16.1', '>= 16.1.2' - s.add_dependency 'cucumber-gherkin', '>= 24', '< 26.2.1' + s.add_dependency 'cucumber-gherkin', '>= 24', '< 27' s.add_dependency 'cucumber-html-formatter', '~> 20.4', '>= 20.4.0' s.add_dependency 'cucumber-messages', '>= 19', '< 23' s.add_dependency 'diff-lcs', '~> 1.5', '>= 1.5.0' From 71da6933dd5c0d1dc44b7eb3a2f9508464b2f1fe Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Mon, 11 Sep 2023 18:04:58 +0100 Subject: [PATCH 03/37] Remove pry from suite - use a local gemfile --- cucumber.gemspec | 1 - spec/spec_helper.rb | 6 ------ 2 files changed, 7 deletions(-) diff --git a/cucumber.gemspec b/cucumber.gemspec index a4d3281e5..c6a2f57d1 100644 --- a/cucumber.gemspec +++ b/cucumber.gemspec @@ -36,7 +36,6 @@ Gem::Specification.new do |s| s.add_development_dependency 'cucumber-compatibility-kit', '~> 11.0' # Only needed whilst we are testing the formatters. Can be removed once we remove tests for those s.add_development_dependency 'nokogiri', '~> 1.13', '>= 1.13.6' - s.add_development_dependency 'pry', '~> 0.14', '>= 0.14.1' s.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6' s.add_development_dependency 'rspec', '~> 3.12', '>= 3.12.0' s.add_development_dependency 'rubocop', '~> 1.56', '>= 1.56.2' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 7cbdd135a..3e7f49c17 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -3,13 +3,7 @@ ENV['CUCUMBER_COLORS'] = nil $LOAD_PATH.unshift(File.dirname(__FILE__)) -# For Travis.... -require 'cucumber/encoding' - require 'simplecov_setup' - -require 'pry' - require 'cucumber' RSpec.configure do |c| From e8797333a9db6dfaf0c1423857c026e011123fff Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Mon, 11 Sep 2023 18:06:04 +0100 Subject: [PATCH 04/37] Update to use latest cck --- cucumber.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cucumber.gemspec b/cucumber.gemspec index c6a2f57d1..04a860d5a 100644 --- a/cucumber.gemspec +++ b/cucumber.gemspec @@ -33,7 +33,7 @@ Gem::Specification.new do |s| s.add_dependency 'multi_test', '~> 1.1', '>= 1.1.0' s.add_dependency 'sys-uname', '~> 1.2', '>= 1.2.3' - s.add_development_dependency 'cucumber-compatibility-kit', '~> 11.0' + s.add_development_dependency 'cucumber-compatibility-kit', '~> 12.0' # Only needed whilst we are testing the formatters. Can be removed once we remove tests for those s.add_development_dependency 'nokogiri', '~> 1.13', '>= 1.13.6' s.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6' From a9c325908b2e1950edf1cf04fc10115e0b3e4c90 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Mon, 11 Sep 2023 18:06:53 +0100 Subject: [PATCH 05/37] Remove another personalised gem --- cucumber.gemspec | 1 - 1 file changed, 1 deletion(-) diff --git a/cucumber.gemspec b/cucumber.gemspec index 04a860d5a..2e69be841 100644 --- a/cucumber.gemspec +++ b/cucumber.gemspec @@ -44,7 +44,6 @@ Gem::Specification.new do |s| s.add_development_dependency 'rubocop-rake', '~> 0.6', '>= 0.6.0' s.add_development_dependency 'rubocop-rspec', '~> 2.23', '>= 2.23.2' s.add_development_dependency 'simplecov', '~> 0.22', '>= 0.22.0' - s.add_development_dependency 'syntax', '~> 1.2', '>= 1.2.2' s.add_development_dependency 'test-unit', '~> 3.6', '>= 3.6.1' s.add_development_dependency 'webrick', '~> 1.8', '>= 1.8.1' From e5f7beb52d5719f2895be77fd1aa6383b89a19c7 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Thu, 28 Sep 2023 16:20:00 +0100 Subject: [PATCH 06/37] Add fix into message builder that now generates a new exception type object in the messages --- lib/cucumber/formatter/message_builder.rb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/cucumber/formatter/message_builder.rb b/lib/cucumber/formatter/message_builder.rb index 3e52d6925..10173a1bc 100644 --- a/lib/cucumber/formatter/message_builder.rb +++ b/lib/cucumber/formatter/message_builder.rb @@ -192,10 +192,13 @@ def on_test_step_finished(event) result_message = result.to_message if result.failed? || result.pending? + message_element = result.failed? ? result.exception : result + result_message = Cucumber::Messages::TestStepResult.new( status: result_message.status, duration: result_message.duration, - message: create_error_message(result) + message: create_error_message(message_element), + exception: create_exception_object(result, message_element) ) end @@ -211,12 +214,17 @@ def on_test_step_finished(event) output_envelope(message) end - def create_error_message(result) - message_element = result.failed? ? result.exception : result + def create_error_message(message_element) message = "#{message_element.message} (#{message_element.class})" ([message] + message_element.backtrace).join("\n") end + def create_exception_object(result, message_element) + return unless result.failed? + + Cucumber::Messages::Exception.from_h({ type: message_element.class, message: message_element.message }) + end + def on_test_case_finished(event) message = Cucumber::Messages::Envelope.new( test_case_finished: Cucumber::Messages::TestCaseFinished.new( From 37d95ed8bd70b9bd521bf9c8e49ee4efac4c8c93 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Thu, 28 Sep 2023 16:42:17 +0100 Subject: [PATCH 07/37] Enable the structure for making the parameter-type message pass the v12 cck. However this is a WIP and will need further touching up --- lib/cucumber/glue/registry_and_more.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/cucumber/glue/registry_and_more.rb b/lib/cucumber/glue/registry_and_more.rb index 653bebeeb..36acd0392 100644 --- a/lib/cucumber/glue/registry_and_more.rb +++ b/lib/cucumber/glue/registry_and_more.rb @@ -207,7 +207,17 @@ def parameter_type_envelope(parameter_type) name: parameter_type.name, regular_expressions: parameter_type.regexps.map(&:to_s), prefer_for_regular_expression_match: parameter_type.prefer_for_regexp_match?, - use_for_snippets: parameter_type.use_for_snippets? + use_for_snippets: parameter_type.use_for_snippets?, + source_reference: Cucumber::Messages::SourceReference.from_h( + # TODO: This needs fixing before we release the next version - this is simply put in to trick the + # CCK into passing the v12 specification - LH -> 26/9/23 + { + uri: 'foo', + location: { + line: 5 + } + } + ) ) ) end From 0e3f116cf9f2a02efe3770bb6d999ed14a0959a5 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 29 Sep 2023 17:46:30 +0100 Subject: [PATCH 08/37] Add in a new param to last call for #attach which is the filename - Leave it as a silly default for now to test it passing through --- lib/cucumber/formatter/message_builder.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/cucumber/formatter/message_builder.rb b/lib/cucumber/formatter/message_builder.rb index 10173a1bc..3720f31cc 100644 --- a/lib/cucumber/formatter/message_builder.rb +++ b/lib/cucumber/formatter/message_builder.rb @@ -42,11 +42,12 @@ def output_message raise 'To be implemented' end - def attach(src, media_type) + def attach(src, media_type, filename = 'jeff') attachment_data = { test_step_id: @current_test_step_id, test_case_started_id: @current_test_case_started_id, - media_type: media_type + media_type: media_type, + file_name: filename } if media_type.start_with?('text/') From ed45483fa9777bd14cd9cd82878f2ad798d5e72b Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 29 Sep 2023 17:47:47 +0100 Subject: [PATCH 09/37] Add in filename to #attach called from world --- lib/cucumber/glue/proto_world.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cucumber/glue/proto_world.rb b/lib/cucumber/glue/proto_world.rb index fdc57f861..60af040ef 100644 --- a/lib/cucumber/glue/proto_world.rb +++ b/lib/cucumber/glue/proto_world.rb @@ -88,13 +88,13 @@ def log(*messages) # the file path, or an IO ready to be read. # @param media_type [string] the media type. If file is a valid path, # media_type can be ommitted, it will then be inferred from the file name. - def attach(file, media_type = nil) + def attach(file, media_type = nil, filename = nil) return super unless File.file?(file) content = File.read(file, mode: 'rb') media_type = MiniMime.lookup_by_filename(file)&.content_type if media_type.nil? - super(content, media_type.to_s) + super(content, media_type.to_s, filename) rescue StandardError super end From 564499c53f6452e177ad88936c4f2e9444913b05 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Mon, 2 Oct 2023 09:15:54 +0100 Subject: [PATCH 10/37] Pass in filename to each method chain --- lib/cucumber/glue/proto_world.rb | 4 ++-- lib/cucumber/runtime/user_interface.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/cucumber/glue/proto_world.rb b/lib/cucumber/glue/proto_world.rb index 60af040ef..c65b85622 100644 --- a/lib/cucumber/glue/proto_world.rb +++ b/lib/cucumber/glue/proto_world.rb @@ -156,8 +156,8 @@ def add_modules!(world_modules, namespaced_world_modules) runtime.ask(question, timeout_seconds) end - define_method(:attach) do |file, media_type| - runtime.attach(file, media_type) + define_method(:attach) do |file, media_type, filename| + runtime.attach(file, media_type, filename) end # Prints the list of modules that are included in the World diff --git a/lib/cucumber/runtime/user_interface.rb b/lib/cucumber/runtime/user_interface.rb index ab78e0d24..433ef8273 100644 --- a/lib/cucumber/runtime/user_interface.rb +++ b/lib/cucumber/runtime/user_interface.rb @@ -41,8 +41,8 @@ def ask(question, timeout_seconds) # be a path to a file, or if it's an image it may also be a Base64 encoded image. # The embedded data may or may not be ignored, depending on what kind of formatter(s) are active. # - def attach(src, media_type) - @visitor.attach(src, media_type) + def attach(src, media_type, filename) + @visitor.attach(src, media_type, filename) end private From 7762e3c62359686fd05805f83c4dd1059e55827d Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Mon, 2 Oct 2023 09:16:05 +0100 Subject: [PATCH 11/37] CCK should run locally too --- .rspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.rspec b/.rspec index 5c96d6282..f26ef5abe 100644 --- a/.rspec +++ b/.rspec @@ -1,2 +1,2 @@ --color ---tag "~cck" + From 2a39a2f7623d7c61231dc2007a77c815193c37c7 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Mon, 2 Oct 2023 11:42:47 +0100 Subject: [PATCH 12/37] Permit filename to be passed into legacy JSONFormatter --- lib/cucumber/formatter/json.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cucumber/formatter/json.rb b/lib/cucumber/formatter/json.rb index 6b1e0f9f4..6e7b7aede 100644 --- a/lib/cucumber/formatter/json.rb +++ b/lib/cucumber/formatter/json.rb @@ -85,7 +85,7 @@ def on_test_run_finished(_event) @io.write(JSON.pretty_generate(@feature_hashes)) end - def attach(src, mime_type) + def attach(src, mime_type, _filename) if mime_type == 'text/x.cucumber.log+plain' test_step_output << src return From c6b8969cefa2f02a2af059deb57b887837c55920 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Mon, 2 Oct 2023 11:45:50 +0100 Subject: [PATCH 13/37] Add in filename to console formatter puts statement --- lib/cucumber/formatter/console.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cucumber/formatter/console.rb b/lib/cucumber/formatter/console.rb index 6500ae175..7398eb5cf 100644 --- a/lib/cucumber/formatter/console.rb +++ b/lib/cucumber/formatter/console.rb @@ -169,12 +169,12 @@ def do_print_passing_wip(passed_messages) end end - def attach(src, media_type) + def attach(src, media_type, filename) return unless media_type == 'text/x.cucumber.log+plain' return unless @io @io.puts - @io.puts(format_string(src, :tag)) + @io.puts("#{filename}: #{format_string(src, :tag)}") @io.flush end From 3ab379b63403cb1e7a6a62ab73165ffcda907f4f Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Mon, 2 Oct 2023 11:47:25 +0100 Subject: [PATCH 14/37] Add filename to pretty formatter --- lib/cucumber/formatter/pretty.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cucumber/formatter/pretty.rb b/lib/cucumber/formatter/pretty.rb index c4b084891..7ad6759a7 100644 --- a/lib/cucumber/formatter/pretty.rb +++ b/lib/cucumber/formatter/pretty.rb @@ -140,10 +140,10 @@ def on_test_run_finished(_event) print_summary end - def attach(src, media_type) + def attach(src, media_type, filename) return unless media_type == 'text/x.cucumber.log+plain' - @test_step_output.push src + @test_step_output.push("#{filename}: #{src}") end private From adf5e4e8459f1a6834442f5514fc31a7441160dd Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Mon, 2 Oct 2023 11:50:37 +0100 Subject: [PATCH 15/37] When pretty formatter encounters something WITH a filename, show it accordingly, otherwise fall back to default behaviour --- lib/cucumber/formatter/pretty.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/cucumber/formatter/pretty.rb b/lib/cucumber/formatter/pretty.rb index 7ad6759a7..49ebf8972 100644 --- a/lib/cucumber/formatter/pretty.rb +++ b/lib/cucumber/formatter/pretty.rb @@ -143,7 +143,11 @@ def on_test_run_finished(_event) def attach(src, media_type, filename) return unless media_type == 'text/x.cucumber.log+plain' - @test_step_output.push("#{filename}: #{src}") + if filename + @test_step_output.push("#{filename}: #{src}") + else + @test_step_output.push(src) + end end private From e5bb4ae4aaed47049a6361a7c2eda0c0207a593a Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Mon, 2 Oct 2023 11:51:23 +0100 Subject: [PATCH 16/37] Also revert console formatter to old behaviour when no filename is encountered --- lib/cucumber/formatter/console.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/cucumber/formatter/console.rb b/lib/cucumber/formatter/console.rb index 7398eb5cf..a27bf94a0 100644 --- a/lib/cucumber/formatter/console.rb +++ b/lib/cucumber/formatter/console.rb @@ -174,7 +174,12 @@ def attach(src, media_type, filename) return unless @io @io.puts - @io.puts("#{filename}: #{format_string(src, :tag)}") + if filename + @io.puts("#{filename}: #{format_string(src, :tag)}") + else + @io.puts(format_string(src, :tag)) + end + @io.flush end From f474f3ba20833e3da54570264b33839f7460526a Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Mon, 2 Oct 2023 11:55:33 +0100 Subject: [PATCH 17/37] Fix tests for user interface receiving nil arg --- spec/cucumber/glue/step_definition_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/cucumber/glue/step_definition_spec.rb b/spec/cucumber/glue/step_definition_spec.rb index 9065b0c6f..05634234f 100644 --- a/spec/cucumber/glue/step_definition_spec.rb +++ b/spec/cucumber/glue/step_definition_spec.rb @@ -198,7 +198,7 @@ def step_match(text) context 'allows log' do it 'calls "attach" with the correct media type' do - expect(user_interface).to receive(:attach).with('wasup', 'text/x.cucumber.log+plain') + expect(user_interface).to receive(:attach).with('wasup', 'text/x.cucumber.log+plain', nil) dsl.Given(/Loud/) do log 'wasup' end @@ -206,7 +206,7 @@ def step_match(text) end it 'calls `to_s` if the message is not a String' do - expect(user_interface).to receive(:attach).with('["Not", 1, "string"]', 'text/x.cucumber.log+plain') + expect(user_interface).to receive(:attach).with('["Not", 1, "string"]', 'text/x.cucumber.log+plain', nil) dsl.Given(/Loud/) do log ['Not', 1, 'string'] end From 73507768381246c82c7a609552e6ca491544d79b Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 3 Oct 2023 15:47:32 +0100 Subject: [PATCH 18/37] Remove silly default for filename in final consumer before create message object --- lib/cucumber/formatter/message_builder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cucumber/formatter/message_builder.rb b/lib/cucumber/formatter/message_builder.rb index 3720f31cc..e834b46b6 100644 --- a/lib/cucumber/formatter/message_builder.rb +++ b/lib/cucumber/formatter/message_builder.rb @@ -42,7 +42,7 @@ def output_message raise 'To be implemented' end - def attach(src, media_type, filename = 'jeff') + def attach(src, media_type, filename) attachment_data = { test_step_id: @current_test_step_id, test_case_started_id: @current_test_case_started_id, From f4c6d1ff9e751a33df78202f4e8bc48f8eef1d37 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 3 Oct 2023 16:12:41 +0100 Subject: [PATCH 19/37] WIP: Better spike / structure --- lib/cucumber/glue/registry_and_more.rb | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/lib/cucumber/glue/registry_and_more.rb b/lib/cucumber/glue/registry_and_more.rb index 36acd0392..a6561010f 100644 --- a/lib/cucumber/glue/registry_and_more.rb +++ b/lib/cucumber/glue/registry_and_more.rb @@ -208,16 +208,22 @@ def parameter_type_envelope(parameter_type) regular_expressions: parameter_type.regexps.map(&:to_s), prefer_for_regular_expression_match: parameter_type.prefer_for_regexp_match?, use_for_snippets: parameter_type.use_for_snippets?, - source_reference: Cucumber::Messages::SourceReference.from_h( - # TODO: This needs fixing before we release the next version - this is simply put in to trick the - # CCK into passing the v12 specification - LH -> 26/9/23 - { - uri: 'foo', - location: { - line: 5 - } - } + source_reference: Cucumber::Messages::SourceReference.new( + uri: location.file, + location: Cucumber::Messages::Location.new( + line: location.lines.first + ) ) + # source_reference: Cucumber::Messages::SourceReference.from_h( + # # TODO: This needs fixing before we release the next version - this is simply put in to trick the + # # CCK into passing the v12 specification - LH -> 26/9/23 + # { + # uri: 'foo', + # location: { + # line: 5 + # } + # } + # ) ) ) end From 9bec82d752099ce90336e44a421ebca55f434480 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 6 Oct 2023 14:57:07 +0100 Subject: [PATCH 20/37] Bump messages to 17.0 to enable transformer fetching --- cucumber.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cucumber.gemspec b/cucumber.gemspec index de99fc395..d026e5d85 100644 --- a/cucumber.gemspec +++ b/cucumber.gemspec @@ -24,7 +24,7 @@ Gem::Specification.new do |s| s.add_dependency 'builder', '~> 3.2', '>= 3.2.4' s.add_dependency 'cucumber-ci-environment', '~> 9.2', '>= 9.2.0' s.add_dependency 'cucumber-core', '~> 12.0' - s.add_dependency 'cucumber-cucumber-expressions', '~> 16.1', '>= 16.1.2' + s.add_dependency 'cucumber-cucumber-expressions', '~> 17.0' s.add_dependency 'cucumber-gherkin', '>= 24', '< 27' s.add_dependency 'cucumber-html-formatter', '~> 20.4', '>= 20.4.0' s.add_dependency 'cucumber-messages', '>= 19', '< 23' From 6968e5179569cd228ce3a26b523f96a343c6c6df Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 6 Oct 2023 15:04:25 +0100 Subject: [PATCH 21/37] Fix envelope preparation for ParameterType message to be CCK conformant --- lib/cucumber/glue/registry_and_more.rb | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/lib/cucumber/glue/registry_and_more.rb b/lib/cucumber/glue/registry_and_more.rb index a6561010f..b404ce4b3 100644 --- a/lib/cucumber/glue/registry_and_more.rb +++ b/lib/cucumber/glue/registry_and_more.rb @@ -198,32 +198,19 @@ def self.cli_snippet_type_options private def parameter_type_envelope(parameter_type) - # TODO: should me moved to Cucumber::Expression::ParameterType#to_envelope ? + # TODO: should this be moved to Cucumber::Expression::ParameterType#to_envelope ?? # Note: that would mean that cucumber-expression would depend on cucumber-messages - Cucumber::Messages::Envelope.new( parameter_type: Cucumber::Messages::ParameterType.new( id: @configuration.id_generator.new_id, name: parameter_type.name, regular_expressions: parameter_type.regexps.map(&:to_s), - prefer_for_regular_expression_match: parameter_type.prefer_for_regexp_match?, - use_for_snippets: parameter_type.use_for_snippets?, + prefer_for_regular_expression_match: parameter_type.prefer_for_regexp_match, + use_for_snippets: parameter_type.use_for_snippets, source_reference: Cucumber::Messages::SourceReference.new( - uri: location.file, - location: Cucumber::Messages::Location.new( - line: location.lines.first - ) + uri: parameter_type.transformer.source_location[0], + location: Cucumber::Messages::Location.new(line: parameter_type.transformer.source_location[1]) ) - # source_reference: Cucumber::Messages::SourceReference.from_h( - # # TODO: This needs fixing before we release the next version - this is simply put in to trick the - # # CCK into passing the v12 specification - LH -> 26/9/23 - # { - # uri: 'foo', - # location: { - # line: 5 - # } - # } - # ) ) ) end From 92584b844260fc24ce47a77f302126d2363888c8 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 6 Oct 2023 15:05:55 +0100 Subject: [PATCH 22/37] Re-order required rubygems and required ruby versions --- cucumber.gemspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cucumber.gemspec b/cucumber.gemspec index d026e5d85..6e2eaa400 100644 --- a/cucumber.gemspec +++ b/cucumber.gemspec @@ -20,6 +20,7 @@ Gem::Specification.new do |s| } s.required_ruby_version = '>= 2.7' + s.required_rubygems_version = '>= 3.0.1' s.add_dependency 'builder', '~> 3.2', '>= 3.2.4' s.add_dependency 'cucumber-ci-environment', '~> 9.2', '>= 9.2.0' @@ -52,8 +53,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'capybara', '~> 3.39', '>= 3.39.2' s.add_development_dependency 'rack-test', '~> 2.1', '>= 2.1.0' s.add_development_dependency 'sinatra', '~> 3.1', '>= 3.1.0' - - s.required_rubygems_version = '>= 3.0.1' + s.files = Dir[ 'README.md', 'LICENSE', From 0a0a28189362c04b67f776848599b80a0d9eba65 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 6 Oct 2023 15:10:26 +0100 Subject: [PATCH 23/37] Add filename param doc for ProtoWorld --- cucumber.gemspec | 2 +- lib/cucumber/glue/proto_world.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cucumber.gemspec b/cucumber.gemspec index 6e2eaa400..070a4d59a 100644 --- a/cucumber.gemspec +++ b/cucumber.gemspec @@ -53,7 +53,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'capybara', '~> 3.39', '>= 3.39.2' s.add_development_dependency 'rack-test', '~> 2.1', '>= 2.1.0' s.add_development_dependency 'sinatra', '~> 3.1', '>= 3.1.0' - + s.files = Dir[ 'README.md', 'LICENSE', diff --git a/lib/cucumber/glue/proto_world.rb b/lib/cucumber/glue/proto_world.rb index ca2480dec..e5718cc17 100644 --- a/lib/cucumber/glue/proto_world.rb +++ b/lib/cucumber/glue/proto_world.rb @@ -88,7 +88,8 @@ def log(*messages) # @param media_type [string] the media type. # If file is a valid path, media_type can be omitted, it will then be inferred from the file name. # @param filename [string] the name of the file you wish to specify. - # BEHAVIOUR HERE TBD + # This is only needed in situations where you want to rename a PDF download e.t.c. - In most situations + # you should not need to pass a filename def attach(file, media_type = nil, filename = nil) return super unless File.file?(file) From 3e61b31646541b95c9d7b2df6d055b2f59bdf82b Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 10 Oct 2023 16:12:04 +0100 Subject: [PATCH 24/37] CCK 13 is released --- cucumber.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cucumber.gemspec b/cucumber.gemspec index 070a4d59a..ca371c3cd 100644 --- a/cucumber.gemspec +++ b/cucumber.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |s| s.add_dependency 'multi_test', '~> 1.1', '>= 1.1.0' s.add_dependency 'sys-uname', '~> 1.2', '>= 1.2.3' - s.add_development_dependency 'cucumber-compatibility-kit', '~> 12.0' + s.add_development_dependency 'cucumber-compatibility-kit', '~> 13.0' # Only needed whilst we are testing the formatters. Can be removed once we remove tests for those s.add_development_dependency 'nokogiri', '~> 1.13', '>= 1.13.6' s.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6' From 719fbb0b487eff1f350a413e8639f51cd6fd4a77 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Wed, 11 Oct 2023 21:12:10 +0100 Subject: [PATCH 25/37] Fix spacing of example feature --- features/docs/writing_support_code/hooks/hook_order.feature | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/features/docs/writing_support_code/hooks/hook_order.feature b/features/docs/writing_support_code/hooks/hook_order.feature index 40fa86e8f..e253f1a5f 100644 --- a/features/docs/writing_support_code/hooks/hook_order.feature +++ b/features/docs/writing_support_code/hooks/hook_order.feature @@ -1,5 +1,4 @@ - Feature: Hooks execute in defined order - +Feature: Hooks execute in defined order Background: Given a file named "features/step_definitions/steps.rb" with: """ From fc9f074fcfc7d0000f644a4c4b93ba6d2211d9ba Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Thu, 2 Nov 2023 17:04:57 +0000 Subject: [PATCH 26/37] Bump CCK to v14 --- cucumber.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cucumber.gemspec b/cucumber.gemspec index ca371c3cd..199b6d8df 100644 --- a/cucumber.gemspec +++ b/cucumber.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |s| s.add_dependency 'multi_test', '~> 1.1', '>= 1.1.0' s.add_dependency 'sys-uname', '~> 1.2', '>= 1.2.3' - s.add_development_dependency 'cucumber-compatibility-kit', '~> 13.0' + s.add_development_dependency 'cucumber-compatibility-kit', '~> 14.0' # Only needed whilst we are testing the formatters. Can be removed once we remove tests for those s.add_development_dependency 'nokogiri', '~> 1.13', '>= 1.13.6' s.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6' From f41dedeb68c58b443a55bbe22e42cc3906228025 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 3 Nov 2023 11:55:11 +0000 Subject: [PATCH 27/37] Mark pending spec from CCK as currently untested whilst it is investigated --- spec/cck/cck_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/cck/cck_spec.rb b/spec/cck/cck_spec.rb index f177af78a..910f5385f 100644 --- a/spec/cck/cck_spec.rb +++ b/spec/cck/cck_spec.rb @@ -9,6 +9,8 @@ Cucumber::CompatibilityKit.gherkin_examples.each do |example_name| describe "'#{example_name}' example" do + before { skip('This example is currently broken and needs fixing') if example_name == 'pending' } + include_examples 'cucumber compatibility kit' do let(:example) { example_name } let(:extra_args) { example == 'retry' ? '--retry 2' : '' } From dee314a85eb371abc276d8d1ccf3e7b3df697340 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 3 Nov 2023 14:42:49 +0000 Subject: [PATCH 28/37] Remove redundant rake task code --- Rakefile | 3 --- gem_tasks/examples.rake | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index 6c41a6c50..8d83d778a 100644 --- a/Rakefile +++ b/Rakefile @@ -19,6 +19,3 @@ default_tasks = %i[spec cucumber cck] default_tasks << :examples if ENV['CI'] task default: default_tasks - -require 'rake/clean' -CLEAN.include %w[**/*.{log,pyc,rbc,tgz} doc] diff --git a/gem_tasks/examples.rake b/gem_tasks/examples.rake index 1b1792b21..0b8225a4a 100644 --- a/gem_tasks/examples.rake +++ b/gem_tasks/examples.rake @@ -3,7 +3,7 @@ desc 'Run all examples' task :examples do Dir['examples/*'].each do |example_dir| - next if !File.directory?(example_dir) || %w[examples/tcl].index(example_dir) + next unless File.directory?(example_dir) puts "Running #{example_dir}" Dir.chdir(example_dir) do From 0d50bdaf5786ed0ae7f0ca19c4f4ab42b9664c46 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 3 Nov 2023 14:42:59 +0000 Subject: [PATCH 29/37] Ensure cck tests aren't ran mixed in to regular tests --- .rspec | 1 - gem_tasks/rspec.rake | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.rspec b/.rspec index f26ef5abe..4e1e0d2f7 100644 --- a/.rspec +++ b/.rspec @@ -1,2 +1 @@ --color - diff --git a/gem_tasks/rspec.rake b/gem_tasks/rspec.rake index e9f5accbb..3aa0e1b0e 100644 --- a/gem_tasks/rspec.rake +++ b/gem_tasks/rspec.rake @@ -5,4 +5,5 @@ require 'rspec/core/rake_task' desc 'Run RSpec' RSpec::Core::RakeTask.new do |t| t.verbose = true + t.rspec_opts = '--tag ~cck' end From 187eb596215b91aa1e5c466a0b015397cc0562e9 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 3 Nov 2023 14:55:39 +0000 Subject: [PATCH 30/37] Fix failing tests for hook order that were using a previously defined version of --- .../hooks/hook_order.feature | 18 ++++++++++-------- .../lib/step_definitions/cucumber_steps.rb | 4 ++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/features/docs/writing_support_code/hooks/hook_order.feature b/features/docs/writing_support_code/hooks/hook_order.feature index e253f1a5f..edbc195a0 100644 --- a/features/docs/writing_support_code/hooks/hook_order.feature +++ b/features/docs/writing_support_code/hooks/hook_order.feature @@ -2,24 +2,24 @@ Feature: Hooks execute in defined order Background: Given a file named "features/step_definitions/steps.rb" with: """ - Given /^background step$/ do; log(:background_step) end - Given /^scenario step$/ do; log(:scenario_step) end + Given('background step') { log(:background_step) } + Given('scenario step') { log(:scenario_step) } """ And a file named "features/support/hooks.rb" with: """ $EventOrder = [] Around('@around') do |scenario,block| - log :around_begin + log(:around_begin) block.call - log :around_end + log(:around_end) end Before('@before') do - log :before + log(:before) end After('@after') do |scenario| - log :after + log(:after) end """ And a file named "features/around_hook_covers_background.feature" with: @@ -45,7 +45,7 @@ Feature: Hooks execute in defined order And log only formatter is declared Scenario: Around hooks cover background steps - When I run `cucumber features/around_hook_covers_background.feature --format LogOnlyFormatter` + When I run `cucumber features/around_hook_covers_background.feature --format LogOnlyFormatter --publish-quiet` Then the output should contain: """ around_begin @@ -53,9 +53,10 @@ Feature: Hooks execute in defined order scenario_step around_end """ + And the exit status should be 0 Scenario: All hooks execute in expected order - When I run `cucumber features/all_hook_order.feature --format LogOnlyFormatter` + When I run `cucumber features/all_hook_order.feature --format LogOnlyFormatter --publish-quiet` Then the output should contain: """ around_begin @@ -65,3 +66,4 @@ Feature: Hooks execute in defined order after around_end """ + And the exit status should be 0 diff --git a/features/lib/step_definitions/cucumber_steps.rb b/features/lib/step_definitions/cucumber_steps.rb index 32eb82a7d..dc7c830d3 100644 --- a/features/lib/step_definitions/cucumber_steps.rb +++ b/features/lib/step_definitions/cucumber_steps.rb @@ -15,8 +15,8 @@ ' @io = config.out_stream', ' end', '', - ' def attach(src, media_type)', - ' @io.puts src', + ' def attach(src, media_type, _filename)', + ' @io.puts(src)', ' end', 'end' ].join("\n")) From 35d9f6be8268447813fe5daa1d25eb1a1ef20ad1 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 10 Nov 2023 11:50:17 +0000 Subject: [PATCH 31/37] Remove pending guard --- spec/cck/cck_spec.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/spec/cck/cck_spec.rb b/spec/cck/cck_spec.rb index 910f5385f..f177af78a 100644 --- a/spec/cck/cck_spec.rb +++ b/spec/cck/cck_spec.rb @@ -9,8 +9,6 @@ Cucumber::CompatibilityKit.gherkin_examples.each do |example_name| describe "'#{example_name}' example" do - before { skip('This example is currently broken and needs fixing') if example_name == 'pending' } - include_examples 'cucumber compatibility kit' do let(:example) { example_name } let(:extra_args) { example == 'retry' ? '--retry 2' : '' } From 265a2704e4016a36d81636117e5f39a45b555178 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 10 Nov 2023 11:52:12 +0000 Subject: [PATCH 32/37] spec_helper fixes --- .rspec | 1 + spec/spec_helper.rb | 16 +--------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/.rspec b/.rspec index 4e1e0d2f7..3687797e5 100644 --- a/.rspec +++ b/.rspec @@ -1 +1,2 @@ +--require spec_helper --color diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 3e7f49c17..18c0c0c6e 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -7,19 +7,5 @@ require 'cucumber' RSpec.configure do |c| - c.before do - ::Cucumber::Term::ANSIColor.coloring = true - end -end - -module RSpec - module WorkInProgress - def pending_under(platforms, reason, &block) - if [platforms].flatten.map(&:to_s).include? RUBY_PLATFORM - pending "pending under #{platforms.inspect} because: #{reason}", &block - else - yield - end - end - end + c.before { Cucumber::Term::ANSIColor.coloring = true } end From 25f4f895f3c2d9f476a439489fd176e932ccf534 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 10 Nov 2023 11:58:27 +0000 Subject: [PATCH 33/37] Update changelog --- CHANGELOG.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3e1d8ae1..1fb503c16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,11 +9,26 @@ 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] +### Added +- `ParameterType` message now is generated in an Envelope with an additional 6th property of `source_reference` + (This is a `Location` message, of where the parameter types transformer is located) ([#1738](https://github.com/cucumber/cucumber-ruby/pull/1738) [luke-hill](https://github.com/luke-hill)) + ### Changed - First couple of passes of tidying up approximately 40% of the manual fix cops ([#1739](https://github.com/cucumber/cucumber-ruby/pull/1739) [#1740](https://github.com/cucumber/cucumber-ruby/pull/1740) [#1741](https://github.com/cucumber/cucumber-ruby/pull/1741) [#1742](https://github.com/cucumber/cucumber-ruby/pull/1742) [luke-hill](https://github.com/luke-hill)) - Removed a bunch of example files / sample projects from ancient projects no longer viable - [#1740](https://github.com/cucumber/cucumber-ruby/pull/1740) [luke-hill](https://github.com/luke-hill)) + ([#1740](https://github.com/cucumber/cucumber-ruby/pull/1740) [luke-hill](https://github.com/luke-hill)) +- When a `testStepResult` is of type `FAILED` we now pass in a differently shaped message (Featuring a new exception propertu) + ([#1738](https://github.com/cucumber/cucumber-ruby/pull/1738) [luke-hill](https://github.com/luke-hill)) +- `#attach` now can take an optional filename parameter which will rename attachments like PDF's + ([#1738](https://github.com/cucumber/cucumber-ruby/pull/1738) [luke-hill](https://github.com/luke-hill)) + +### Fixed +- Clear up a couple of tiny "nuances" that hide lots of issues when running local vs remote (Primarily CCK tests should always be runnable) + ([#1738](https://github.com/cucumber/cucumber-ruby/pull/1738) [luke-hill](https://github.com/luke-hill)) + +### Removed +- Removed a variety of overrides / hacks for travis CI (No longer in use) ([#1738](https://github.com/cucumber/cucumber-ruby/pull/1738) [luke-hill](https://github.com/luke-hill)) ## [9.0.2] - 2023-09-11 ### Changed From 82315a5bc528541e6f617f6d3d894a789e4a1c20 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 10 Nov 2023 12:03:56 +0000 Subject: [PATCH 34/37] Remove final trace of legacy cucumber 1.7 pending flags --- spec/cucumber/cli/configuration_spec.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/spec/cucumber/cli/configuration_spec.rb b/spec/cucumber/cli/configuration_spec.rb index 641dca35c..e623949fe 100644 --- a/spec/cucumber/cli/configuration_spec.rb +++ b/spec/cucumber/cli/configuration_spec.rb @@ -45,8 +45,6 @@ def reset_config end context 'when using the --profile flag' do - include RSpec::WorkInProgress - it 'expands args from profiles in the cucumber.yml file' do given_cucumber_yml_defined_as('bongo' => '--require from/yml') config.parse!(%w[--format progress --profile bongo]) From b7b19e6836fc5e0b4a5cb39457c9ecfa01d16d35 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 10 Nov 2023 12:04:54 +0000 Subject: [PATCH 35/37] Update changelog with ref to removed guards --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fb503c16..020893b78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo ### Removed - Removed a variety of overrides / hacks for travis CI (No longer in use) ([#1738](https://github.com/cucumber/cucumber-ruby/pull/1738) [luke-hill](https://github.com/luke-hill)) +- Removed some legacy rspec pending flags present since cucumber 1.x ([#1738](https://github.com/cucumber/cucumber-ruby/pull/1738) [luke-hill](https://github.com/luke-hill)) ## [9.0.2] - 2023-09-11 ### Changed From bf85ed56b8183560ae89914a5fcc62b2c195ab79 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 10 Nov 2023 12:14:30 +0000 Subject: [PATCH 36/37] Update RSpec skipped messages to make more sense --- spec/cucumber/cli/profile_loader_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/cucumber/cli/profile_loader_spec.rb b/spec/cucumber/cli/profile_loader_spec.rb index 75827193e..825324c68 100644 --- a/spec/cucumber/cli/profile_loader_spec.rb +++ b/spec/cucumber/cli/profile_loader_spec.rb @@ -16,7 +16,7 @@ def given_cucumber_yml_defined_as(hash_or_string) end context 'when on a Windows OS' do - before { skip('Only run these tests on non-Windows') unless Cucumber::WINDOWS } + before { skip('These tests are only to be ran on Windows') unless Cucumber::WINDOWS } it 'treats backslashes as literals in rerun.txt when on Windows (JRuby or MRI)' do given_cucumber_yml_defined_as('default' => '--format "pretty" features\sync_imap_mailbox.feature:16:22') @@ -54,7 +54,7 @@ def given_cucumber_yml_defined_as(hash_or_string) end context 'when on non-Windows OS' do - before { skip('Only run these tests on non-Windows') if Cucumber::WINDOWS } + before { skip('These tests are only to be ran on a "Non-Windows" OS') if Cucumber::WINDOWS } it 'treats backslashes as literals in rerun.txt when on Windows (JRuby or MRI)' do given_cucumber_yml_defined_as('default' => '--format "pretty" features\sync_imap_mailbox.feature:16:22') From 19b6649a49ba5581890023c032958866bf2a6993 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Mon, 13 Nov 2023 17:29:53 +0000 Subject: [PATCH 37/37] update changelog --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 020893b78..1e745bcdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,15 +10,15 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo ## [Unreleased] ### Added -- `ParameterType` message now is generated in an Envelope with an additional 6th property of `source_reference` - (This is a `Location` message, of where the parameter types transformer is located) ([#1738](https://github.com/cucumber/cucumber-ruby/pull/1738) [luke-hill](https://github.com/luke-hill)) +- `ParameterType` message now contains a new (sourceReference), property + (This contains a uri string and a `Location` message -> for where the ParameterType `transformer` is located) ([#1738](https://github.com/cucumber/cucumber-ruby/pull/1738) [luke-hill](https://github.com/luke-hill)) ### Changed - First couple of passes of tidying up approximately 40% of the manual fix cops ([#1739](https://github.com/cucumber/cucumber-ruby/pull/1739) [#1740](https://github.com/cucumber/cucumber-ruby/pull/1740) [#1741](https://github.com/cucumber/cucumber-ruby/pull/1741) [#1742](https://github.com/cucumber/cucumber-ruby/pull/1742) [luke-hill](https://github.com/luke-hill)) - Removed a bunch of example files / sample projects from ancient projects no longer viable ([#1740](https://github.com/cucumber/cucumber-ruby/pull/1740) [luke-hill](https://github.com/luke-hill)) -- When a `testStepResult` is of type `FAILED` we now pass in a differently shaped message (Featuring a new exception propertu) +- When a `testStepResult` is of type `FAILED` we now pass in a new (Exception), message property ([#1738](https://github.com/cucumber/cucumber-ruby/pull/1738) [luke-hill](https://github.com/luke-hill)) - `#attach` now can take an optional filename parameter which will rename attachments like PDF's ([#1738](https://github.com/cucumber/cucumber-ruby/pull/1738) [luke-hill](https://github.com/luke-hill))