cucumber-wire 6.2.0 → 7.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 +19 -81
- data/CHANGELOG.old.md +71 -0
- data/README.md +1 -1
- data/lib/cucumber/wire/add_hooks_filter.rb +33 -10
- data/lib/cucumber/wire/connections.rb +1 -2
- data/lib/cucumber/wire/protocol/requests.rb +0 -1
- data/lib/cucumber/wire/step_definition.rb +1 -1
- metadata +33 -81
- data/lib/cucumber/wire/version +0 -1
- data/spec/cucumber/wire/configuration_spec.rb +0 -63
- data/spec/cucumber/wire/connection_spec.rb +0 -64
- data/spec/cucumber/wire/connections_spec.rb +0 -23
- data/spec/cucumber/wire/data_packet_spec.rb +0 -43
- data/spec/cucumber/wire/exception_spec.rb +0 -50
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ab0eaea2ed5f84dd6c54cb2e4a42cae7bc36050fe8157894d029dcbea1f050f0
|
|
4
|
+
data.tar.gz: 71e8d3474a165b7ba3ad09828f2b669cc518128394c39df8371d6cd16f2a78de
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4596a04fe83127c356e3817359594fa635112dfdf6d715321e2a3382a1a03f3bda47eb520b40bf88b9e09b7c553194b0ac06e90ee938b3e6bd3563e1a343d8c7
|
|
7
|
+
data.tar.gz: 605efb4ff4f0e32a564c1b21e19bbcbc23abdd7d54144564f39b3eb93b4a31d4fe50fe4f187413ed7d20b560a755cdf7ebf104de83d3058c24d07213cca7a564
|
data/CHANGELOG.md
CHANGED
|
@@ -10,28 +10,33 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
|
|
|
10
10
|
|
|
11
11
|
## [Unreleased]
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
## [7.0.0] - 2023-11-10
|
|
15
14
|
### Added
|
|
16
15
|
|
|
16
|
+
### Changed
|
|
17
|
+
- Minimum ruby version is now 2.6 ([#68](https://github.com/cucumber/cucumber-ruby-wire/pull/68))
|
|
18
|
+
- Compatibility with cucumber versions up to cucumber 9.x now added ([#68](https://github.com/cucumber/cucumber-ruby-wire/pull/68))
|
|
19
|
+
|
|
17
20
|
### Fixed
|
|
21
|
+
- Fixed up some basic style incompatibilities with old rspec tests ([#68](https://github.com/cucumber/cucumber-ruby-wire/pull/68))
|
|
18
22
|
|
|
19
23
|
### Removed
|
|
20
24
|
|
|
21
|
-
## [6.2.
|
|
25
|
+
## [6.2.1] - 2022-01-07
|
|
26
|
+
### Fixed
|
|
27
|
+
- Fix usage with message-related formatters like `html-formatter` ([#57](https://github.com/cucumber/cucumber-ruby-wire/pull/57))
|
|
28
|
+
- Removed dependency to `cucumber-messages`
|
|
22
29
|
|
|
30
|
+
## [6.2.0] - 2021-10-12
|
|
23
31
|
### Changed
|
|
24
|
-
|
|
25
32
|
- Patched `cucumber-core`, `cucumber-expressions` and `cucumber-messages`
|
|
26
33
|
|
|
27
|
-
## [6.1.1]
|
|
28
|
-
|
|
34
|
+
## [6.1.1] - 2021-08-27
|
|
29
35
|
### Changed
|
|
30
|
-
|
|
31
36
|
- Use the new `InstallPlugin` hook rather than `AfterConfiguration`.
|
|
32
|
-
|
|
37
|
+
([#52](https://github.com/cucumber/cucumber-ruby-wire/pull/52))
|
|
33
38
|
|
|
34
|
-
## [6.1.0]
|
|
39
|
+
## [6.1.0] - 2021-08-09
|
|
35
40
|
### Added
|
|
36
41
|
- The possibility to verify if the plugin has already been installed or not. To
|
|
37
42
|
do so, use `Cucumber::Wire::Plugin.installed?`.
|
|
@@ -41,88 +46,21 @@ do so, use `Cucumber::Wire::Plugin.installed?`.
|
|
|
41
46
|
- `cucumber-wire` is now able to install itself as a plugin into `cucumber-ruby`.
|
|
42
47
|
([46](https://github.com/cucumber/cucumber-ruby-wire/pull/46))
|
|
43
48
|
|
|
44
|
-
## [6.0.1]
|
|
49
|
+
## [6.0.1] - 2021-07-19
|
|
45
50
|
### Changed
|
|
46
51
|
- Patched `cucumber-core` and `cucumber-messages`
|
|
47
52
|
|
|
48
|
-
## [6.0.0]
|
|
53
|
+
## [6.0.0] - 2021-07-09
|
|
49
54
|
### Changed
|
|
50
55
|
- Updated `cucumber-core` ~> 10.0.0 and `cucumber-messages` ~> 17.0.0
|
|
51
56
|
This brings breaking changes because of internal changes in Cucumber::Messages.
|
|
52
57
|
([#44](https://github.com/cucumber/cucumber-ruby-wire/pull/44))
|
|
53
58
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
## [5.0.0]
|
|
59
|
-
### Changed
|
|
60
|
-
- Update from cucumber-expressions 10 to 12 introduces significant underlying changes
|
|
61
|
-
in how step definitions are matched. This should be backward compatible but there
|
|
62
|
-
is a risk of regressions.
|
|
63
|
-
- Updated dependencies (look at the diff for details)
|
|
64
|
-
|
|
65
|
-
## [4.0.1]
|
|
66
|
-
### Changed
|
|
67
|
-
- Updated dependencies (look at the diff for details)
|
|
68
|
-
|
|
69
|
-
## [3.1.0]
|
|
70
|
-
### Changed
|
|
71
|
-
- `cucumber-core` ~> 7.1.0
|
|
72
|
-
- `cucumber-messages` ~> 12.2.0
|
|
73
|
-
- Updated gems:
|
|
74
|
-
|
|
75
|
-
## [3.0.0]
|
|
76
|
-
### Changed
|
|
77
|
-
- Use `cucumber-ruby-core` 7.0.0
|
|
78
|
-
- cucumber-cucumber-expressions ~> 10
|
|
79
|
-
- cucumber-messages ~> 12
|
|
80
|
-
- Updated monorepo libraries:
|
|
81
|
-
|
|
82
|
-
## [2.0.1]
|
|
83
|
-
### Removed
|
|
84
|
-
- Replace use of `MultiJSON` to use native JSON gem
|
|
85
|
-
|
|
86
|
-
## [2.0.0]
|
|
87
|
-
### Changed
|
|
88
|
-
- Use `cucumber-ruby-core` 6.0.0
|
|
89
|
-
|
|
90
|
-
## [1.2.0]
|
|
91
|
-
### Added
|
|
92
|
-
- Use `Cucumber:Messages::IdGenerator::UUID` to provide ids for `Hooks`
|
|
93
|
-
|
|
94
|
-
### Removed
|
|
95
|
-
- Multiline arguments do not need `Location` anymore
|
|
96
|
-
|
|
97
|
-
## [1.1.0]
|
|
98
|
-
### Changed
|
|
99
|
-
- Update to cucumber-expressions 8.0.2
|
|
100
|
-
- Update to cucumber 4.0.0
|
|
101
|
-
|
|
102
|
-
## [1.0.0]
|
|
103
|
-
### Added
|
|
104
|
-
- 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))
|
|
105
|
-
|
|
106
|
-
### Changed
|
|
107
|
-
- Changes to work with a modern Cucumber-Ruby ([#14](https://github.com/cucumber/cucumber-ruby-wire/pull/14) [brasmusson](https://github.com/brasmusson))
|
|
108
|
-
- 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))
|
|
109
|
-
|
|
110
|
-
[Unreleased]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.2.0...main
|
|
59
|
+
[Unreleased]: https://github.com/cucumber/cucumber-ruby-wire/compare/v7.0.0...HEAD
|
|
60
|
+
[7.0.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.2.1...v7.0.0
|
|
61
|
+
[6.2.1]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.2.0...v6.2.1
|
|
111
62
|
[6.2.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.1.1...v6.2.0
|
|
112
63
|
[6.1.1]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.1.0...v6.1.1
|
|
113
64
|
[6.1.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.0.1...v6.1.0
|
|
114
65
|
[6.0.1]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.0.0...v6.0.1
|
|
115
66
|
[6.0.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v5.0.1...v6.0.0
|
|
116
|
-
[5.0.1]: https://github.com/cucumber/cucumber-ruby-wire/compare/v5.0.0...v5.0.1
|
|
117
|
-
[5.0.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v4.0.1...v5.0.0
|
|
118
|
-
[4.0.1]: https://github.com/cucumber/cucumber-ruby-wire/compare/v4.0.0...v4.0.1
|
|
119
|
-
[3.1.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v3.0.0...v3.1.0
|
|
120
|
-
[3.0.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v2.0.1...v3.0.0
|
|
121
|
-
[2.0.1]: https://github.com/cucumber/cucumber-ruby-wire/compare/v2.0.0...v2.0.1
|
|
122
|
-
[2.0.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v1.2.0...v2.0.0
|
|
123
|
-
[1.2.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v1.1.0...v1.2.0
|
|
124
|
-
[1.1.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v1.0.0...v1.1.0
|
|
125
|
-
[1.0.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v0.0.1...v1.0.0
|
|
126
|
-
ire/compare/v6.1.0...main
|
|
127
|
-
[6.1.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.0.1...v6.1.0
|
|
128
|
-
[6.0.1]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.0.0...v6.0.1
|
data/CHANGELOG.old.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
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/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[](https://github.com/cucumber/cucumber-ruby-wire/actions/workflows/cucumber-ruby-wire.yml)
|
|
2
2
|
|
|
3
3
|
# cucumber-wire
|
|
4
4
|
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
require 'cucumber/messages'
|
|
3
|
-
|
|
4
1
|
module Cucumber
|
|
5
2
|
module Wire
|
|
6
3
|
class AddHooksFilter < Core::Filter.new(:connections)
|
|
@@ -13,19 +10,45 @@ module Cucumber
|
|
|
13
10
|
def before_hook(test_case)
|
|
14
11
|
# TODO: is this dependency on Cucumber::Hooks OK? Feels a bit internal..
|
|
15
12
|
# TODO: how do we express the location of the hook? Should we create one hook per connection so we can use the host:port of the connection?
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
|
|
14
|
+
hook = instanciate_wire_hook(:begin_scenario)
|
|
15
|
+
action = ->(result) { hook.invoke('Before', [Cucumber::RunningTestCase.new(test_case).with_result(result), connections]) }
|
|
16
|
+
|
|
17
|
+
hook_step = Cucumber::Hooks.before_hook(id_generator.new_id, Core::Test::Location.new('wire'), &action)
|
|
18
|
+
|
|
19
|
+
configuration.event_bus.hook_test_step_created(hook_step, hook)
|
|
20
|
+
|
|
21
|
+
hook_step
|
|
19
22
|
end
|
|
20
23
|
|
|
21
24
|
def after_hook(test_case)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
hook = instanciate_wire_hook(:end_scenario)
|
|
26
|
+
action = ->(result) { hook.invoke('After', [Cucumber::RunningTestCase.new(test_case).with_result(result), connections]) }
|
|
27
|
+
|
|
28
|
+
hook_step = Cucumber::Hooks.after_hook(id_generator.new_id, Core::Test::Location.new('wire'), &action)
|
|
29
|
+
|
|
30
|
+
configuration.event_bus.hook_test_step_created(hook_step, hook)
|
|
31
|
+
|
|
32
|
+
hook_step
|
|
25
33
|
end
|
|
26
34
|
|
|
27
35
|
def id_generator
|
|
28
|
-
@id_generator ||=
|
|
36
|
+
@id_generator ||= connections.configuration.id_generator
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def configuration
|
|
40
|
+
@configuration ||= connections.configuration
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
private
|
|
44
|
+
|
|
45
|
+
def instanciate_wire_hook(hook_method)
|
|
46
|
+
Cucumber::Glue::Hook.new(
|
|
47
|
+
id_generator.new_id,
|
|
48
|
+
connections.registry,
|
|
49
|
+
[],
|
|
50
|
+
->(test_case, connections) { connections.send(hook_method, test_case) }
|
|
51
|
+
)
|
|
29
52
|
end
|
|
30
53
|
end
|
|
31
54
|
end
|
|
@@ -13,7 +13,7 @@ module Cucumber
|
|
|
13
13
|
module Wire
|
|
14
14
|
|
|
15
15
|
class Connections
|
|
16
|
-
attr_reader :connections
|
|
16
|
+
attr_reader :connections, :configuration, :registry
|
|
17
17
|
private :connections
|
|
18
18
|
|
|
19
19
|
def initialize(connections, configuration, registry)
|
|
@@ -45,7 +45,6 @@ module Cucumber
|
|
|
45
45
|
def snippets(code_keyword, step_name, multiline_arg_class_name)
|
|
46
46
|
connections.map { |c| c.snippet_text(code_keyword, step_name, multiline_arg_class_name) }.flatten
|
|
47
47
|
end
|
|
48
|
-
|
|
49
48
|
end
|
|
50
49
|
end
|
|
51
50
|
end
|
|
@@ -3,7 +3,7 @@ require 'cucumber/core/test/location'
|
|
|
3
3
|
module Cucumber
|
|
4
4
|
module Wire
|
|
5
5
|
class StepDefinition
|
|
6
|
-
attr_reader :regexp_source, :location, :registry, :expression
|
|
6
|
+
attr_reader :id, :regexp_source, :location, :registry, :expression
|
|
7
7
|
|
|
8
8
|
def initialize(connection, data, registry)
|
|
9
9
|
@connection = connection
|
metadata
CHANGED
|
@@ -1,75 +1,55 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cucumber-wire
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 7.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matt Wynne
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-11-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cucumber-core
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - "
|
|
17
|
+
- - ">"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '10.1'
|
|
20
|
-
- - "
|
|
20
|
+
- - "<"
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
|
-
version:
|
|
22
|
+
version: '14'
|
|
23
23
|
type: :runtime
|
|
24
24
|
prerelease: false
|
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
26
|
requirements:
|
|
27
|
-
- - "
|
|
27
|
+
- - ">"
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
29
|
version: '10.1'
|
|
30
|
-
- - "
|
|
30
|
+
- - "<"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version:
|
|
32
|
+
version: '14'
|
|
33
33
|
- !ruby/object:Gem::Dependency
|
|
34
34
|
name: cucumber-cucumber-expressions
|
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
|
-
- - "
|
|
37
|
+
- - ">"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: '14
|
|
40
|
-
- - "
|
|
39
|
+
version: '14'
|
|
40
|
+
- - "<"
|
|
41
41
|
- !ruby/object:Gem::Version
|
|
42
|
-
version:
|
|
42
|
+
version: '18'
|
|
43
43
|
type: :runtime
|
|
44
44
|
prerelease: false
|
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
|
46
46
|
requirements:
|
|
47
|
-
- - "
|
|
47
|
+
- - ">"
|
|
48
48
|
- !ruby/object:Gem::Version
|
|
49
|
-
version: '14
|
|
50
|
-
- - "
|
|
49
|
+
version: '14'
|
|
50
|
+
- - "<"
|
|
51
51
|
- !ruby/object:Gem::Version
|
|
52
|
-
version:
|
|
53
|
-
- !ruby/object:Gem::Dependency
|
|
54
|
-
name: cucumber-messages
|
|
55
|
-
requirement: !ruby/object:Gem::Requirement
|
|
56
|
-
requirements:
|
|
57
|
-
- - "~>"
|
|
58
|
-
- !ruby/object:Gem::Version
|
|
59
|
-
version: '17.1'
|
|
60
|
-
- - ">="
|
|
61
|
-
- !ruby/object:Gem::Version
|
|
62
|
-
version: 17.1.1
|
|
63
|
-
type: :runtime
|
|
64
|
-
prerelease: false
|
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
66
|
-
requirements:
|
|
67
|
-
- - "~>"
|
|
68
|
-
- !ruby/object:Gem::Version
|
|
69
|
-
version: '17.1'
|
|
70
|
-
- - ">="
|
|
71
|
-
- !ruby/object:Gem::Version
|
|
72
|
-
version: 17.1.1
|
|
52
|
+
version: '18'
|
|
73
53
|
- !ruby/object:Gem::Dependency
|
|
74
54
|
name: aruba
|
|
75
55
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -77,9 +57,6 @@ dependencies:
|
|
|
77
57
|
- - "~>"
|
|
78
58
|
- !ruby/object:Gem::Version
|
|
79
59
|
version: '2.0'
|
|
80
|
-
- - ">="
|
|
81
|
-
- !ruby/object:Gem::Version
|
|
82
|
-
version: 2.0.0
|
|
83
60
|
type: :development
|
|
84
61
|
prerelease: false
|
|
85
62
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -87,69 +64,54 @@ dependencies:
|
|
|
87
64
|
- - "~>"
|
|
88
65
|
- !ruby/object:Gem::Version
|
|
89
66
|
version: '2.0'
|
|
90
|
-
- - ">="
|
|
91
|
-
- !ruby/object:Gem::Version
|
|
92
|
-
version: 2.0.0
|
|
93
67
|
- !ruby/object:Gem::Dependency
|
|
94
68
|
name: cucumber
|
|
95
69
|
requirement: !ruby/object:Gem::Requirement
|
|
96
70
|
requirements:
|
|
97
|
-
- - "
|
|
71
|
+
- - ">"
|
|
98
72
|
- !ruby/object:Gem::Version
|
|
99
|
-
version: '7.
|
|
100
|
-
- - "
|
|
73
|
+
version: '7.1'
|
|
74
|
+
- - "<"
|
|
101
75
|
- !ruby/object:Gem::Version
|
|
102
|
-
version:
|
|
76
|
+
version: '10'
|
|
103
77
|
type: :development
|
|
104
78
|
prerelease: false
|
|
105
79
|
version_requirements: !ruby/object:Gem::Requirement
|
|
106
80
|
requirements:
|
|
107
|
-
- - "
|
|
81
|
+
- - ">"
|
|
108
82
|
- !ruby/object:Gem::Version
|
|
109
|
-
version: '7.
|
|
110
|
-
- - "
|
|
83
|
+
version: '7.1'
|
|
84
|
+
- - "<"
|
|
111
85
|
- !ruby/object:Gem::Version
|
|
112
|
-
version:
|
|
86
|
+
version: '10'
|
|
113
87
|
- !ruby/object:Gem::Dependency
|
|
114
88
|
name: rake
|
|
115
89
|
requirement: !ruby/object:Gem::Requirement
|
|
116
90
|
requirements:
|
|
117
91
|
- - "~>"
|
|
118
92
|
- !ruby/object:Gem::Version
|
|
119
|
-
version: '13.
|
|
120
|
-
- - ">="
|
|
121
|
-
- !ruby/object:Gem::Version
|
|
122
|
-
version: 13.0.6
|
|
93
|
+
version: '13.1'
|
|
123
94
|
type: :development
|
|
124
95
|
prerelease: false
|
|
125
96
|
version_requirements: !ruby/object:Gem::Requirement
|
|
126
97
|
requirements:
|
|
127
98
|
- - "~>"
|
|
128
99
|
- !ruby/object:Gem::Version
|
|
129
|
-
version: '13.
|
|
130
|
-
- - ">="
|
|
131
|
-
- !ruby/object:Gem::Version
|
|
132
|
-
version: 13.0.6
|
|
100
|
+
version: '13.1'
|
|
133
101
|
- !ruby/object:Gem::Dependency
|
|
134
102
|
name: rspec
|
|
135
103
|
requirement: !ruby/object:Gem::Requirement
|
|
136
104
|
requirements:
|
|
137
105
|
- - "~>"
|
|
138
106
|
- !ruby/object:Gem::Version
|
|
139
|
-
version: '3.
|
|
140
|
-
- - ">="
|
|
141
|
-
- !ruby/object:Gem::Version
|
|
142
|
-
version: 3.10.0
|
|
107
|
+
version: '3.12'
|
|
143
108
|
type: :development
|
|
144
109
|
prerelease: false
|
|
145
110
|
version_requirements: !ruby/object:Gem::Requirement
|
|
146
111
|
requirements:
|
|
147
112
|
- - "~>"
|
|
148
113
|
- !ruby/object:Gem::Version
|
|
149
|
-
version: '3.
|
|
150
|
-
- - ">="
|
|
151
|
-
- !ruby/object:Gem::Version
|
|
152
|
-
version: 3.10.0
|
|
114
|
+
version: '3.12'
|
|
153
115
|
description: Wire protocol for Cucumber
|
|
154
116
|
email: cukes@googlegroups.com
|
|
155
117
|
executables: []
|
|
@@ -157,6 +119,7 @@ extensions: []
|
|
|
157
119
|
extra_rdoc_files: []
|
|
158
120
|
files:
|
|
159
121
|
- CHANGELOG.md
|
|
122
|
+
- CHANGELOG.old.md
|
|
160
123
|
- CONTRIBUTING.md
|
|
161
124
|
- LICENSE
|
|
162
125
|
- README.md
|
|
@@ -174,12 +137,6 @@ files:
|
|
|
174
137
|
- lib/cucumber/wire/snippet.rb
|
|
175
138
|
- lib/cucumber/wire/step_argument.rb
|
|
176
139
|
- lib/cucumber/wire/step_definition.rb
|
|
177
|
-
- lib/cucumber/wire/version
|
|
178
|
-
- spec/cucumber/wire/configuration_spec.rb
|
|
179
|
-
- spec/cucumber/wire/connection_spec.rb
|
|
180
|
-
- spec/cucumber/wire/connections_spec.rb
|
|
181
|
-
- spec/cucumber/wire/data_packet_spec.rb
|
|
182
|
-
- spec/cucumber/wire/exception_spec.rb
|
|
183
140
|
homepage: http://cucumber.io
|
|
184
141
|
licenses:
|
|
185
142
|
- MIT
|
|
@@ -193,20 +150,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
193
150
|
requirements:
|
|
194
151
|
- - ">="
|
|
195
152
|
- !ruby/object:Gem::Version
|
|
196
|
-
version: '2.
|
|
153
|
+
version: '2.6'
|
|
197
154
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
198
155
|
requirements:
|
|
199
156
|
- - ">="
|
|
200
157
|
- !ruby/object:Gem::Version
|
|
201
158
|
version: '0'
|
|
202
159
|
requirements: []
|
|
203
|
-
rubygems_version: 3.
|
|
160
|
+
rubygems_version: 3.3.5
|
|
204
161
|
signing_key:
|
|
205
162
|
specification_version: 4
|
|
206
|
-
summary: cucumber-wire-
|
|
207
|
-
test_files:
|
|
208
|
-
- spec/cucumber/wire/connections_spec.rb
|
|
209
|
-
- spec/cucumber/wire/connection_spec.rb
|
|
210
|
-
- spec/cucumber/wire/data_packet_spec.rb
|
|
211
|
-
- spec/cucumber/wire/exception_spec.rb
|
|
212
|
-
- spec/cucumber/wire/configuration_spec.rb
|
|
163
|
+
summary: cucumber-wire-7.0.0
|
|
164
|
+
test_files: []
|
data/lib/cucumber/wire/version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
6.2.0
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
require 'cucumber/wire/configuration'
|
|
2
|
-
require 'tempfile'
|
|
3
|
-
|
|
4
|
-
module Cucumber
|
|
5
|
-
module Wire
|
|
6
|
-
describe Configuration do
|
|
7
|
-
let(:wire_file) { Tempfile.new('wire') }
|
|
8
|
-
let(:config) { Configuration.from_file(wire_file.path) }
|
|
9
|
-
|
|
10
|
-
def write_wire_file(contents)
|
|
11
|
-
wire_file << contents
|
|
12
|
-
wire_file.close
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
it "reads the hostname / port from the file" do
|
|
16
|
-
write_wire_file %q{
|
|
17
|
-
host: localhost
|
|
18
|
-
port: 54321
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
expect(config.host).to eq 'localhost'
|
|
22
|
-
expect(config.port).to eq 54321
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
it "reads the timeout for a specific message" do
|
|
26
|
-
write_wire_file %q{
|
|
27
|
-
host: localhost
|
|
28
|
-
port: 54321
|
|
29
|
-
timeout:
|
|
30
|
-
invoke: 99
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
expect(config.timeout('invoke')).to eq 99
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
it "reads the timeout for a connect message" do
|
|
37
|
-
write_wire_file %q{
|
|
38
|
-
host: localhost
|
|
39
|
-
port: 54321
|
|
40
|
-
timeout:
|
|
41
|
-
connect: 99
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
expect(config.timeout('connect')).to eq 99
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
describe "a wire file with no timeouts specified" do
|
|
48
|
-
before(:each) do
|
|
49
|
-
write_wire_file %q{
|
|
50
|
-
host: localhost
|
|
51
|
-
port: 54321
|
|
52
|
-
}
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
%w(invoke begin_scenario end_scenario).each do |message|
|
|
56
|
-
it "sets the default timeout for '#{message}' to 120 seconds" do
|
|
57
|
-
expect(config.timeout(message)).to eq 120
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
|
-
end
|
|
61
|
-
end
|
|
62
|
-
end
|
|
63
|
-
end
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
require 'cucumber/wire/connection'
|
|
2
|
-
require 'cucumber/wire/configuration'
|
|
3
|
-
|
|
4
|
-
module Cucumber
|
|
5
|
-
module Wire
|
|
6
|
-
describe Connection do
|
|
7
|
-
class TestConnection < Connection
|
|
8
|
-
attr_accessor :socket
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
class TestConfiguration
|
|
12
|
-
attr_reader :custom_timeout
|
|
13
|
-
|
|
14
|
-
def initialize
|
|
15
|
-
@custom_timeout = {}
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def timeout(message = nil)
|
|
19
|
-
return :default_timeout if message.nil?
|
|
20
|
-
@custom_timeout[message] || Configuration::DEFAULT_TIMEOUTS.fetch(message)
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def host
|
|
24
|
-
'localhost'
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
def port
|
|
28
|
-
'3902'
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
before(:each) do
|
|
33
|
-
@config = TestConfiguration.new
|
|
34
|
-
@connection = TestConnection.new(@config)
|
|
35
|
-
@connection.socket = @socket = double('socket').as_null_object
|
|
36
|
-
@response = %q{["response"]}
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
it "re-raises a timeout error" do
|
|
40
|
-
allow(Timeout).to receive(:timeout).and_raise(Timeout::Error.new(''))
|
|
41
|
-
expect(-> { @connection.call_remote(nil, :foo, []) }).to raise_error(Timeout::Error)
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
it "ignores timeout errors when configured to do so" do
|
|
45
|
-
@config.custom_timeout[:foo] = :never
|
|
46
|
-
|
|
47
|
-
allow(@socket).to receive(:gets) { @response }
|
|
48
|
-
|
|
49
|
-
handler = double(:handle_response => :response)
|
|
50
|
-
|
|
51
|
-
expect(@connection.call_remote(handler, :foo, [])).to eq :response
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
it "raises an exception on remote connection closed" do
|
|
55
|
-
@config.custom_timeout[:foo] = :never
|
|
56
|
-
|
|
57
|
-
allow(@socket).to receive(:gets)
|
|
58
|
-
expect(-> {
|
|
59
|
-
@connection.call_remote(nil, :foo, [])
|
|
60
|
-
}).to raise_error(Wire::Exception, 'Remote Socket with localhost:3902 closed.')
|
|
61
|
-
end
|
|
62
|
-
end
|
|
63
|
-
end
|
|
64
|
-
end
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
require 'cucumber/wire/connections'
|
|
2
|
-
require 'cucumber/wire/configuration'
|
|
3
|
-
|
|
4
|
-
module Cucumber
|
|
5
|
-
module Wire
|
|
6
|
-
describe Connections do
|
|
7
|
-
describe "#step_matches" do
|
|
8
|
-
it "returns the matches from each of the RemoteSteps" do
|
|
9
|
-
connection1 = double(step_matches: [:a, :b])
|
|
10
|
-
connection2 = double(step_matches: [:c])
|
|
11
|
-
|
|
12
|
-
connections = Connections.new([connection1, connection2], double, double)
|
|
13
|
-
expect(connections.step_matches('')).to eq [:a, :b, :c]
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
it "copes with no connections" do
|
|
17
|
-
connections = Connections.new([], double, double)
|
|
18
|
-
expect(connections.step_matches('')).to eq []
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
require 'cucumber/wire/data_packet'
|
|
2
|
-
|
|
3
|
-
module Cucumber
|
|
4
|
-
module Wire
|
|
5
|
-
describe DataPacket do
|
|
6
|
-
describe "#to_json" do
|
|
7
|
-
it "converts params to a JSON hash" do
|
|
8
|
-
packet = DataPacket.new('test_message', :foo => :bar)
|
|
9
|
-
|
|
10
|
-
expect(packet.to_json).to eq "[\"test_message\",{\"foo\":\"bar\"}]"
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
it "does not pass blank params" do
|
|
14
|
-
packet = DataPacket.new('test_message')
|
|
15
|
-
|
|
16
|
-
expect(packet.to_json).to eq "[\"test_message\"]"
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
describe ".parse" do
|
|
21
|
-
it "understands a raw packet containing null parameters" do
|
|
22
|
-
packet = DataPacket.parse("[\"test_message\",null]")
|
|
23
|
-
|
|
24
|
-
expect(packet.message).to eq 'test_message'
|
|
25
|
-
expect(packet.params).to be_nil
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
it "understands a raw packet containing no parameters" do
|
|
29
|
-
packet = DataPacket.parse("[\"test_message\"]")
|
|
30
|
-
|
|
31
|
-
expect(packet.message).to eq 'test_message'
|
|
32
|
-
expect(packet.params).to be_nil
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
it "understands a raw packet containging parameters data" do
|
|
36
|
-
packet = DataPacket.parse("[\"test_message\",{\"foo\":\"bar\"}]")
|
|
37
|
-
|
|
38
|
-
expect(packet.params['foo']).to eq 'bar'
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
end
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
require 'cucumber/wire/exception'
|
|
2
|
-
require 'cucumber/wire/configuration'
|
|
3
|
-
|
|
4
|
-
module Cucumber
|
|
5
|
-
module Wire
|
|
6
|
-
describe Exception do
|
|
7
|
-
before(:each) do
|
|
8
|
-
@config = Configuration.new('host' => 'localhost', 'port' => 54321)
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def exception
|
|
12
|
-
Wire::Exception.new(@data, @config)
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
describe "with just a message" do
|
|
16
|
-
before(:each) do
|
|
17
|
-
@data = {'message' => 'foo'}
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
it "#to_s as expecteds" do
|
|
21
|
-
expect(exception.to_s).to eq "foo"
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
describe "with a message and an exception" do
|
|
26
|
-
before(:each) do
|
|
27
|
-
@data = {'message' => 'foo', 'exception' => 'Bar'}
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
it "#to_s as expecteds" do
|
|
31
|
-
expect(exception.to_s).to eq "foo"
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
it "#class.to_s returns the name of the exception" do
|
|
35
|
-
expect(exception.class.to_s).to eq 'Bar from localhost:54321'
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
describe "with a custom backtrace" do
|
|
40
|
-
before(:each) do
|
|
41
|
-
@data = {'message' => 'foo', 'backtrace' => ['foo', 'bar', 'baz']}
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
it "#backrace returns the custom backtrace" do
|
|
45
|
-
expect(exception.backtrace).to eq ['foo', 'bar', 'baz']
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
end
|
|
50
|
-
end
|