cucumber-core 20.0.0 → 20.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3bd84b9a07bbf230ece3ada9777d26e770e14ca4177f9d402d42b787161bb428
4
- data.tar.gz: a8a9d63be60d9ce6730a9051e3baf4d2e1f31603a9f7d5f1a6d422b3acf26e53
3
+ metadata.gz: 3f9931a15c76e003ac7bb598bf814bbd5d908ba256eb852847cb7aefc84dfda3
4
+ data.tar.gz: d3ed87cbc37e6c7c432747abb6caef55d10363bd4d75b440a27c7b856022dd6e
5
5
  SHA512:
6
- metadata.gz: 982d630ac7ea748ba08618bf3e0b4c42f6b9b9d01715772a28087610abc3bb1e7acd5ddf2d47e82ba2bf4bb01912f9e314ebbebfa6301e8b3fa3333dd2413a9a
7
- data.tar.gz: cbf97dd45ce2b701f652a0ece83419ae1d798f6a167989b4f312197b24fec540ab2518a77d0ce42885c34ffdf7c4b27cd77ef53d26f781e9810774e202a44e7a
6
+ metadata.gz: 55ec2c7b9356c1d61b44e7bc71ad82718bca4841da8a59e56aedca11d1709831aeffa28e38de81465e9730887bcd9fb7e94ace5625db8af771eca1812f99d5ce
7
+ data.tar.gz: 2cda929bc001a8ea4e0b49a39d4f0ce61faf5b7dd2fcbd29826ff95d7e6f2e40adbc229159b28293d10d0779fee2d3e7f9dd519986baa2856c817bcce5f2658c
data/CHANGELOG.md CHANGED
@@ -10,6 +10,14 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [20.1.0] - 2026-11-02
14
+ ### Added
15
+ - Moved the version definition to `lib/cucumber/core/version.rb` and updated the gemspec to use `Cucumber::Core::VERSION`
16
+
17
+ ### Changed
18
+ - Add additional parameters (`message` and `exception`), conditionally to the message generated by a pending or skipped
19
+ test step (If it is defined in the invocating step definition) ([#348](https://github.com/cucumber/cucumber-ruby-core/pull/348))
20
+
13
21
  ## [20.0.0] - 2026-10-09
14
22
  ### Changed
15
23
  - **BREAKING CHANGE:** `Cucumber::Core::Test::Runner` now takes a retry policy instead of a maximum number of attempts, and
@@ -174,7 +182,8 @@ See upgrading notes for [13.0.0.md](upgrading_notes/13.0.0.md#upgrading-to-cucum
174
182
  ### Changed
175
183
  - Updated `cucumber-gherkin` and `cucumber-messages`
176
184
 
177
- [Unreleased]: https://github.com/cucumber/cucumber-ruby-core/compare/v20.0.0...HEAD
185
+ [Unreleased]: https://github.com/cucumber/cucumber-ruby-core/compare/v20.1.0...HEAD
186
+ [20.1.0]: https://github.com/cucumber/cucumber-ruby-core/compare/v20.0.0...v20.1.0
178
187
  [20.0.0]: https://github.com/cucumber/cucumber-ruby-core/compare/v19.0.0...v20.0.0
179
188
  [19.0.0]: https://github.com/cucumber/cucumber-ruby-core/compare/v18.0.0...v19.0.0
180
189
  [18.0.0]: https://github.com/cucumber/cucumber-ruby-core/compare/v17.0.0...v18.0.0
@@ -29,10 +29,19 @@ module Cucumber
29
29
  end
30
30
 
31
31
  def to_message
32
- Cucumber::Messages::TestStepResult.new(
33
- status: Cucumber::Messages::TestStepResultStatus::PENDING,
34
- duration: duration.to_message_duration
35
- )
32
+ if message
33
+ Cucumber::Messages::TestStepResult.new(
34
+ status: Cucumber::Messages::TestStepResultStatus::PENDING,
35
+ duration: duration.to_message_duration,
36
+ message: message,
37
+ exception: exception_sub_message
38
+ )
39
+ else
40
+ Cucumber::Messages::TestStepResult.new(
41
+ status: Cucumber::Messages::TestStepResultStatus::PENDING,
42
+ duration: duration.to_message_duration
43
+ )
44
+ end
36
45
  end
37
46
  end
38
47
  end
@@ -11,7 +11,7 @@ module Cucumber
11
11
  class Raisable < StandardError
12
12
  attr_reader :message, :duration
13
13
 
14
- def initialize(message = '', duration = UnknownDuration.new, backtrace = nil)
14
+ def initialize(message = nil, duration = UnknownDuration.new, backtrace = nil)
15
15
  @message = message
16
16
  @duration = duration
17
17
  super(message)
@@ -39,6 +39,16 @@ module Cucumber
39
39
 
40
40
  filter.new(dup).exception
41
41
  end
42
+
43
+ private
44
+
45
+ def exception_sub_message
46
+ Cucumber::Messages::Exception.new(
47
+ type: self.class,
48
+ message: message,
49
+ stack_trace: backtrace&.join("\n")
50
+ )
51
+ end
42
52
  end
43
53
  end
44
54
  end
@@ -29,10 +29,19 @@ module Cucumber
29
29
  end
30
30
 
31
31
  def to_message
32
- Cucumber::Messages::TestStepResult.new(
33
- status: Cucumber::Messages::TestStepResultStatus::SKIPPED,
34
- duration: duration.to_message_duration
35
- )
32
+ if message
33
+ Cucumber::Messages::TestStepResult.new(
34
+ status: Cucumber::Messages::TestStepResultStatus::SKIPPED,
35
+ duration: duration.to_message_duration,
36
+ message: message,
37
+ exception: exception_sub_message
38
+ )
39
+ else
40
+ Cucumber::Messages::TestStepResult.new(
41
+ status: Cucumber::Messages::TestStepResultStatus::SKIPPED,
42
+ duration: duration.to_message_duration
43
+ )
44
+ end
36
45
  end
37
46
  end
38
47
  end
@@ -114,7 +114,7 @@ module Cucumber
114
114
  result_message = Cucumber::Messages::TestStepResult.new(
115
115
  status: result_message.status,
116
116
  duration: result_message.duration,
117
- message: to_error_message(message_element),
117
+ message: result_message.message,
118
118
  exception: to_exception_object(result, message_element)
119
119
  )
120
120
  end
@@ -128,13 +128,6 @@ module Cucumber
128
128
  )
129
129
  end
130
130
 
131
- def to_error_message(message_element)
132
- <<~ERROR_MESSAGE
133
- #{message_element.message} (#{message_element.class})
134
- #{message_element.backtrace}
135
- ERROR_MESSAGE
136
- end
137
-
138
131
  def to_exception_object(result, message_element)
139
132
  return unless result.failed?
140
133
 
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cucumber
4
+ module Core
5
+ VERSION = '20.1.0'
6
+ end
7
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 20.0.0
4
+ version: 20.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aslak Hellesøy
@@ -236,6 +236,7 @@ files:
236
236
  - lib/cucumber/core/test/step.rb
237
237
  - lib/cucumber/core/test/tag.rb
238
238
  - lib/cucumber/core/test/timer.rb
239
+ - lib/cucumber/core/version.rb
239
240
  homepage: https://cucumber.io
240
241
  licenses:
241
242
  - MIT
@@ -263,5 +264,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
263
264
  requirements: []
264
265
  rubygems_version: 4.0.16
265
266
  specification_version: 4
266
- summary: cucumber-core-20.0.0
267
+ summary: cucumber-core-20.1.0
267
268
  test_files: []