cucumber-messages 28.0.0 → 29.0.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: 83561ce7c21a97d9e3f569e6b19d448bd19b12f84b9447d963af0c261a3d36e7
4
- data.tar.gz: fe8a2b825b2b6680fada29f1dae295459b954fceb53234f2595eb71827816922
3
+ metadata.gz: e66ca9fa18e868a89da334e0c63c7f709eebc78a0c5cb58ded617a1d80197ffd
4
+ data.tar.gz: 76aa8a3325cb9183f153ecce7014e93b0ab265c28133d8e068b003ed5a9fa1eb
5
5
  SHA512:
6
- metadata.gz: 16752657de9be7e6743dfb23a3e478003067d56e99ce102adc1c62f10315c7d01fd373077fa74d6e37f447ae50bd3f09fc64e7b000398c2f768e0520e6539bb1
7
- data.tar.gz: d157147e8cdbb4fd87c3c2a6cb7419a13cde70c52468015f1c0b33469ba13dce2cfd772ebe90fcd36b61b0ded4e3d2a88c0f619d9a8c1772c0301fd09ecfe1ed
6
+ metadata.gz: 5594499de746c826e6db6647a5076d8864d5e2daf677d138701fb8eea7c6bcd9b435a79d259efbc82c9f4389acaadfb80d9105c63cb7c95417e754bd8139c254
7
+ data.tar.gz: 1dfd7f54dc31dacc31fb5d9429c20fec41c2c42ec7e1fafe7200e0c05648b5670be90931023f75bd943bf66ba84ed127235fecc87b032b5ea6ddba110b636547
data/VERSION CHANGED
@@ -1 +1 @@
1
- 28.0.0
1
+ 29.0.0
@@ -7,53 +7,48 @@ module Cucumber
7
7
  # Represents the Attachment message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
8
8
  ##
9
9
  #
10
- # //// Attachments (parse errors, execution errors, screenshots, links...)
10
+ # Attachments (parse errors, execution errors, screenshots, links...)
11
11
  #
12
- # *
13
- # An attachment represents any kind of data associated with a line in a
14
- # [Source](#io.cucumber.messages.Source) file. It can be used for:
12
+ # An attachment represents any kind of data associated with a line in a
13
+ # [Source](#io.cucumber.messages.Source) file. It can be used for:
15
14
  #
16
- # * Syntax errors during parse time
17
- # * Screenshots captured and attached during execution
18
- # * Logs captured and attached during execution
15
+ # * Syntax errors during parse time
16
+ # * Screenshots captured and attached during execution
17
+ # * Logs captured and attached during execution
19
18
  #
20
- # It is not to be used for runtime errors raised/thrown during execution. This
21
- # is captured in `TestResult`.
19
+ # It is not to be used for runtime errors raised/thrown during execution. This
20
+ # is captured in `TestResult`.
22
21
  ##
23
22
  class Attachment < Message
24
23
  ##
25
- # *
26
- # The body of the attachment. If `contentEncoding` is `IDENTITY`, the attachment
27
- # is simply the string. If it's `BASE64`, the string should be Base64 decoded to
28
- # obtain the attachment.
24
+ # The body of the attachment. If `contentEncoding` is `IDENTITY`, the attachment
25
+ # is simply the string. If it's `BASE64`, the string should be Base64 decoded to
26
+ # obtain the attachment.
29
27
  ##
30
28
  attr_reader :body
31
29
 
32
30
  ##
33
- # *
34
- # Whether to interpret `body` "as-is" (IDENTITY) or if it needs to be Base64-decoded (BASE64).
31
+ # Whether to interpret `body` "as-is" (IDENTITY) or if it needs to be Base64-decoded (BASE64).
35
32
  #
36
- # Content encoding is *not* determined by the media type, but rather by the type
37
- # of the object being attached:
33
+ # Content encoding is *not* determined by the media type, but rather by the type
34
+ # of the object being attached:
38
35
  #
39
- # - string: IDENTITY
40
- # - byte array: BASE64
41
- # - stream: BASE64
36
+ # - string: IDENTITY
37
+ # - byte array: BASE64
38
+ # - stream: BASE64
42
39
  ##
43
40
  attr_reader :content_encoding
44
41
 
45
42
  ##
46
- # *
47
- # Suggested file name of the attachment. (Provided by the user as an argument to `attach`)
43
+ # Suggested file name of the attachment. (Provided by the user as an argument to `attach`)
48
44
  ##
49
45
  attr_reader :file_name
50
46
 
51
47
  ##
