From a0628e077bacf5ede8cdce71702f54d135f0fa7b Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Fri, 12 Dec 2025 16:37:42 +0000 Subject: [PATCH 1/3] WIP: Add #timestamp to Attachment message --- lib/cucumber/formatter/message_builder.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/cucumber/formatter/message_builder.rb b/lib/cucumber/formatter/message_builder.rb index 7285083e5..8c0dbaa4c 100644 --- a/lib/cucumber/formatter/message_builder.rb +++ b/lib/cucumber/formatter/message_builder.rb @@ -50,9 +50,17 @@ def attach(src, media_type, filename) test_step_id: @current_test_step_id, test_case_started_id: @current_test_case_started_id, media_type: media_type, - file_name: filename + file_name: filename, + timestamp: time_to_timestamp(Time.now) } + # if/else + # body / content_encoding + # TOP-LEVEL + # file_name / media_type / test_case_started_id / test_step_id + # MISSING + # source / url / test_run_started_id / test_run_hook_started_id / timestamp (ADDED) + if media_type&.start_with?('text/') attachment_data[:content_encoding] = Cucumber::Messages::AttachmentContentEncoding::IDENTITY attachment_data[:body] = src From 2c3a561767b42eb60990c817d295247b40b55b1a Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 16 Dec 2025 17:26:23 +0000 Subject: [PATCH 2/3] Cleanups --- lib/cucumber/formatter/message_builder.rb | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/cucumber/formatter/message_builder.rb b/lib/cucumber/formatter/message_builder.rb index 8c0dbaa4c..dd10d3ce7 100644 --- a/lib/cucumber/formatter/message_builder.rb +++ b/lib/cucumber/formatter/message_builder.rb @@ -41,10 +41,6 @@ def initialize(config) @current_test_step_id = nil end - def output_message - raise 'To be implemented' - end - def attach(src, media_type, filename) attachment_data = { test_step_id: @current_test_step_id, @@ -54,13 +50,6 @@ def attach(src, media_type, filename) timestamp: time_to_timestamp(Time.now) } - # if/else - # body / content_encoding - # TOP-LEVEL - # file_name / media_type / test_case_started_id / test_step_id - # MISSING - # source / url / test_run_started_id / test_run_hook_started_id / timestamp (ADDED) - if media_type&.start_with?('text/') attachment_data[:content_encoding] = Cucumber::Messages::AttachmentContentEncoding::IDENTITY attachment_data[:body] = src From 95bb15d0ce7ca4cb62f2efe8c724a53af83946f8 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 16 Dec 2025 18:40:02 +0000 Subject: [PATCH 3/3] Remove 3.1 testing whilst we have a slow transition out of 3.1 support --- .github/workflows/release.yaml | 2 +- .github/workflows/test.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 553edb712..feb88b808 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: ['3.1', '3.2', '3.3', '3.4'] + ruby: ['3.2', '3.3', '3.4'] include: - os: ubuntu-latest ruby: jruby-9.4 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4de7e2df5..e363b922d 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: ['3.1', '3.2', '3.3', '3.4'] + ruby: ['3.2', '3.3', '3.4'] include: - os: ubuntu-latest ruby: jruby-9.4