cucumber-wire 1.1.0 → 1.2.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 +11 -0
- data/README.md +38 -0
- data/lib/cucumber/wire/add_hooks_filter.rb +8 -2
- data/lib/cucumber/wire/protocol/requests.rb +4 -6
- data/lib/cucumber/wire/version +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 180f3b85cce4bc115f12c42c35cfc1ae9ddf2d046e9359a168dda59c81f38ac8
|
4
|
+
data.tar.gz: b8740378f12e070524613710ca82b2832aca2ad911c377d1a85b0510021fa8ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e00f2465851ea1247d40b33893074df9949d303cedc4e6581622db8803382ed16aa447bd1dbc0fba03b9af8ce6b436a1b44f88a1ebf9178ff57849dfb792d5f
|
7
|
+
data.tar.gz: f33ee829c0297fa4dff553387370d8b4b431a70e7782a0d55e82890521ae2cea1bae53f21d36c145eed08ad247ab82e88d2cfa4def7df6f352951c314d1edb68
|
data/CHANGELOG.md
CHANGED
@@ -10,6 +10,17 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
|
|
10
10
|
|
11
11
|
----
|
12
12
|
|
13
|
+
## [1.2.0](https://github.com/cucumber/cucumber-ruby-wire/compare/v1.1.0...v1.2.0)
|
14
|
+
|
15
|
+
### Removed
|
16
|
+
|
17
|
+
* Multiline arguments do not need `Location` anymore
|
18
|
+
|
19
|
+
### Added
|
20
|
+
|
21
|
+
* Use `Cucumber:Messages::IdGenerator::UUID` to provide ids for `Hooks
|
22
|
+
|
23
|
+
|
13
24
|
## [1.1.0](https://github.com/cucumber/cucumber-ruby-wire/compare/v1.0.0...v1.1.0)
|
14
25
|
|
15
26
|
### Changed
|
data/README.md
CHANGED
@@ -1,3 +1,41 @@
|
|
1
1
|
[](https://travis-ci.org/cucumber/cucumber-ruby-wire)
|
2
2
|
|
3
3
|
# cucumber-wire
|
4
|
+
|
5
|
+
This gem was extracted from the [cucumber gem](https://github.com/cucumber/cucumber-ruby), and remains a runtime dependency to that gem.
|
6
|
+
|
7
|
+
Its tests are a bit hairy and prone to the occasional flicker.
|
8
|
+
|
9
|
+
In the future, it may become an opt-in plugin rather than a direct dependency on every Cucumber.
|
10
|
+
|
11
|
+
## Configuration
|
12
|
+
|
13
|
+
You can configure the connection using a YAML file called a `.wire` file:
|
14
|
+
|
15
|
+
```yaml
|
16
|
+
host: localhost
|
17
|
+
port: 54321
|
18
|
+
timeout:
|
19
|
+
connect: 11
|
20
|
+
invoke: 120
|
21
|
+
begin_scenario: 120
|
22
|
+
end_scenario: 120
|
23
|
+
```
|
24
|
+
|
25
|
+
### Timeouts
|
26
|
+
|
27
|
+
The default timeout is 120 seconds. `connect` has a default timeout of 11 seconds.
|
28
|
+
|
29
|
+
### YAML with ERB templating
|
30
|
+
|
31
|
+
The file format is YAML, with ERB templating, so you could make the configuration configurable:
|
32
|
+
|
33
|
+
```yaml,erb
|
34
|
+
host: localhost
|
35
|
+
port: 54321
|
36
|
+
timeout:
|
37
|
+
connect: <%= (ENV['MY_CONNECT_TIMEOUT'] || 11).to_i %>
|
38
|
+
invoke: 120
|
39
|
+
begin_scenario: 120
|
40
|
+
end_scenario: 120
|
41
|
+
```
|
@@ -1,4 +1,6 @@
|
|
1
1
|
# coding: utf-8
|
2
|
+
require 'cucumber/messages'
|
3
|
+
|
2
4
|
module Cucumber
|
3
5
|
module Wire
|
4
6
|
class AddHooksFilter < Core::Filter.new(:connections)
|
@@ -11,16 +13,20 @@ module Cucumber
|
|
11
13
|
def before_hook(test_case)
|
12
14
|
# TODO: is this dependency on Cucumber::Hooks OK? Feels a bit internal..
|
13
15
|
# 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?
|
14
|
-
Cucumber::Hooks.before_hook(Core::Test::Location.new('TODO:wire')) do
|
16
|
+
Cucumber::Hooks.before_hook(id_generator.new_id, Core::Test::Location.new('TODO:wire')) do
|
15
17
|
connections.begin_scenario(test_case)
|
16
18
|
end
|
17
19
|
end
|
18
20
|
|
19
21
|
def after_hook(test_case)
|
20
|
-
Cucumber::Hooks.after_hook(Core::Test::Location.new('TODO:wire')) do
|
22
|
+
Cucumber::Hooks.after_hook(id_generator.new_id, Core::Test::Location.new('TODO:wire')) do
|
21
23
|
connections.end_scenario(test_case)
|
22
24
|
end
|
23
25
|
end
|
26
|
+
|
27
|
+
def id_generator
|
28
|
+
@id_generator ||= Cucumber::Messages::IdGenerator::UUID.new
|
29
|
+
end
|
24
30
|
end
|
25
31
|
end
|
26
32
|
end
|
@@ -69,10 +69,8 @@ module Cucumber
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def handle_diff!(tables)
|
72
|
-
|
73
|
-
|
74
|
-
table1 = table(tables[0], location)
|
75
|
-
table2 = table(tables[1], location)
|
72
|
+
table1 = table(tables[0])
|
73
|
+
table2 = table(tables[1])
|
76
74
|
table1.diff!(table2)
|
77
75
|
end
|
78
76
|
|
@@ -89,8 +87,8 @@ module Cucumber
|
|
89
87
|
|
90
88
|
private
|
91
89
|
|
92
|
-
def table(data
|
93
|
-
Cucumber::MultilineArgument.from_core(Core::Test::DataTable.new(data
|
90
|
+
def table(data)
|
91
|
+
Cucumber::MultilineArgument.from_core(Core::Test::DataTable.new(data))
|
94
92
|
end
|
95
93
|
end
|
96
94
|
|
data/lib/cucumber/wire/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0
|
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: 1.
|
4
|
+
version: 1.2.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: 2020-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber-core
|
@@ -180,10 +180,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
180
|
- !ruby/object:Gem::Version
|
181
181
|
version: '0'
|
182
182
|
requirements: []
|
183
|
-
rubygems_version: 3.0.
|
183
|
+
rubygems_version: 3.0.6
|
184
184
|
signing_key:
|
185
185
|
specification_version: 4
|
186
|
-
summary: cucumber-wire-1.
|
186
|
+
summary: cucumber-wire-1.2.0
|
187
187
|
test_files:
|
188
188
|
- spec/cucumber/wire/data_packet_spec.rb
|
189
189
|
- spec/cucumber/wire/configuration_spec.rb
|