52
- # *
53
- # The media type of the data. This can be any valid
54
- # [IANA Media Type](https://www.iana.org/assignments/media-types/media-types.xhtml)
55
- # as well as Cucumber-specific media types such as `text/x.cucumber.gherkin+plain`
56
- # and `text/x.cucumber.stacktrace+plain`
48
+ # The media type of the data. This can be any valid
49
+ # [IANA Media Type](https://www.iana.org/assignments/media-types/media-types.xhtml)
50
+ # as well as Cucumber-specific media types such as `text/x.cucumber.gherkin+plain`
51
+ # and `text/x.cucumber.stacktrace+plain`
57
52
  ##
58
53
  attr_reader :media_type
59
54
 
@@ -70,18 +65,17 @@ module Cucumber
70
65
  attr_reader :test_step_id
71
66
 
72
67
  ##
73
- # *
74
- # A URL where the attachment can be retrieved. This field should not be set by Cucumber.
75
- # It should be set by a program that reads a message stream and does the following for
76
- # each Attachment message:
68
+ # A URL where the attachment can be retrieved. This field should not be set by Cucumber.
69
+ # It should be set by a program that reads a message stream and does the following for
70
+ # each Attachment message:
77
71
  #
78
- # - Writes the body (after base64 decoding if necessary) to a new file.
79
- # - Sets `body` and `contentEncoding` to `null`
80
- # - Writes out the new attachment message
72
+ # - Writes the body (after base64 decoding if necessary) to a new file.
73
+ # - Sets `body` and `contentEncoding` to `null`
74
+ # - Writes out the new attachment message
81
75
  #
82
- # This will result in a smaller message stream, which can improve performance and
83
- # reduce bandwidth of message consumers. It also makes it easier to process and download attachments
84
- # separately from reports.
76
+ # This will result in a smaller message stream, which can improve performance and
77
+ # reduce bandwidth of message consumers. It also makes it easier to process and download attachments
78
+ # separately from reports.
85
79
  ##
86
80
  attr_reader :url
87
81
 
@@ -7,8 +7,7 @@ module Cucumber
7
7
  # Represents the Comment message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
8
8
  ##
9
9
  #
10
- # *
11
- # A comment in a Gherkin document
10
+ # A comment in a Gherkin document
12
11
  ##
13
12
  class Comment < Message
14
13
  ##
@@ -8,16 +8,16 @@ module Cucumber
8
8
  ##
9
9
  #
10
10
  # The structure is pretty close of the Timestamp one. For clarity, a second type
11
- # of message is used.
11
+ # of message is used.
12
12
  ##
13
13
  class Duration < Message
14
14
  attr_reader :seconds
15
15
 
16
16
  ##
17
17
  # Non-negative fractions of a second at nanosecond resolution. Negative
18
- # second values with fractions must still have non-negative nanos values
19
- # that count forward in time. Must be from 0 to 999,999,999
20
- # inclusive.
18
+ # second values with fractions must still have non-negative nanos values
19
+ # that count forward in time. Must be from 0 to 999,999,999
20
+ # inclusive.
21
21
  ##
22
22
  attr_reader :nanos
23
23
 
@@ -6,14 +6,6 @@ module Cucumber
6
6
  ##
7
7
  # Represents the Envelope message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
8
8
  ##
9
- #
10
- # When removing a field, replace it with reserved, rather than deleting the line.
11
- # When adding a field, add it to the end and increment the number by one.
12
- # See https://developers.google.com/protocol-buffers/docs/proto#updating for details
13
- #
14
- # *
15
- # All the messages that are passed between different components/processes are Envelope
16
- # messages.
17
9
  ##
18
10
  class Envelope < Message
19
11
  attr_reader :attachment
@@ -30,6 +22,8 @@ module Cucumber
30
22
 
31
23
  attr_reader :pickle
32
24
 
25
+ attr_reader :suggestion
26
+
33
27
  attr_reader :source
34
28
 
35
29
  attr_reader :step_definition
@@ -62,6 +56,7 @@ module Cucumber
62
56
  parameter_type: nil,
63
57
  parse_error: nil,
64
58
  pickle: nil,
59
+ suggestion: nil,
65
60
  source: nil,
66
61
  step_definition: nil,
67
62
  test_case: nil,
@@ -82,6 +77,7 @@ module Cucumber
82
77
  @parameter_type = parameter_type
83
78
  @parse_error = parse_error
84
79
  @pickle = pickle
80
+ @suggestion = suggestion
85
81
  @source = source
86
82
  @step_definition = step_definition
87
83
  @test_case = test_case
@@ -115,6 +111,7 @@ module Cucumber
115
111
  parameter_type: ParameterType.from_h(hash[:parameterType]),
