cucumber-wire 7.0.0 → 8.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/CHANGELOG.md +12 -4
- data/LICENSE +17 -18
- data/README.md +8 -8
- data/lib/cucumber/wire/add_hooks_filter.rb +5 -3
- data/lib/cucumber/wire/configuration.rb +5 -2
- data/lib/cucumber/wire/connection.rb +8 -3
- data/lib/cucumber/wire/connections.rb +5 -2
- data/lib/cucumber/wire/data_packet.rb +6 -3
- data/lib/cucumber/wire/exception.rb +14 -9
- data/lib/cucumber/wire/plugin.rb +2 -0
- data/lib/cucumber/wire/protocol/requests.rb +26 -14
- data/lib/cucumber/wire/protocol.rb +2 -1
- data/lib/cucumber/wire/request_handler.rb +10 -7
- data/lib/cucumber/wire/snippet.rb +6 -4
- data/lib/cucumber/wire/step_argument.rb +3 -1
- data/lib/cucumber/wire/step_definition.rb +11 -6
- data/lib/cucumber/wire.rb +2 -0
- metadata +97 -27
- data/CHANGELOG.old.md +0 -71
- data/CONTRIBUTING.md +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67804fb6185fce9e80fecb0fa7875bcc8c67b4453ba3d175d1123e1e4f7b1f53
|
4
|
+
data.tar.gz: 273f55d1db741f40876284e6a8901dd35c95948cc6e96f4dc1309f825abaa7fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc7f21f800471aa5c2755944b7544cda0e976930ce1796e7bb0364dde63a6a843a4e80cb98b8291f4d921c5b5de159743a000e248e4af997c0a923f0dbfa4b76
|
7
|
+
data.tar.gz: 310728205278fbce127e06b9beb5c6fc7f6eb4cdf2fc869e840eeb1112f6ee7a95157e7c3ec88acfd69ce0686d750448252ea752409a63145fa52338097a570c
|
data/CHANGELOG.md
CHANGED
@@ -10,9 +10,18 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
|
|
10
10
|
|
11
11
|
## [Unreleased]
|
12
12
|
|
13
|
-
## [
|
13
|
+
## [8.0.0] - 2025-10-14
|
14
14
|
### Added
|
15
|
+
- Added some basic rubocop compliance to suite (More fixes to come) ([#69](https://github.com/cucumber/cucumber-ruby-wire/pull/69) [#70](https://github.com/cucumber/cucumber-ruby-wire/pull/70) [#84](https://github.com/cucumber/cucumber-ruby-wire/pull/84))
|
15
16
|
|
17
|
+
### Changed
|
18
|
+
- Minimum ruby version is now 3.1 ([#82](https://github.com/cucumber/cucumber-ruby-wire/pull/82))
|
19
|
+
- Enabled latest versions of `cucumber-core` and `cucumber-expressions` ([#82](https://github.com/cucumber/cucumber-ruby-wire/pull/82))
|
20
|
+
|
21
|
+
### Fixed
|
22
|
+
- When unknown errors are called, a more Ruby 3.5-esque way of displaying `NoMethodError` is performed ([#85](https://github.com/cucumber/cucumber-ruby-wire/pull/85))
|
23
|
+
|
24
|
+
## [7.0.0] - 2023-11-10
|
16
25
|
### Changed
|
17
26
|
- Minimum ruby version is now 2.6 ([#68](https://github.com/cucumber/cucumber-ruby-wire/pull/68))
|
18
27
|
- Compatibility with cucumber versions up to cucumber 9.x now added ([#68](https://github.com/cucumber/cucumber-ruby-wire/pull/68))
|
@@ -20,8 +29,6 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
|
|
20
29
|
### Fixed
|
21
30
|
- Fixed up some basic style incompatibilities with old rspec tests ([#68](https://github.com/cucumber/cucumber-ruby-wire/pull/68))
|
22
31
|
|
23
|
-
### Removed
|
24
|
-
|
25
32
|
## [6.2.1] - 2022-01-07
|
26
33
|
### Fixed
|
27
34
|
- Fix usage with message-related formatters like `html-formatter` ([#57](https://github.com/cucumber/cucumber-ruby-wire/pull/57))
|
@@ -56,7 +63,8 @@ do so, use `Cucumber::Wire::Plugin.installed?`.
|
|
56
63
|
This brings breaking changes because of internal changes in Cucumber::Messages.
|
57
64
|
([#44](https://github.com/cucumber/cucumber-ruby-wire/pull/44))
|
58
65
|
|
59
|
-
[Unreleased]: https://github.com/cucumber/cucumber-ruby-wire/compare/
|
66
|
+
[Unreleased]: https://github.com/cucumber/cucumber-ruby-wire/compare/v8.0.0...HEAD
|
67
|
+
[8.0.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v7.0.0...v8.0.0
|
60
68
|
[7.0.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.2.1...v7.0.0
|
61
69
|
[6.2.1]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.2.0...v6.2.1
|
62
70
|
[6.2.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.1.1...v6.2.0
|
data/LICENSE
CHANGED
@@ -1,22 +1,21 @@
|
|
1
|
-
|
1
|
+
MIT License
|
2
2
|
|
3
|
-
Copyright (c) 2015 Cucumber Ltd
|
3
|
+
Copyright (c) 2015 Cucumber Ltd and contributors
|
4
4
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
the following conditions:
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
12
11
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
15
14
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
OF
|
22
|
-
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -1,18 +1,18 @@
|
|
1
|
-
[](https://github.com/cucumber/cucumber-ruby-wire/actions/workflows/test.yaml)
|
2
2
|
|
3
3
|
# cucumber-wire
|
4
4
|
|
5
|
-
This gem was extracted from the [cucumber gem](https://github.com/cucumber/cucumber-ruby)
|
5
|
+
This gem was extracted from the [cucumber gem](https://github.com/cucumber/cucumber-ruby)
|
6
6
|
|
7
|
-
|
7
|
+
This is available as an optional runtime dependency for cucumber-ruby and also as a runtime dependency for cucumber cpp.
|
8
8
|
|
9
|
-
|
9
|
+
The tests here are a bit hairy and prone to the occasional flicker.
|
10
10
|
|
11
11
|
## Configuration
|
12
12
|
|
13
|
-
You can configure the connection using a
|
13
|
+
You can configure the connection using a YML file called a `.wire` file:
|
14
14
|
|
15
|
-
```
|
15
|
+
```yml
|
16
16
|
host: localhost
|
17
17
|
port: 54321
|
18
18
|
timeout:
|
@@ -26,11 +26,11 @@ timeout:
|
|
26
26
|
|
27
27
|
The default timeout is 120 seconds. `connect` has a default timeout of 11 seconds.
|
28
28
|
|
29
|
-
###
|
29
|
+
### YML with ERB templating
|
30
30
|
|
31
31
|
The file format is YAML, with ERB templating, so you could make the configuration configurable:
|
32
32
|
|
33
|
-
```
|
33
|
+
```yml,erb
|
34
34
|
host: localhost
|
35
35
|
port: 54321
|
36
36
|
timeout:
|
@@ -1,10 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Cucumber
|
2
4
|
module Wire
|
3
5
|
class AddHooksFilter < Core::Filter.new(:connections)
|
4
6
|
def test_case(test_case)
|
5
|
-
test_case
|
6
|
-
with_steps([before_hook(test_case)] + test_case.test_steps + [after_hook(test_case)])
|
7
|
-
describe_to receiver
|
7
|
+
test_case
|
8
|
+
.with_steps([before_hook(test_case)] + test_case.test_steps + [after_hook(test_case)])
|
9
|
+
.describe_to receiver
|
8
10
|
end
|
9
11
|
|
10
12
|
def before_hook(test_case)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'yaml'
|
2
4
|
require 'erb'
|
3
5
|
|
@@ -14,16 +16,17 @@ module Cucumber
|
|
14
16
|
def initialize(args)
|
15
17
|
@host = args['host']
|
16
18
|
@port = args['port']
|
17
|
-
@unix = args['unix']
|
19
|
+
@unix = args['unix'] unless RUBY_PLATFORM.match?(/mingw|mswin/)
|
18
20
|
@timeouts = DEFAULT_TIMEOUTS.merge(args['timeout'] || {})
|
19
21
|
end
|
20
22
|
|
21
23
|
def timeout(message = nil)
|
22
|
-
|
24
|
+
@timeouts[message.to_s] || 3
|
23
25
|
end
|
24
26
|
|
25
27
|
def to_s
|
26
28
|
return @unix if @unix
|
29
|
+
|
27
30
|
"#{@host}:#{@port}"
|
28
31
|
end
|
29
32
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'timeout'
|
2
4
|
require 'cucumber/wire/protocol'
|
3
5
|
require 'cucumber/wire/exception'
|
@@ -22,7 +24,8 @@ module Cucumber
|
|
22
24
|
response = fetch_data_from_socket(@config.timeout(message))
|
23
25
|
response.handle_with(request_handler)
|
24
26
|
rescue Timeout::Error => e
|
25
|
-
backtrace = e.backtrace
|
27
|
+
backtrace = e.backtrace
|
28
|
+
backtrace.shift # because Timeout puts some weird stuff in there
|
26
29
|
raise Timeout::Error, "Timed out calling wire server with message '#{message}'", backtrace
|
27
30
|
end
|
28
31
|
end
|
@@ -44,18 +47,20 @@ module Cucumber
|
|
44
47
|
else
|
45
48
|
Timeout.timeout(timeout) { socket.gets }
|
46
49
|
end
|
47
|
-
raise exception({'message' => "Remote Socket with #{@config.host}:#{@config.port} closed."}) if raw_response.nil?
|
50
|
+
raise exception({ 'message' => "Remote Socket with #{@config.host}:#{@config.port} closed." }) if raw_response.nil?
|
51
|
+
|
48
52
|
DataPacket.parse(raw_response)
|
49
53
|
end
|
50
54
|
|
51
55
|
def socket
|
52
56
|
return @socket if @socket
|
57
|
+
|
53
58
|
if @config.unix
|
54
59
|
@socket = UNIXSocket.new(@config.unix)
|
55
60
|
else
|
56
61
|
@socket = TCPSocket.new(@config.host, @config.port)
|
57
62
|
end
|
58
|
-
rescue Errno::ECONNREFUSED
|
63
|
+
rescue Errno::ECONNREFUSED
|
59
64
|
raise(ConnectionError, "Unable to contact the wire server at #{@config}. Is it up?")
|
60
65
|
end
|
61
66
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'json'
|
2
4
|
require 'socket'
|
3
5
|
require 'cucumber/wire/connection'
|
@@ -11,13 +13,13 @@ require 'cucumber/step_match'
|
|
11
13
|
|
12
14
|
module Cucumber
|
13
15
|
module Wire
|
14
|
-
|
15
16
|
class Connections
|
16
17
|
attr_reader :connections, :configuration, :registry
|
17
18
|
private :connections
|
18
19
|
|
19
20
|
def initialize(connections, configuration, registry)
|
20
21
|
raise ArgumentError unless connections
|
22
|
+
|
21
23
|
@connections = connections
|
22
24
|
@configuration = configuration
|
23
25
|
@registry = registry
|
@@ -26,12 +28,13 @@ module Cucumber
|
|
26
28
|
def find_match(test_step)
|
27
29
|
matches = step_matches(test_step.name)
|
28
30
|
return unless matches.any?
|
31
|
+
|
29
32
|
# TODO: handle ambiguous matches (push to cucumber?)
|
30
33
|
matches.first
|
31
34
|
end
|
32
35
|
|
33
36
|
def step_matches(step_name)
|
34
|
-
connections.map{ |c| c.step_matches(step_name, @registry)}.flatten
|
37
|
+
connections.map { |c| c.step_matches(step_name, @registry) }.flatten
|
35
38
|
end
|
36
39
|
|
37
40
|
def begin_scenario(test_case)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'json'
|
2
4
|
|
3
5
|
module Cucumber
|
@@ -17,17 +19,18 @@ module Cucumber
|
|
17
19
|
attr_reader :message, :params
|
18
20
|
|
19
21
|
def initialize(message, params = nil)
|
20
|
-
@message
|
22
|
+
@message = message
|
23
|
+
@params = params
|
21
24
|
end
|
22
25
|
|
23
|
-
def to_json
|
26
|
+
def to_json(*_args)
|
24
27
|
packet = [@message]
|
25
28
|
packet << @params if @params
|
26
29
|
JSON.generate(packet)
|
27
30
|
end
|
28
31
|
|
29
32
|
def handle_with(handler)
|
30
|
-
handler.send("handle_#{@message}", @params)
|
33
|
+
handler.send(:"handle_#{@message}", @params)
|
31
34
|
end
|
32
35
|
end
|
33
36
|
end
|
@@ -1,27 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Cucumber
|
2
4
|
module Wire
|
3
|
-
# Proxy for an exception that
|
5
|
+
# Proxy for an exception that occurred at the remote end of the wire
|
4
6
|
class Exception < StandardError
|
5
7
|
module CanSetName
|
6
8
|
attr_writer :exception_name
|
9
|
+
|
7
10
|
def to_s
|
8
11
|
@exception_name
|
9
12
|
end
|
10
13
|
end
|
11
14
|
|
12
15
|
def initialize(args, config)
|
13
|
-
super
|
16
|
+
super(args['message'])
|
17
|
+
|
14
18
|
if args['exception']
|
15
19
|
self.class.extend(CanSetName)
|
16
20
|
self.class.exception_name = "#{args['exception']} from #{config}"
|
17
21
|
end
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
|
23
|
+
return unless args['backtrace']
|
24
|
+
|
25
|
+
@backtrace = if args['backtrace'].is_a?(String)
|
26
|
+
args['backtrace'].split("\n") # TODO: change cuke4nuke to pass an array instead of a big string
|
27
|
+
else
|
28
|
+
args['backtrace']
|
29
|
+
end
|
25
30
|
end
|
26
31
|
|
27
32
|
def backtrace
|
data/lib/cucumber/wire/plugin.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'cucumber/wire/request_handler'
|
2
4
|
require 'cucumber/wire/step_argument'
|
3
5
|
|
@@ -9,7 +11,7 @@ module Cucumber
|
|
9
11
|
def execute(name_to_match)
|
10
12
|
@name_to_match = name_to_match
|
11
13
|
request_params = {
|
12
|
-
:
|
14
|
+
name_to_match: name_to_match
|
13
15
|
}
|
14
16
|
super(request_params)
|
15
17
|
end
|
@@ -20,7 +22,7 @@ module Cucumber
|
|
20
22
|
end
|
21
23
|
end
|
22
24
|
|
23
|
-
alias
|
25
|
+
alias handle_step_matches handle_success
|
24
26
|
|
25
27
|
private
|
26
28
|
|
@@ -40,9 +42,9 @@ module Cucumber
|
|
40
42
|
class SnippetText < RequestHandler
|
41
43
|
def execute(step_keyword, step_name, multiline_arg_class_name)
|
42
44
|
request_params = {
|
43
|
-
:
|
44
|
-
:
|
45
|
-
:
|
45
|
+
step_keyword: step_keyword,
|
46
|
+
step_name: step_name,
|
47
|
+
multiline_arg_class: multiline_arg_class_name
|
46
48
|
}
|
47
49
|
super(request_params)
|
48
50
|
end
|
@@ -51,20 +53,20 @@ module Cucumber
|
|
51
53
|
snippet_text
|
52
54
|
end
|
53
55
|
|
54
|
-
alias
|
56
|
+
alias handle_snippet_text handle_success
|
55
57
|
end
|
56
58
|
|
57
59
|
class Invoke < RequestHandler
|
58
60
|
def execute(step_definition_id, args)
|
59
61
|
request_params = {
|
60
|
-
:
|
61
|
-
:
|
62
|
+
id: step_definition_id,
|
63
|
+
args: args
|
62
64
|
}
|
63
65
|
super(request_params)
|
64
66
|
end
|
65
67
|
|
66
68
|
def handle_pending(message)
|
67
|
-
raise Pending, message ||
|
69
|
+
raise Pending, message || 'TODO'
|
68
70
|
end
|
69
71
|
|
70
72
|
def handle_diff!(tables)
|
@@ -82,7 +84,7 @@ module Cucumber
|
|
82
84
|
@connection.diff_ok
|
83
85
|
end
|
84
86
|
|
85
|
-
alias
|
87
|
+
alias handle_step_failed handle_fail
|
86
88
|
|
87
89
|
private
|
88
90
|
|
@@ -92,11 +94,11 @@ module Cucumber
|
|
92
94
|
end
|
93
95
|
|
94
96
|
class DiffFailed < RequestHandler
|
95
|
-
alias
|
97
|
+
alias handle_step_failed handle_fail
|
96
98
|
end
|
97
99
|
|
98
100
|
class DiffOk < RequestHandler
|
99
|
-
alias
|
101
|
+
alias handle_step_failed handle_fail
|
100
102
|
end
|
101
103
|
|
102
104
|
class HookRequestHandler < RequestHandler
|
@@ -104,11 +106,22 @@ module Cucumber
|
|
104
106
|
super(request_params(test_case))
|
105
107
|
end
|
106
108
|
|
109
|
+
def method_missing(name, *args, &block)
|
110
|
+
# TODO: Hard-code this until Ruby 3.4 is a minimum then this can be removed
|
111
|
+
raise NoMethodError, "Undefined method '#{name}' for #{self.class}"
|
112
|
+
end
|
113
|
+
|
114
|
+
def respond_to_missing?(name, include_private = false)
|
115
|
+
# TODO: Remove this once ruby 3.4 is the minimum
|
116
|
+
super
|
117
|
+
end
|
118
|
+
|
107
119
|
private
|
108
120
|
|
109
121
|
def request_params(test_case)
|
110
122
|
return nil unless test_case.tags.any?
|
111
|
-
|
123
|
+
|
124
|
+
{ 'tags' => clean_tag_names(test_case.tags) }
|
112
125
|
end
|
113
126
|
|
114
127
|
def clean_tag_names(tags)
|
@@ -119,7 +132,6 @@ module Cucumber
|
|
119
132
|
BeginScenario = Class.new(HookRequestHandler)
|
120
133
|
|
121
134
|
EndScenario = Class.new(HookRequestHandler)
|
122
|
-
|
123
135
|
end
|
124
136
|
end
|
125
137
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Cucumber
|
2
4
|
module Wire
|
3
5
|
class RequestHandler
|
@@ -15,18 +17,19 @@ module Cucumber
|
|
15
17
|
raise @connection.exception(params)
|
16
18
|
end
|
17
19
|
|
18
|
-
def handle_success(params)
|
19
|
-
end
|
20
|
+
def handle_success(params); end
|
20
21
|
|
21
22
|
private
|
22
23
|
|
23
24
|
# Props to Rails
|
24
25
|
def underscore(camel_cased_word)
|
25
|
-
camel_cased_word
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
26
|
+
camel_cased_word
|
27
|
+
.to_s
|
28
|
+
.gsub('::', '/')
|
29
|
+
.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
|
30
|
+
.gsub(/([a-z\d])([A-Z])/, '\1_\2')
|
31
|
+
.tr('-', '_')
|
32
|
+
.downcase
|
30
33
|
end
|
31
34
|
end
|
32
35
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Cucumber
|
2
4
|
module Wire
|
3
5
|
module Snippet
|
@@ -7,22 +9,22 @@ module Cucumber
|
|
7
9
|
@connections = connections
|
8
10
|
end
|
9
11
|
|
10
|
-
def call(code_keyword, step_name, multiline_arg,
|
12
|
+
def call(code_keyword, step_name, multiline_arg, _snippet_type)
|
11
13
|
@connections.snippets(code_keyword, step_name, MultilineArgClassName.new(multiline_arg).to_s).join("\n")
|
12
14
|
end
|
13
15
|
|
14
16
|
class MultilineArgClassName
|
15
17
|
def initialize(arg)
|
16
18
|
arg.describe_to(self)
|
17
|
-
@result =
|
19
|
+
@result = ''
|
18
20
|
end
|
19
21
|
|
20
22
|
def data_table(*)
|
21
|
-
@result =
|
23
|
+
@result = 'Cucumber::MultilineArgument::DataTable'
|
22
24
|
end
|
23
25
|
|
24
26
|
def doc_string(*)
|
25
|
-
@result =
|
27
|
+
@result = 'Cucumber::MultilineArgument::DocString'
|
26
28
|
end
|
27
29
|
|
28
30
|
def to_s
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'cucumber/cucumber_expressions/group'
|
3
4
|
|
4
5
|
module Cucumber
|
@@ -9,7 +10,8 @@ module Cucumber
|
|
9
10
|
attr_reader :offset
|
10
11
|
|
11
12
|
def initialize(offset, val)
|
12
|
-
@offset
|
13
|
+
@offset = offset
|
14
|
+
@value = val
|
13
15
|
end
|
14
16
|
|
15
17
|
def value(_current_world)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'cucumber/core/test/location'
|
2
4
|
|
3
5
|
module Cucumber
|
@@ -7,17 +9,20 @@ module Cucumber
|
|
7
9
|
|
8
10
|
def initialize(connection, data, registry)
|
9
11
|
@connection = connection
|
10
|
-
@registry
|
11
|
-
@id
|
12
|
-
@regexp_source
|
13
|
-
|
14
|
-
|
12
|
+
@registry = registry
|
13
|
+
@id = data['id']
|
14
|
+
@regexp_source = begin
|
15
|
+
Regexp.new(data['regexp'])
|
16
|
+
rescue StandardError
|
17
|
+
data['regexp'] || 'Unknown'
|
18
|
+
end
|
19
|
+
@expression = registry.create_expression(@regexp_source)
|
20
|
+
@location = Core::Test::Location.from_file_colon_line(data['source'] || 'unknown:0')
|
15
21
|
end
|
16
22
|
|
17
23
|
def invoke(args)
|
18
24
|
@connection.invoke(@id, args)
|
19
25
|
end
|
20
|
-
|
21
26
|
end
|
22
27
|
end
|
23
28
|
end
|
data/lib/cucumber/wire.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-wire
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 8.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Wynne
|
8
|
-
|
8
|
+
- Aurelien Reeves
|
9
|
+
- Luke Hill
|
10
|
+
autorequire:
|
9
11
|
bindir: bin
|
10
12
|
cert_chain: []
|
11
|
-
date:
|
13
|
+
date: 2025-10-14 00:00:00.000000000 Z
|
12
14
|
dependencies:
|
13
15
|
- !ruby/object:Gem::Dependency
|
14
16
|
name: cucumber-core
|
@@ -16,20 +18,20 @@ dependencies:
|
|
16
18
|
requirements:
|
17
19
|
- - ">"
|
18
20
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
21
|
+
version: '11'
|
20
22
|
- - "<"
|
21
23
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
24
|
+
version: '16'
|
23
25
|
type: :runtime
|
24
26
|
prerelease: false
|
25
27
|
version_requirements: !ruby/object:Gem::Requirement
|
26
28
|
requirements:
|
27
29
|
- - ">"
|
28
30
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
31
|
+
version: '11'
|
30
32
|
- - "<"
|
31
33
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
34
|
+
version: '16'
|
33
35
|
- !ruby/object:Gem::Dependency
|
34
36
|
name: cucumber-cucumber-expressions
|
35
37
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +41,7 @@ dependencies:
|
|
39
41
|
version: '14'
|
40
42
|
- - "<"
|
41
43
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
44
|
+
version: '20'
|
43
45
|
type: :runtime
|
44
46
|
prerelease: false
|
45
47
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,69 +51,139 @@ dependencies:
|
|
49
51
|
version: '14'
|
50
52
|
- - "<"
|
51
53
|
- !ruby/object:Gem::Version
|
52
|
-
version: '
|
54
|
+
version: '20'
|
53
55
|
- !ruby/object:Gem::Dependency
|
54
56
|
name: aruba
|
55
57
|
requirement: !ruby/object:Gem::Requirement
|
56
58
|
requirements:
|
57
59
|
- - "~>"
|
58
60
|
- !ruby/object:Gem::Version
|
59
|
-
version: '2.
|
61
|
+
version: '2.2'
|
60
62
|
type: :development
|
61
63
|
prerelease: false
|
62
64
|
version_requirements: !ruby/object:Gem::Requirement
|
63
65
|
requirements:
|
64
66
|
- - "~>"
|
65
67
|
- !ruby/object:Gem::Version
|
66
|
-
version: '2.
|
68
|
+
version: '2.2'
|
67
69
|
- !ruby/object:Gem::Dependency
|
68
70
|
name: cucumber
|
69
71
|
requirement: !ruby/object:Gem::Requirement
|
70
72
|
requirements:
|
71
73
|
- - ">"
|
72
74
|
- !ruby/object:Gem::Version
|
73
|
-
version: '
|
75
|
+
version: '8'
|
74
76
|
- - "<"
|
75
77
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
78
|
+
version: '11'
|
77
79
|
type: :development
|
78
80
|
prerelease: false
|
79
81
|
version_requirements: !ruby/object:Gem::Requirement
|
80
82
|
requirements:
|
81
83
|
- - ">"
|
82
84
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
85
|
+
version: '8'
|
84
86
|
- - "<"
|
85
87
|
- !ruby/object:Gem::Version
|
86
|
-
version: '
|
88
|
+
version: '11'
|
87
89
|
- !ruby/object:Gem::Dependency
|
88
90
|
name: rake
|
89
91
|
requirement: !ruby/object:Gem::Requirement
|
90
92
|
requirements:
|
91
93
|
- - "~>"
|
92
94
|
- !ruby/object:Gem::Version
|
93
|
-
version: '13.
|
95
|
+
version: '13.3'
|
94
96
|
type: :development
|
95
97
|
prerelease: false
|
96
98
|
version_requirements: !ruby/object:Gem::Requirement
|
97
99
|
requirements:
|
98
100
|
- - "~>"
|
99
101
|
- !ruby/object:Gem::Version
|
100
|
-
version: '13.
|
102
|
+
version: '13.3'
|
101
103
|
- !ruby/object:Gem::Dependency
|
102
104
|
name: rspec
|
103
105
|
requirement: !ruby/object:Gem::Requirement
|
104
106
|
requirements:
|
105
107
|
- - "~>"
|
106
108
|
- !ruby/object:Gem::Version
|
107
|
-
version: '3.
|
109
|
+
version: '3.13'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '3.13'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: rubocop
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: 1.81.0
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - "~>"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: 1.81.0
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: rubocop-packaging
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - "~>"
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: 0.6.0
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - "~>"
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: 0.6.0
|
145
|
+
- !ruby/object:Gem::Dependency
|
146
|
+
name: rubocop-performance
|
147
|
+
requirement: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - "~>"
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: 1.26.0
|
152
|
+
type: :development
|
153
|
+
prerelease: false
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - "~>"
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: 1.26.0
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: rubocop-rake
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - "~>"
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: 0.7.1
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - "~>"
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: 0.7.1
|
173
|
+
- !ruby/object:Gem::Dependency
|
174
|
+
name: rubocop-rspec
|
175
|
+
requirement: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - "~>"
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: 3.7.0
|
108
180
|
type: :development
|
109
181
|
prerelease: false
|
110
182
|
version_requirements: !ruby/object:Gem::Requirement
|
111
183
|
requirements:
|
112
184
|
- - "~>"
|
113
185
|
- !ruby/object:Gem::Version
|
114
|
-
version:
|
186
|
+
version: 3.7.0
|
115
187
|
description: Wire protocol for Cucumber
|
116
188
|
email: cukes@googlegroups.com
|
117
189
|
executables: []
|
@@ -119,8 +191,6 @@ extensions: []
|
|
119
191
|
extra_rdoc_files: []
|
120
192
|
files:
|
121
193
|
- CHANGELOG.md
|
122
|
-
- CHANGELOG.old.md
|
123
|
-
- CONTRIBUTING.md
|
124
194
|
- LICENSE
|
125
195
|
- README.md
|
126
196
|
- lib/cucumber/wire.rb
|
@@ -141,7 +211,7 @@ homepage: http://cucumber.io
|
|
141
211
|
licenses:
|
142
212
|
- MIT
|
143
213
|
metadata: {}
|
144
|
-
post_install_message:
|
214
|
+
post_install_message:
|
145
215
|
rdoc_options:
|
146
216
|
- "--charset=UTF-8"
|
147
217
|
require_paths:
|
@@ -150,15 +220,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
150
220
|
requirements:
|
151
221
|
- - ">="
|
152
222
|
- !ruby/object:Gem::Version
|
153
|
-
version: '
|
223
|
+
version: '3.1'
|
154
224
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
155
225
|
requirements:
|
156
226
|
- - ">="
|
157
227
|
- !ruby/object:Gem::Version
|
158
|
-
version:
|
228
|
+
version: 3.2.8
|
159
229
|
requirements: []
|
160
|
-
rubygems_version: 3.
|
161
|
-
signing_key:
|
230
|
+
rubygems_version: 3.4.20
|
231
|
+
signing_key:
|
162
232
|
specification_version: 4
|
163
|
-
summary: cucumber-wire-
|
233
|
+
summary: cucumber-wire-8.0.0
|
164
234
|
test_files: []
|
data/CHANGELOG.old.md
DELETED
@@ -1,71 +0,0 @@
|
|
1
|
-
# Changelog
|
2
|
-
|
3
|
-
Please see [CONTRIBUTING.md](https://github.com/cucumber/cucumber-ruby-wire/blob/main/CONTRIBUTING.md)
|
4
|
-
on how to contribute to Cucumber.
|
5
|
-
|
6
|
-
## [5.0.1]
|
7
|
-
### Changed
|
8
|
-
- Updated `cucumber-core` ~> 9.0.1
|
9
|
-
|
10
|
-
## [5.0.0]
|
11
|
-
### Changed
|
12
|
-
- Update from cucumber-expressions 10 to 12 introduces significant underlying changes
|
13
|
-
in how step definitions are matched. This should be backward compatible but there
|
14
|
-
is a risk of regressions.
|
15
|
-
- Updated dependencies (look at the diff for details)
|
16
|
-
|
17
|
-
## [4.0.1]
|
18
|
-
### Changed
|
19
|
-
- Updated dependencies (look at the diff for details)
|
20
|
-
|
21
|
-
## [3.1.0]
|
22
|
-
### Changed
|
23
|
-
- `cucumber-core` ~> 7.1.0
|
24
|
-
- `cucumber-messages` ~> 12.2.0
|
25
|
-
- Updated gems:
|
26
|
-
|
27
|
-
## [3.0.0]
|
28
|
-
### Changed
|
29
|
-
- Use `cucumber-ruby-core` 7.0.0
|
30
|
-
- cucumber-cucumber-expressions ~> 10
|
31
|
-
- cucumber-messages ~> 12
|
32
|
-
- Updated monorepo libraries:
|
33
|
-
|
34
|
-
## [2.0.1]
|
35
|
-
### Removed
|
36
|
-
- Replace use of `MultiJSON` to use native JSON gem
|
37
|
-
|
38
|
-
## [2.0.0]
|
39
|
-
### Changed
|
40
|
-
- Use `cucumber-ruby-core` 6.0.0
|
41
|
-
|
42
|
-
## [1.2.0]
|
43
|
-
### Added
|
44
|
-
- Use `Cucumber:Messages::IdGenerator::UUID` to provide ids for `Hooks`
|
45
|
-
|
46
|
-
### Removed
|
47
|
-
- Multiline arguments do not need `Location` anymore
|
48
|
-
|
49
|
-
## [1.1.0]
|
50
|
-
### Changed
|
51
|
-
- Update to cucumber-expressions 8.0.2
|
52
|
-
- Update to cucumber 4.0.0
|
53
|
-
|
54
|
-
## [1.0.0]
|
55
|
-
### Added
|
56
|
-
- Added this CHANGELOG.md file per [cucumber/cucumber #251](https://github.com/cucumber/cucumber/issues/251) ([#13](https://github.com/cucumber/cucumber-ruby-wire/pull/13) [jaysonesmith](https://github.com/jaysonesmith))
|
57
|
-
|
58
|
-
### Changed
|
59
|
-
- Changes to work with a modern Cucumber-Ruby ([#14](https://github.com/cucumber/cucumber-ruby-wire/pull/14) [brasmusson](https://github.com/brasmusson))
|
60
|
-
- Adapt to the move of Location to Cucumber::Core::Test ([#14](https://github.com/cucumber/cucumber-ruby-wire/pull/14) [brasmusson](https://github.com/brasmusson))
|
61
|
-
|
62
|
-
[5.0.1]: https://github.com/cucumber/cucumber-ruby-wire/compare/v5.0.0...v5.0.1
|
63
|
-
[5.0.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v4.0.1...v5.0.0
|
64
|
-
[4.0.1]: https://github.com/cucumber/cucumber-ruby-wire/compare/v4.0.0...v4.0.1
|
65
|
-
[3.1.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v3.0.0...v3.1.0
|
66
|
-
[3.0.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v2.0.1...v3.0.0
|
67
|
-
[2.0.1]: https://github.com/cucumber/cucumber-ruby-wire/compare/v2.0.0...v2.0.1
|
68
|
-
[2.0.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v1.2.0...v2.0.0
|
69
|
-
[1.2.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v1.1.0...v1.2.0
|
70
|
-
[1.1.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v1.0.0...v1.1.0
|
71
|
-
[1.0.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v0.0.1...v1.0.0
|
data/CONTRIBUTING.md
DELETED