cucumber-messages 12.4.0 → 13.2.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fbd2a2fcaa7e4afd1eb56bece2ee4907661049c0ed7ca5eade53335595b625a
|
4
|
+
data.tar.gz: 95fe3cf9d70ae3ac95a9eb00e6936c40eef40864fa034f87394f29ed8ae7f5e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a679068f177a07425a8311880185f66036f80eadb07de274d1c4c59e467e4142a852403602f281792755f268f30721142705ac9219b4b9d0c4794b43a1db7a7
|
7
|
+
data.tar.gz: dfd3d4af835c4f4cdbf72ac01facb0972a06ef7d401b1bb06c638967f914a84afbe13f2ff3e116a6248e88b23c16d80027c79e16642d2dad5aba37fadbde7f88
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
13.2.1
|
data/lib/cucumber/messages.pb.rb
CHANGED
@@ -26,9 +26,12 @@ module Cucumber
|
|
26
26
|
class Timestamp < ::Protobuf::Message; end
|
27
27
|
class Duration < ::Protobuf::Message; end
|
28
28
|
class Location < ::Protobuf::Message; end
|
29
|
-
class SourceReference < ::Protobuf::Message
|
30
|
-
|
31
|
-
|
29
|
+
class SourceReference < ::Protobuf::Message
|
30
|
+
class JavaMethod < ::Protobuf::Message; end
|
31
|
+
class JavaStackTraceElement < ::Protobuf::Message; end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
32
35
|
class Source < ::Protobuf::Message; end
|
33
36
|
class GherkinDocument < ::Protobuf::Message
|
34
37
|
class Comment < ::Protobuf::Message; end
|
@@ -220,22 +223,22 @@ module Cucumber
|
|
220
223
|
end
|
221
224
|
|
222
225
|
class SourceReference
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
226
|
+
class JavaMethod
|
227
|
+
optional :string, :class_name, 1
|
228
|
+
optional :string, :method_name, 2
|
229
|
+
repeated :string, :method_parameter_types, 3
|
230
|
+
end
|
228
231
|
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
232
|
+
class JavaStackTraceElement
|
233
|
+
optional :string, :class_name, 1
|
234
|
+
optional :string, :method_name, 2
|
235
|
+
optional :string, :file_name, 3
|
236
|
+
end
|
234
237
|
|
235
|
-
|
236
|
-
optional
|
237
|
-
optional
|
238
|
-
optional
|
238
|
+
optional :string, :uri, 1
|
239
|
+
optional ::Cucumber::Messages::SourceReference::JavaMethod, :java_method, 3
|
240
|
+
optional ::Cucumber::Messages::SourceReference::JavaStackTraceElement, :java_stack_trace_element, 4
|
241
|
+
optional ::Cucumber::Messages::Location, :location, 2
|
239
242
|
end
|
240
243
|
|
241
244
|
class Source
|
@@ -362,6 +365,7 @@ module Cucumber
|
|
362
365
|
optional :string, :media_type, 5
|
363
366
|
optional ::Cucumber::Messages::Attachment::ContentEncoding, :content_encoding, 6
|
364
367
|
optional :string, :file_name, 7
|
368
|
+
optional :string, :url, 8
|
365
369
|
end
|
366
370
|
|
367
371
|
class Pickle
|
@@ -5,8 +5,13 @@ module Cucumber
|
|
5
5
|
class NdjsonToMessageEnumerator < Enumerator
|
6
6
|
def initialize(io)
|
7
7
|
super() do |yielder|
|
8
|
-
io.each_line do |
|
9
|
-
|
8
|
+
io.each_line do |line|
|
9
|
+
next if line.strip.empty?
|
10
|
+
begin
|
11
|
+
m = Cucumber::Messages::Envelope.from_json(line)
|
12
|
+
rescue => e
|
13
|
+
raise "Not JSON: #{line.strip}"
|
14
|
+
end
|
10
15
|
yielder.yield(m)
|
11
16
|
end
|
12
17
|
end
|
@@ -69,6 +69,22 @@ module Cucumber
|
|
69
69
|
expect(incoming_messages.to_a).to(eq(outgoing_messages))
|
70
70
|
end
|
71
71
|
|
72
|
+
it "ignores empty lines" do
|
73
|
+
outgoing_messages = [
|
74
|
+
Envelope.new(source: Source.new(data: 'Feature: Hello')),
|
75
|
+
Envelope.new(attachment: Attachment.new(binary: [1,2,3,4].pack('C*')))
|
76
|
+
]
|
77
|
+
|
78
|
+
io = StringIO.new
|
79
|
+
write_outgoing_messages(outgoing_messages, io)
|
80
|
+
io.write("\n\n")
|
81
|
+
|
82
|
+
io.rewind
|
83
|
+
incoming_messages = NdjsonToMessageEnumerator.new(io)
|
84
|
+
|
85
|
+
expect(incoming_messages.to_a).to(eq(outgoing_messages))
|
86
|
+
end
|
87
|
+
|
72
88
|
it "ignores missing fields" do
|
73
89
|
io = StringIO.new
|
74
90
|
io.puts('{"unused": 99}')
|
@@ -79,6 +95,16 @@ module Cucumber
|
|
79
95
|
expect(incoming_messages.to_a).to(eq([Envelope.new]))
|
80
96
|
end
|
81
97
|
|
98
|
+
it "includes offending line in error message" do
|
99
|
+
io = StringIO.new
|
100
|
+
io.puts('BLA BLA')
|
101
|
+
|
102
|
+
io.rewind
|
103
|
+
incoming_messages = NdjsonToMessageEnumerator.new(io)
|
104
|
+
|
105
|
+
expect { incoming_messages.to_a }.to(raise_error('Not JSON: BLA BLA'))
|
106
|
+
end
|
107
|
+
|
82
108
|
def write_outgoing_messages(messages, out)
|
83
109
|
messages.each do |message|
|
84
110
|
message.write_ndjson_to(out)
|
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: 13.2.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: 2020-
|
11
|
+
date: 2020-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: protobuf-cucumber
|
@@ -56,20 +56,20 @@ dependencies:
|
|
56
56
|
requirements:
|
57
57
|
- - "~>"
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: '3.
|
59
|
+
version: '3.10'
|
60
60
|
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 3.
|
62
|
+
version: 3.10.0
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '3.
|
69
|
+
version: '3.10'
|
70
70
|
- - ">="
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: 3.
|
72
|
+
version: 3.10.0
|
73
73
|
description: Protocol Buffer messages for Cucumber's inter-process communication
|
74
74
|
email: cukes@googlegroups.com
|
75
75
|
executables: []
|
@@ -122,11 +122,11 @@ requirements: []
|
|
122
122
|
rubygems_version: 3.1.2
|
123
123
|
signing_key:
|
124
124
|
specification_version: 4
|
125
|
-
summary: cucumber-messages-
|
125
|
+
summary: cucumber-messages-13.2.1
|
126
126
|
test_files:
|
127
127
|
- spec/capture_warnings.rb
|
128
|
-
- spec/cucumber/messages/time_conversion_spec.rb
|
129
128
|
- spec/cucumber/messages/id_generator_spec.rb
|
130
129
|
- spec/cucumber/messages/ndjson_serialization_spec.rb
|
131
|
-
- spec/cucumber/messages/version_spec.rb
|
132
130
|
- spec/cucumber/messages/protobuf_serialization_spec.rb
|
131
|
+
- spec/cucumber/messages/time_conversion_spec.rb
|
132
|
+
- spec/cucumber/messages/version_spec.rb
|