116
112
  parse_error: ParseError.from_h(hash[:parseError]),
117
113
  pickle: Pickle.from_h(hash[:pickle]),
114
+ suggestion: Suggestion.from_h(hash[:suggestion]),
118
115
  source: Source.from_h(hash[:source]),
119
116
  step_definition: StepDefinition.from_h(hash[:stepDefinition]),
120
117
  test_case: TestCase.from_h(hash[:testCase]),
@@ -7,8 +7,7 @@ module Cucumber
7
7
  # Represents the FeatureChild message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
8
8
  ##
9
9
  #
10
- # *
11
- # A child node of a `Feature` node
10
+ # A child node of a `Feature` node
12
11
  ##
13
12
  class FeatureChild < Message
14
13
  attr_reader :rule
@@ -7,19 +7,17 @@ module Cucumber
7
7
  # Represents the GherkinDocument message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
8
8
  ##
9
9
  #
10
- # *
11
- # The [AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree) of a Gherkin document.
12
- # Cucumber implementations should *not* depend on `GherkinDocument` or any of its
13
- # children for execution - use [Pickle](#io.cucumber.messages.Pickle) instead.
10
+ # The [AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree) of a Gherkin document.
11
+ # Cucumber implementations should *not* depend on `GherkinDocument` or any of its
12
+ # children for execution - use [Pickle](#io.cucumber.messages.Pickle) instead.
14
13
  #
15
- # The only consumers of `GherkinDocument` should only be formatters that produce
16
- # "rich" output, resembling the original Gherkin document.
14
+ # The only consumers of `GherkinDocument` should only be formatters that produce
15
+ # "rich" output, resembling the original Gherkin document.
17
16
  ##
18
17
  class GherkinDocument < Message
19
18
  ##
20
- # *
21
- # The [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier)
22
- # of the source, typically a file path relative to the root directory
19
+ # The [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier)
20
+ # of the source, typically a file path relative to the root directory
23
21
  ##
24
22
  attr_reader :uri
25
23
 
@@ -8,7 +8,7 @@ module Cucumber
8
8
  ##
9
9
  #
10
10
  # Information about Git, provided by the Build/CI server as environment
11
- # variables.
11
+ # variables.
12
12
  ##
13
13
  class Git < Message
14
14
  attr_reader :remote
@@ -7,8 +7,7 @@ module Cucumber
7
7
  # Represents the Location message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
8
8
  ##
9
9
  #
10
- # *
11
- # Points to a line and a column in a text file
10
+ # Points to a line and a column in a text file
12
11
  ##
13
12
  class Location < Message
14
13
  attr_reader :line
@@ -7,14 +7,12 @@ module Cucumber
7
7
  # Represents the Meta message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
8
8
  ##
9
9
  #
10
- # *
11
- # This message contains meta information about the environment. Consumers can use
12
- # this for various purposes.
10
+ # This message contains meta information about the environment. Consumers can use
11
+ # this for various purposes.
13
12
  ##
14
13
  class Meta < Message
15
14
  ##
16
- # *
17
- # The [SEMVER](https://semver.org/) version number of the protocol
15
+ # The [SEMVER](https://semver.org/) version number of the protocol
18
16
  ##
19
17
  attr_reader :protocol_version
20
18
 
@@ -7,24 +7,20 @@ module Cucumber
7
7
  # Represents the Pickle message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
8
8
  ##
9
9
  #
10
- # //// Pickles
10
+ # A `Pickle` represents a template for a `TestCase`. It is typically derived
11
+ # from another format, such as [GherkinDocument](#io.cucumber.messages.GherkinDocument).
12
+ # In the future a `Pickle` may be derived from other formats such as Markdown or
13
+ # Excel files.
11
14
  #
12
- # *
13
- # A `Pickle` represents a template for a `TestCase`. It is typically derived
14
- # from another format, such as [GherkinDocument](#io.cucumber.messages.GherkinDocument).
15
- # In the future a `Pickle` may be derived from other formats such as Markdown or
16
- # Excel files.
15
+ # By making `Pickle` the main data structure Cucumber uses for execution, the
16
+ # implementation of Cucumber itself becomes simpler, as it doesn't have to deal
17
+ # with the complex structure of a [GherkinDocument](#io.cucumber.messages.GherkinDocument).
17
18
  #
