cucumber-messages 28.1.0 → 29.0.1

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: 3cc648c1bbc47f10e819e846a0abba287b8a2bbf17df3376c48b656130947992
4
- data.tar.gz: af14b472bdeb1e66f0d8f5c3fe28871f36f7c187a85c0b2bff8bce523756d643
3
+ metadata.gz: 6145acbedc3307b7d24f348164bb3dbc282cba56563742771d280f4415f5ed7d
4
+ data.tar.gz: 7fad3b6e94d3afd5b83c6912c933d85f85ff70cdf63ec390f1af6660546ca2cc
5
5
  SHA512:
6
- metadata.gz: c21f00aa9a8db8d70ac4db29afbf660920ff9db1fc97f1eff2a9e81eabc92fdc1ca9603ad7dc9db2dd4cde73b2518cdc2fc9ea1e4a68cc0ee43a55f7f9aeea0f
7
- data.tar.gz: 3586df87e8a29d95fac2974d098b95c40ccf7d98abfa75b89d312ecaac11e2b70453b48f3ff7d68f162f4f671de6d55690df347cd475c876b54f3228b414a5cf
6
+ metadata.gz: 192b1b59397347d84aca6103db8c254bf449ecb90c2589f428f1df0c5a229182f73fc08b7df01cf7504d9e99748772e481269e72759b0b8164e699601ba0fc7f
7
+ data.tar.gz: 39799657827b82e5e56724319eac013f4ee19ad3fa09144205d35266b9a81742f40b40e3ba2cd2915974f4a4a99972c18a45b465470978f1b7b83afd8f3eff74
data/VERSION CHANGED
@@ -1 +1 @@
1
- 28.1.0
1
+ 29.0.1
@@ -22,6 +22,8 @@ module Cucumber
22
22
 
23
23
  attr_reader :pickle
24
24
 
25
+ attr_reader :suggestion
26
+
25
27
  attr_reader :source
26
28
 
27
29
  attr_reader :step_definition
@@ -54,6 +56,7 @@ module Cucumber
54
56
  parameter_type: nil,
55
57
  parse_error: nil,
56
58
  pickle: nil,
59
+ suggestion: nil,
57
60
  source: nil,
58
61
  step_definition: nil,
59
62
  test_case: nil,
@@ -74,6 +77,7 @@ module Cucumber
74
77
  @parameter_type = parameter_type
75
78
  @parse_error = parse_error
76
79
  @pickle = pickle
80
+ @suggestion = suggestion
77
81
  @source = source
78
82
  @step_definition = step_definition
79
83
  @test_case = test_case
@@ -107,6 +111,7 @@ module Cucumber
107
111
  parameter_type: ParameterType.from_h(hash[:parameterType]),
108
112
  parse_error: ParseError.from_h(hash[:parseError]),
109
113
  pickle: Pickle.from_h(hash[:pickle]),
114
+ suggestion: Suggestion.from_h(hash[:suggestion]),
110
115
  source: Source.from_h(hash[:source]),
111
116
  step_definition: StepDefinition.from_h(hash[:stepDefinition]),
112
117
  test_case: TestCase.from_h(hash[:testCase]),
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ # The code was auto-generated by {this script}[https://github.com/cucumber/messages/blob/main/codegen/codegen.rb]
4
+ module Cucumber
5
+ module Messages
6
+ ##
7
+ # Represents the Snippet message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
8
+ ##
9
+ ##
10
+ class Snippet < Message
11
+ ##
12
+ # The programming language of the code.
13
+ #
14
+ # This must be formatted as an all lowercase identifier such that syntax highlighters like [Prism](https://prismjs.com/#supported-languages) or [Highlight.js](https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md) can recognize it.
15
+ # For example: `cpp`, `cs`, `go`, `java`, `javascript`, `php`, `python`, `ruby`, `scala`.
16
+ ##
17
+ attr_reader :language
18
+
19
+ ##
20
+ # A snippet of code
21
+ ##
22
+ attr_reader :code
23
+
24
+ def initialize(
25
+ language: '',
26
+ code: ''
27
+ )
28
+ @language = language
29
+ @code = code
30
+ super()
31
+ end
32
+
33
+ ##
34
+ # Returns a new Snippet from the given hash.
35
+ # If the hash keys are camelCased, they are properly assigned to the
36
+ # corresponding snake_cased attributes.
37
+ #
38
+ # Cucumber::Messages::Snippet.from_h(some_hash) # => #<Cucumber::Messages::Snippet:0x... ...>
39
+ ##
40
+ def self.from_h(hash)
41
+ return nil if hash.nil?
42
+
43
+ new(
44
+ language: hash[:language],
45
+ code: hash[:code]
46
+ )
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ # The code was auto-generated by {this script}[https://github.com/cucumber/messages/blob/main/codegen/codegen.rb]
4
+ module Cucumber
5
+ module Messages
6
+ ##
7
+ # Represents the Suggestion message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
8
+ ##
9
+ #
10
+ # A suggested fragment of code to implement an undefined step
11
+ ##
12
+ class Suggestion < Message
13
+ ##
14
+ # A unique id for this suggestion
15
+ ##
16
+ attr_reader :id
17
+
18
+ ##
19
+ # The ID of the `PickleStep` this `Suggestion` was created for.
20
+ ##
21
+ attr_reader :pickle_step_id
22
+
23
+ ##
24
+ # A collection of code snippets that could implement the undefined step
25
+ ##
26
+ attr_reader :snippets
27
+
28
+ def initialize(
29
+ id: '',
30
+ pickle_step_id: '',
31
+ snippets: []
32
+ )
33
+ @id = id
34
+ @pickle_step_id = pickle_step_id
35
+ @snippets = snippets
36
+ super()
37
+ end
38
+
39
+ ##
40
+ # Returns a new Suggestion from the given hash.
41
+ # If the hash keys are camelCased, they are properly assigned to the
42
+ # corresponding snake_cased attributes.
43
+ #
44
+ # Cucumber::Messages::Suggestion.from_h(some_hash) # => #<Cucumber::Messages::Suggestion:0x... ...>
45
+ ##
46
+ def self.from_h(hash)
47
+ return nil if hash.nil?
48
+
49
+ new(
50
+ id: hash[:id],
51
+ pickle_step_id: hash[:pickleStepId],
52
+ snippets: hash[:snippets]&.map { |item| Snippet.from_h(item) }
53
+ )
54
+ end
55
+ end
56
+ end
57
+ end
@@ -23,17 +23,24 @@ module Cucumber
23
23
  ##
