cucumber-messages 28.1.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 +4 -4
- data/VERSION +1 -1
- data/lib/cucumber/messages/envelope.rb +5 -0
- data/lib/cucumber/messages/snippet.rb +50 -0
- data/lib/cucumber/messages/suggestion.rb +57 -0
- data/lib/cucumber/messages/test_run_hook_started.rb +8 -0
- data/lib/cucumber/messages/test_step.rb +10 -5
- data/lib/cucumber/messages/test_step_result.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e66ca9fa18e868a89da334e0c63c7f709eebc78a0c5cb58ded617a1d80197ffd
|
4
|
+
data.tar.gz: 76aa8a3325cb9183f153ecce7014e93b0ab265c28133d8e068b003ed5a9fa1eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5594499de746c826e6db6647a5076d8864d5e2daf677d138701fb8eea7c6bcd9b435a79d259efbc82c9f4389acaadfb80d9105c63cb7c95417e754bd8139c254
|
7
|
+
data.tar.gz: 1dfd7f54dc31dacc31fb5d9429c20fec41c2c42ec7e1fafe7200e0c05648b5670be90931023f75bd943bf66ba84ed127235fecc87b032b5ea6ddba110b636547
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
29.0.0
|
@@ -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
|
-
#
|
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
|
-
#
|
29
|
-
#
|
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.
|
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:
|
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-
|
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-
|
221
|
+
summary: cucumber-messages-29.0.0
|
220
222
|
test_files: []
|