18
- # By making `Pickle` the main data structure Cucumber uses for execution, the
19
- # implementation of Cucumber itself becomes simpler, as it doesn't have to deal
20
- # with the complex structure of a [GherkinDocument](#io.cucumber.messages.GherkinDocument).
21
- #
22
- # Each `PickleStep` of a `Pickle` is matched with a `StepDefinition` to create a `TestCase`
19
+ # Each `PickleStep` of a `Pickle` is matched with a `StepDefinition` to create a `TestCase`
23
20
  ##
24
21
  class Pickle < Message
25
22
  ##
26
- # *
27
- # A unique id for the pickle
23
+ # A unique id for the pickle
28
24
  ##
29
25
  attr_reader :id
30
26
 
@@ -49,17 +45,15 @@ module Cucumber
49
45
  attr_reader :steps
50
46
 
51
47
  ##
52
- # *
53
- # One or more tags. If this pickle is constructed from a Gherkin document,
54
- # It includes inherited tags from the `Feature` as well.
48
+ # One or more tags. If this pickle is constructed from a Gherkin document,
49
+ # It includes inherited tags from the `Feature` as well.
55
50
  ##
56
51
  attr_reader :tags
57
52
 
58
53
  ##
59
- # *
60
- # Points to the AST node locations of the pickle. The last one represents the unique
61
- # id of the pickle. A pickle constructed from `Examples` will have the first
62
- # id originating from the `Scenario` AST node, and the second from the `TableRow` AST node.
54
+ # Points to the AST node locations of the pickle. The last one represents the unique
55
+ # id of the pickle. A pickle constructed from `Examples` will have the first
56
+ # id originating from the `Scenario` AST node, and the second from the `TableRow` AST node.
63
57
  ##
64
58
  attr_reader :ast_node_ids
65
59
 
@@ -7,15 +7,14 @@ module Cucumber
7
7
  # Represents the PickleStep message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
8
8
  ##
9
9
  #
10
- # *
11
- # An executable step
10
+ # An executable step
12
11
  ##
13
12
  class PickleStep < Message
14
13
  attr_reader :argument
15
14
 
16
15
  ##
17
16
  # References the IDs of the source of the step. For Gherkin, this can be
18
- # the ID of a Step, and possibly also the ID of a TableRow
17
+ # the ID of a Step, and possibly also the ID of a TableRow
19
18
  ##
20
19
  attr_reader :ast_node_ids
21
20
 
@@ -7,8 +7,7 @@ module Cucumber
7
7
  # Represents the PickleTag message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
8
8
  ##
9
9
  #
10
- # *
11
- # A tag
10
+ # A tag
12
11
  ##
13
12
  class PickleTag < Message
14
13
  attr_reader :name
@@ -7,8 +7,7 @@ module Cucumber
7
7
  # Represents the RuleChild message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
8
8
  ##
9
9
  #
10
- # *
11
- # A child node of a `Rule` node
10
+ # A child node of a `Rule` node
12
11
  ##
13
12
  class RuleChild < Message
14
13
  attr_reader :background
@@ -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
@@ -7,16 +7,12 @@ module Cucumber
7
7
  # Represents the Source message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
8
8
  ##
9
9
  #
10
- # //// Source
11
- #
12
- # *
13
- # A source file, typically a Gherkin document or Java/Ruby/JavaScript source code
10
+ # A source file, typically a Gherkin document or Java/Ruby/JavaScript source code
14
11
  ##
15
12
  class Source < Message
16
13
  ##
17
- # *
18
- # The [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier)
19
- # of the source, typically a file path relative to the root directory
14
+ # The [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier)
15
+ # of the source, typically a file path relative to the root directory
20
16
  ##
21
17
  attr_reader :uri
22
18
 
@@ -27,7 +23,7 @@ module Cucumber
27
23
 
28
24
  ##
29
25
  # The media type of the file. Can be used to specify custom types, such as
30
- # text/x.cucumber.gherkin+plain
26
+ # text/x.cucumber.gherkin+plain
31
27
  ##
32
28
  attr_reader :media_type
33
29
 
@@ -7,9 +7,8 @@ module Cucumber
7
7
  # Represents the SourceReference message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
8
8
  ##
9
9
  #
10
- # *
11
- # Points to a [Source](#io.cucumber.messages.Source) identified by `uri` and a
12
- # [Location](#io.cucumber.messages.Location) within that file.
10
+ # Points to a [Source](#io.cucumber.messages.Source) identified by `uri` and a
11
+ # [Location](#io.cucumber.messages.Location) within that file.
13
12
  ##
14
13
  class SourceReference < Message
15
14
  attr_reader :uri
@@ -7,19 +7,17 @@ module Cucumber
7
7
  # Represents the StepMatchArgument message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
8
8
  ##
9
9
  #
