cucumber-messages 31.2.0 → 32.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/attachment.rb +2 -0
- data/lib/cucumber/messages/envelope.rb +5 -0
- data/lib/cucumber/messages/external_attachment.rb +91 -0
- data/lib/cucumber/messages/group.rb +5 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 22948e1804c8a58b18d627069a7059fd5159b216f5ab060566b6d64ddb8a0ef8
|
|
4
|
+
data.tar.gz: 2d835ad4322075786327c0de5fe4abcee3b6844f1c78756bfdbb65ae0b7177a8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ffde39e6ff9b7ab2c879fa50fda045747002f0eef37c99b7fff4cfa53c431792515d63c6df4a36e34b270188423aa8c5e163278039117c1516eda042782c3504
|
|
7
|
+
data.tar.gz: b3c96c1402ea842434b24b0661689e69c71b9e1e5f58e3584dd749215aee0b0d01883b35f07b6d0ff213356a947a10175e3f63702e15eb3de868540e6702ee8c
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
32.0.0
|
|
@@ -76,6 +76,8 @@ module Cucumber
|
|
|
76
76
|
# This will result in a smaller message stream, which can improve performance and
|
|
77
77
|
# reduce bandwidth of message consumers. It also makes it easier to process and download attachments
|
|
78
78
|
# separately from reports.
|
|
79
|
+
#
|
|
80
|
+
# Deprecated; use ExternalAttachment instead.
|
|
79
81
|
##
|
|
80
82
|
attr_reader :url
|
|
81
83
|
|
|
@@ -10,6 +10,8 @@ module Cucumber
|
|
|
10
10
|
class Envelope < Message
|
|
11
11
|
attr_reader :attachment
|
|
12
12
|
|
|
13
|
+
attr_reader :external_attachment
|
|
14
|
+
|
|
13
15
|
attr_reader :gherkin_document
|
|
14
16
|
|
|
15
17
|
attr_reader :hook
|
|
@@ -50,6 +52,7 @@ module Cucumber
|
|
|
50
52
|
|
|
51
53
|
def initialize(
|
|
52
54
|
attachment: nil,
|
|
55
|
+
external_attachment: nil,
|
|
53
56
|
gherkin_document: nil,
|
|
54
57
|
hook: nil,
|
|
55
58
|
meta: nil,
|
|
@@ -71,6 +74,7 @@ module Cucumber
|
|
|
71
74
|
undefined_parameter_type: nil
|
|
72
75
|
)
|
|
73
76
|
@attachment = attachment
|
|
77
|
+
@external_attachment = external_attachment
|
|
74
78
|
@gherkin_document = gherkin_document
|
|
75
79
|
@hook = hook
|
|
76
80
|
@meta = meta
|
|
@@ -105,6 +109,7 @@ module Cucumber
|
|
|
105
109
|
|
|
106
110
|
new(
|
|
107
111
|
attachment: Attachment.from_h(hash[:attachment]),
|
|
112
|
+
external_attachment: ExternalAttachment.from_h(hash[:externalAttachment]),
|
|
108
113
|
gherkin_document: GherkinDocument.from_h(hash[:gherkinDocument]),
|
|
109
114
|
hook: Hook.from_h(hash[:hook]),
|
|
110
115
|
meta: Meta.from_h(hash[:meta]),
|
|
@@ -0,0 +1,91 @@
|
|
|
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 ExternalAttachment message in Cucumber's {message protocol}[https://github.com/cucumber/messages].
|
|
8
|
+
##
|
|
9
|
+
#
|
|
10
|
+
# Represents an attachment that is stored externally rather than embedded in the message stream.
|
|
11
|
+
#
|
|
12
|
+
# This message type is used for large attachments (e.g., video files) that are already
|
|
13
|
+
# on the filesystem and should not be loaded into memory. Instead of embedding the content,
|
|
14
|
+
# only a URL reference is stored.
|
|
15
|
+
#
|
|
16
|
+
# A formatter or other consumer of messages may replace an Attachment with an ExternalAttachment if it makes sense to do so.
|
|
17
|
+
##
|
|
18
|
+
class ExternalAttachment < Message
|
|
19
|
+
##
|
|
20
|
+
# A URL where the attachment can be retrieved. This could be a file:// URL for
|
|
21
|
+
# local filesystem paths, or an http(s):// URL for remote resources.
|
|
22
|
+
##
|
|
23
|
+
attr_reader :url
|
|
24
|
+
|
|
25
|
+
##
|
|
26
|
+
# The media type of the data. This can be any valid
|
|
27
|
+
# [IANA Media Type](https://www.iana.org/assignments/media-types/media-types.xhtml)
|
|
28
|
+
# as well as Cucumber-specific media types such as `text/x.cucumber.gherkin+plain`
|
|
29
|
+
# and `text/x.cucumber.stacktrace+plain`
|
|
30
|
+
##
|
|
31
|
+
attr_reader :media_type
|
|
32
|
+
|
|
33
|
+
##
|
|
34
|
+
# The identifier of the test step if the attachment was created during the execution of a test step
|
|
35
|
+
##
|
|
36
|
+
attr_reader :test_step_id
|
|
37
|
+
|
|
38
|
+
##
|
|
39
|
+
# The identifier of the test case attempt if the attachment was created during the execution of a test step
|
|
40
|
+
##
|
|
41
|
+
attr_reader :test_case_started_id
|
|
42
|
+
|
|
43
|
+
##
|
|
44
|
+
# The identifier of the test run hook execution if the attachment was created during the execution of a test run hook
|
|
45
|
+
##
|
|
46
|
+
attr_reader :test_run_hook_started_id
|
|
47
|
+
|
|
48
|
+
##
|
|
49
|
+
# When the attachment was created
|
|
50
|
+
##
|
|
51
|
+
attr_reader :timestamp
|
|
52
|
+
|
|
53
|
+
def initialize(
|
|
54
|
+
url: '',
|
|
55
|
+
media_type: '',
|
|
56
|
+
test_step_id: nil,
|
|
57
|
+
test_case_started_id: nil,
|
|
58
|
+
test_run_hook_started_id: nil,
|
|
59
|
+
timestamp: nil
|
|
60
|
+
)
|
|
61
|
+
@url = url
|
|
62
|
+
@media_type = media_type
|
|
63
|
+
@test_step_id = test_step_id
|
|
64
|
+
@test_case_started_id = test_case_started_id
|
|
65
|
+
@test_run_hook_started_id = test_run_hook_started_id
|
|
66
|
+
@timestamp = timestamp
|
|
67
|
+
super()
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
##
|
|
71
|
+
# Returns a new ExternalAttachment from the given hash.
|
|
72
|
+
# If the hash keys are camelCased, they are properly assigned to the
|
|
73
|
+
# corresponding snake_cased attributes.
|
|
74
|
+
#
|
|
75
|
+
# Cucumber::Messages::ExternalAttachment.from_h(some_hash) # => #<Cucumber::Messages::ExternalAttachment:0x... ...>
|
|
76
|
+
##
|
|
77
|
+
def self.from_h(hash)
|
|
78
|
+
return nil if hash.nil?
|
|
79
|
+
|
|
80
|
+
new(
|
|
81
|
+
url: hash[:url],
|
|
82
|
+
media_type: hash[:mediaType],
|
|
83
|
+
test_step_id: hash[:testStepId],
|
|
84
|
+
test_case_started_id: hash[:testCaseStartedId],
|
|
85
|
+
test_run_hook_started_id: hash[:testRunHookStartedId],
|
|
86
|
+
timestamp: Timestamp.from_h(hash[:timestamp])
|
|
87
|
+
)
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
@@ -8,6 +8,10 @@ module Cucumber
|
|
|
8
8
|
##
|
|
9
9
|
##
|
|
10
10
|
class Group < Message
|
|
11
|
+
##
|
|
12
|
+
# The nested capture groups of an argument.
|
|
13
|
+
# Absent if the group has no nested capture groups.
|
|
14
|
+
##
|
|
11
15
|
attr_reader :children
|
|
12
16
|
|
|
13
17
|
attr_reader :start
|
|
@@ -15,7 +19,7 @@ module Cucumber
|
|
|
15
19
|
attr_reader :value
|
|
16
20
|
|
|
17
21
|
def initialize(
|
|
18
|
-
children:
|
|
22
|
+
children: nil,
|
|
19
23
|
start: nil,
|
|
20
24
|
value: nil
|
|
21
25
|
)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cucumber-messages
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 32.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aslak Hellesøy
|
|
@@ -114,6 +114,7 @@ files:
|
|
|
114
114
|
- lib/cucumber/messages/envelope.rb
|
|
115
115
|
- lib/cucumber/messages/examples.rb
|
|
116
116
|
- lib/cucumber/messages/exception.rb
|
|
117
|
+
- lib/cucumber/messages/external_attachment.rb
|
|
117
118
|
- lib/cucumber/messages/feature.rb
|
|
118
119
|
- lib/cucumber/messages/feature_child.rb
|
|
119
120
|
- lib/cucumber/messages/gherkin_document.rb
|
|
@@ -202,5 +203,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
202
203
|
requirements: []
|
|
203
204
|
rubygems_version: 3.6.9
|
|
204
205
|
specification_version: 4
|
|
205
|
-
summary: cucumber-messages-
|
|
206
|
+
summary: cucumber-messages-32.0.0
|
|
206
207
|
test_files: []
|