cucumber-wire 6.2.0 → 6.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -1
- data/lib/cucumber/wire/add_hooks_filter.rb +33 -8
- data/lib/cucumber/wire/connections.rb +1 -2
- data/lib/cucumber/wire/step_definition.rb +1 -1
- data/lib/cucumber/wire/version +1 -1
- metadata +8 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 130cb3e95181e3075510187b0744f75c054ee7262cd959d702cf46530b933ea3
|
4
|
+
data.tar.gz: 80ca9b30f9a5eab812757808107fdb84560538fb96cc896c7b70278038f95a4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4071edb6e2ee0ebafee6ed6be51ab2d5c04683ce1eaacd475c0f4db55ee6a18a16cf13b5e6f7e44a70c8969de4e30fbd9a872f8124bc280c94be274fc06bf9d
|
7
|
+
data.tar.gz: 3010136c5cda24d87f1bca45e8d13a0839505d5e74f8a66df6b63e0318ac79d816f30c4a11b94665182e399107b5476bb5ba4b2375419e5c0e6a1852375e055b
|
data/CHANGELOG.md
CHANGED
@@ -18,6 +18,16 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
|
|
18
18
|
|
19
19
|
### Removed
|
20
20
|
|
21
|
+
## [6.2.1]
|
22
|
+
|
23
|
+
### Fixed
|
24
|
+
|
25
|
+
- Fix usage with message-related formatters like the html formatter
|
26
|
+
([PR#57](https://github.com/cucumber/cucumber-ruby-wire/pull/57)
|
27
|
+
[Issue#56](https://github.com/cucumber/cucumber-ruby-wire/issues/56))
|
28
|
+
|
29
|
+
- Removed dependency to cucumber-messages
|
30
|
+
|
21
31
|
## [6.2.0]
|
22
32
|
|
23
33
|
### Changed
|
@@ -107,7 +117,8 @@ is a risk of regressions.
|
|
107
117
|
- Changes to work with a modern Cucumber-Ruby ([#14](https://github.com/cucumber/cucumber-ruby-wire/pull/14) [brasmusson](https://github.com/brasmusson))
|
108
118
|
- 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
119
|
|
110
|
-
[Unreleased]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.2.
|
120
|
+
[Unreleased]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.2.1...main
|
121
|
+
[6.2.1]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.2.0...v6.2.1
|
111
122
|
[6.2.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.1.1...v6.2.0
|
112
123
|
[6.1.1]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.1.0...v6.1.1
|
113
124
|
[6.1.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.0.1...v6.1.0
|
@@ -1,5 +1,4 @@
|
|
1
1
|
# coding: utf-8
|
2
|
-
require 'cucumber/messages'
|
3
2
|
|
4
3
|
module Cucumber
|
5
4
|
module Wire
|
@@ -13,19 +12,45 @@ module Cucumber
|
|
13
12
|
def before_hook(test_case)
|
14
13
|
# TODO: is this dependency on Cucumber::Hooks OK? Feels a bit internal..
|
15
14
|
# 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
|
-
|
15
|
+
|
16
|
+
hook = instanciate_wire_hook(:begin_scenario)
|
17
|
+
action = ->(result) { hook.invoke('Before', [Cucumber::RunningTestCase.new(test_case).with_result(result), connections]) }
|
18
|
+
|
19
|
+
hook_step = Cucumber::Hooks.before_hook(id_generator.new_id, Core::Test::Location.new('wire'), &action)
|
20
|
+
|
21
|
+
configuration.event_bus.hook_test_step_created(hook_step, hook)
|
22
|
+
|
23
|
+
hook_step
|
19
24
|
end
|
20
25
|
|
21
26
|
def after_hook(test_case)
|
22
|
-
|
23
|
-
|
24
|
-
|
27
|
+
hook = instanciate_wire_hook(:end_scenario)
|
28
|
+
action = ->(result) { hook.invoke('After', [Cucumber::RunningTestCase.new(test_case).with_result(result), connections]) }
|
29
|
+
|
30
|
+
hook_step = Cucumber::Hooks.after_hook(id_generator.new_id, Core::Test::Location.new('wire'), &action)
|
31
|
+
|
32
|
+
configuration.event_bus.hook_test_step_created(hook_step, hook)
|
33
|
+
|
34
|
+
hook_step
|
25
35
|
end
|
26
36
|
|
27
37
|
def id_generator
|
28
|
-
@id_generator ||=
|
38
|
+
@id_generator ||= connections.configuration.id_generator
|
39
|
+
end
|
40
|
+
|
41
|
+
def configuration
|
42
|
+
@configuration ||= connections.configuration
|
43
|
+
end
|
44
|
+
|
45
|
+
private
|
46
|
+
|
47
|
+
def instanciate_wire_hook(hook_method)
|
48
|
+
Cucumber::Glue::Hook.new(
|
49
|
+
id_generator.new_id,
|
50
|
+
connections.registry,
|
51
|
+
[],
|
52
|
+
->(test_case, connections) { connections.send(hook_method, test_case) }
|
53
|
+
)
|
29
54
|
end
|
30
55
|
end
|
31
56
|
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
|
data/lib/cucumber/wire/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
6.2.
|
1
|
+
6.2.1
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-wire
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.2.
|
4
|
+
version: 6.2.1
|
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: 2022-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber-core
|
@@ -50,26 +50,6 @@ dependencies:
|
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: 14.0.0
|
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
|
73
53
|
- !ruby/object:Gem::Dependency
|
74
54
|
name: aruba
|
75
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -96,20 +76,20 @@ dependencies:
|
|
96
76
|
requirements:
|
97
77
|
- - "~>"
|
98
78
|
- !ruby/object:Gem::Version
|
99
|
-
version: '7.
|
79
|
+
version: '7.1'
|
100
80
|
- - ">="
|
101
81
|
- !ruby/object:Gem::Version
|
102
|
-
version: 7.
|
82
|
+
version: 7.1.0
|
103
83
|
type: :development
|
104
84
|
prerelease: false
|
105
85
|
version_requirements: !ruby/object:Gem::Requirement
|
106
86
|
requirements:
|
107
87
|
- - "~>"
|
108
88
|
- !ruby/object:Gem::Version
|
109
|
-
version: '7.
|
89
|
+
version: '7.1'
|
110
90
|
- - ">="
|
111
91
|
- !ruby/object:Gem::Version
|
112
|
-
version: 7.
|
92
|
+
version: 7.1.0
|
113
93
|
- !ruby/object:Gem::Dependency
|
114
94
|
name: rake
|
115
95
|
requirement: !ruby/object:Gem::Requirement
|
@@ -203,10 +183,10 @@ requirements: []
|
|
203
183
|
rubygems_version: 3.1.2
|
204
184
|
signing_key:
|
205
185
|
specification_version: 4
|
206
|
-
summary: cucumber-wire-6.2.
|
186
|
+
summary: cucumber-wire-6.2.1
|
207
187
|
test_files:
|
188
|
+
- spec/cucumber/wire/configuration_spec.rb
|
208
189
|
- spec/cucumber/wire/connections_spec.rb
|
209
190
|
- spec/cucumber/wire/connection_spec.rb
|
210
191
|
- spec/cucumber/wire/data_packet_spec.rb
|
211
192
|
- spec/cucumber/wire/exception_spec.rb
|
212
|
-
- spec/cucumber/wire/configuration_spec.rb
|