10
- # *
11
- # Represents a single argument extracted from a step match and passed to a step definition.
12
- # This is used for the following purposes:
13
- # - Construct an argument to pass to a step definition (possibly through a parameter type transform)
14
- # - Highlight the matched parameter in rich formatters such as the HTML formatter
10
+ # Represents a single argument extracted from a step match and passed to a step definition.
11
+ # This is used for the following purposes:
12
+ # - Construct an argument to pass to a step definition (possibly through a parameter type transform)
13
+ # - Highlight the matched parameter in rich formatters such as the HTML formatter
15
14
  #
16
- # This message closely matches the `Argument` class in the `cucumber-expressions` library.
15
+ # This message closely matches the `Argument` class in the `cucumber-expressions` library.
17
16
  ##
18
17
  class StepMatchArgument < Message
19
18
  ##
20
- # *
21
- # Represents the outermost capture group of an argument. This message closely matches the
22
- # `Group` class in the `cucumber-expressions` library.
19
+ # Represents the outermost capture group of an argument. This message closely matches the
20
+ # `Group` class in the `cucumber-expressions` library.
23
21
  ##
24
22
  attr_reader :group
25
23
 
@@ -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
@@ -7,8 +7,7 @@ module Cucumber
7
7
  # Represents the Tag message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
8
8
  ##
9
9
  #
10
- # *
11
- # A tag
10
+ # A tag
12
11
  ##
13
12
  class Tag < Message
14
13
  ##
@@ -7,10 +7,7 @@ module Cucumber
7
7
  # Represents the TestCase message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
8
8
  ##
9
9
  #
10
- # //// TestCases
11
- #
12
- # *
13
- # A `TestCase` contains a sequence of `TestStep`s.
10
+ # A `TestCase` contains a sequence of `TestStep`s.
14
11
  ##
15
12
  class TestCase < Message
16
13
  attr_reader :id
@@ -9,16 +9,14 @@ module Cucumber
9
9
  ##
10
10
  class TestCaseStarted < Message
11
11
  ##
12
- # *
13
- # The first attempt should have value 0, and for each retry the value
14
- # should increase by 1.
12
+ # The first attempt should have value 0, and for each retry the value
13
+ # should increase by 1.
15
14
  ##
16
15
  attr_reader :attempt
17
16
 
18
17
  ##
19
- # *
20
- # Because a `TestCase` can be run multiple times (in case of a retry),
21
- # we use this field to group messages relating to the same attempt.
18
+ # Because a `TestCase` can be run multiple times (in case of a retry),
19
+ # we use this field to group messages relating to the same attempt.
22
20
  ##
23
21
  attr_reader :id
24
22
 
@@ -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,9 +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
- # *
11
- # A `TestStep` is derived from either a `PickleStep`
12
- # 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
13
15
  ##
14
16
  class TestStep < Message
15
17
  ##
@@ -25,14 +27,16 @@ module Cucumber
25
27
  attr_reader :pickle_step_id
26
28
 
27
29
  ##
28
- # Pointer to all the matching `StepDefinition`s (if derived from a `PickleStep`)
29
- # Each element represents a matching step definition. A size of 0 means `UNDEFINED`,
30
- # 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.
31
33
  ##
32
34
  attr_reader :step_definition_ids
33
35
 
34
36
  ##
35
37
  # A list of list of StepMatchArgument (if derived from a `PickleStep`).
38
+ #
39
+ # Each element represents the arguments for a matching step definition.
36
40
  ##
37
41
  attr_reader :step_match_arguments_lists
38
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
 
@@ -10,16 +10,16 @@ module Cucumber
10
10
  class Timestamp < Message
11
11
  ##
12
12
  # Represents seconds of UTC time since Unix epoch
13
- # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
14
- # 9999-12-31T23:59:59Z inclusive.
13
+ # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
14
+ # 9999-12-31T23:59:59Z inclusive.
15
15
  ##
16
16
  attr_reader :seconds
17
17
 
18
18
  ##
19
19
  # Non-negative fractions of a second at nanosecond resolution. Negative
20
- # second values with fractions must still have non-negative nanos values
21
- # that count forward in time. Must be from 0 to 999,999,999
22
- # inclusive.
20
+ # second values with fractions must still have non-negative nanos values
21
+ # that count forward in time. Must be from 0 to 999,999,999
22
+ # inclusive.
23
23
  ##
24
24
  attr_reader :nanos
25
25
 
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.0.0
4
+ version: 29.0.0
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-07 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.0.0
221
+ summary: cucumber-messages-29.0.0
220
222
  test_files: []