24
24
  attr_reader :hook_id
25
25
 
26
+ ##
27
+ # An identifier for the worker process running this hook, if parallel workers are in use. The identifier will be unique per worker, but no particular format is defined - it could be an index, uuid, machine name etc - and as such should be assumed that it's not human readable.
28
+ ##
29
+ attr_reader :worker_id
30
+
26
31
  attr_reader :timestamp
27
32
 
28
33
  def initialize(
29
34
  id: '',
30
35
  test_run_started_id: '',
31
36
  hook_id: '',
37
+ worker_id: nil,
32
38
  timestamp: Timestamp.new
33
39
  )
34
40
  @id = id
35
41
  @test_run_started_id = test_run_started_id
36
42
  @hook_id = hook_id
43
+ @worker_id = worker_id
37
44
  @timestamp = timestamp
38
45
  super()
39
46
  end
@@ -52,6 +59,7 @@ module Cucumber
52
59
  id: hash[:id],
53
60
  test_run_started_id: hash[:testRunStartedId],
54
61
  hook_id: hash[:hookId],
62
+ worker_id: hash[:workerId],
55
63
  timestamp: Timestamp.from_h(hash[:timestamp])
56
64
  )
57
65
  end
@@ -7,8 +7,11 @@ module Cucumber
7
7
  # Represents the TestStep message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
8
8
  ##
9
9
  #
10
- # A `TestStep` is derived from either a `PickleStep`
11
- # combined with a `StepDefinition`, or from a `Hook`.
10
+ # A `TestStep` is derived from either a `PickleStep` combined with a `StepDefinition`, or from a `Hook`.
11
+ #
12
+ # When derived from a PickleStep:
13
+ # * For `UNDEFINED` steps `stepDefinitionIds` and `stepMatchArgumentsLists` will be empty.
14
+ # * For `AMBIGUOUS` steps, there will be multiple entries in `stepDefinitionIds` and `stepMatchArgumentsLists`. The first entry in the stepMatchArgumentsLists holds the list of arguments for the first matching step definition, the second entry for the second, etc
12
15
  ##
13
16
  class TestStep < Message
14
17
  ##
@@ -24,14 +27,16 @@ module Cucumber
24
27
  attr_reader :pickle_step_id
25
28
 
26
29
  ##
27
- # Pointer to all the matching `StepDefinition`s (if derived from a `PickleStep`)
28
- # Each element represents a matching step definition. A size of 0 means `UNDEFINED`,
29
- # and a size of 2+ means `AMBIGUOUS`
30
+ # Pointer to all the matching `StepDefinition`s (if derived from a `PickleStep`).
31
+ #
32
+ # Each element represents a matching step definition.
30
33
  ##
31
34
  attr_reader :step_definition_ids
32
35
 
33
36
  ##
34
37
  # A list of list of StepMatchArgument (if derived from a `PickleStep`).
38
+ #
39
+ # Each element represents the arguments for a matching step definition.
35
40
  ##
36
41
  attr_reader :step_match_arguments_lists
37
42
 
@@ -11,7 +11,7 @@ module Cucumber
11
11
  attr_reader :duration
12
12
 
13
13
  ##
14
- # An arbitrary bit of information that explains this result. This can be a stack trace of anything else.
14
+ # An arbitrary bit of information that explains this result. If there was an exception, this should include a stringified representation of it including type, message and stack trace (the exact format will vary by platform).
15
15
  ##
16
16
  attr_reader :message
17
17
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-messages
3
3
  version: !ruby/object:Gem::Version
4
- version: 28.1.0
4
+ version: 29.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aslak Hellesøy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-07-21 00:00:00.000000000 Z
11
+ date: 2025-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber-compatibility-kit
@@ -161,6 +161,7 @@ files:
161
161
  - lib/cucumber/messages/rule.rb
162
162
  - lib/cucumber/messages/rule_child.rb
163
163
  - lib/cucumber/messages/scenario.rb
164
+ - lib/cucumber/messages/snippet.rb
164
165
  - lib/cucumber/messages/source.rb
165
166
  - lib/cucumber/messages/source_media_type.rb
166
167
  - lib/cucumber/messages/source_reference.rb
@@ -171,6 +172,7 @@ files:
171
172
  - lib/cucumber/messages/step_keyword_type.rb
172
173
  - lib/cucumber/messages/step_match_argument.rb
173
174
  - lib/cucumber/messages/step_match_arguments_list.rb
175
+ - lib/cucumber/messages/suggestion.rb
174
176
  - lib/cucumber/messages/table_cell.rb
175
177
  - lib/cucumber/messages/table_row.rb
176
178
  - lib/cucumber/messages/tag.rb
@@ -216,5 +218,5 @@ requirements: []
216
218
  rubygems_version: 3.5.22
217
219
  signing_key:
218
220
  specification_version: 4
219
- summary: cucumber-messages-28.1.0
221
+ summary: cucumber-messages-29.0.1
220
222
  test_files: []