cucumber-wire 6.0.1 → 6.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7d2a2aeb865c32194912665576088fab76df7772561da4c66af1978008cf68f
4
- data.tar.gz: 01a2a485c0c20386fa2bd66ec6c50e06ccaffb53a40718dcf5ec715eab7f7d93
3
+ metadata.gz: 130cb3e95181e3075510187b0744f75c054ee7262cd959d702cf46530b933ea3
4
+ data.tar.gz: 80ca9b30f9a5eab812757808107fdb84560538fb96cc896c7b70278038f95a4d
5
5
  SHA512:
6
- metadata.gz: 5af0c11dde0ee5ecbeef2a93e7fe42744218db0771022e6a5f816a46fa0a3eb15cb53ca3fdecea0ffe8ef4fd171543f588b08ff43366837d9438d58953f283b3
7
- data.tar.gz: f0ebdb2446ad4f392b8ba11888b6820772345776bf6e17fbf9881f8677102d2a326b2dc82f9b086c320f5eb58d221f1e994500ca18e712d9fd8df96ab5af83e8
6
+ metadata.gz: a4071edb6e2ee0ebafee6ed6be51ab2d5c04683ce1eaacd475c0f4db55ee6a18a16cf13b5e6f7e44a70c8969de4e30fbd9a872f8124bc280c94be274fc06bf9d
7
+ data.tar.gz: 3010136c5cda24d87f1bca45e8d13a0839505d5e74f8a66df6b63e0318ac79d816f30c4a11b94665182e399107b5476bb5ba4b2375419e5c0e6a1852375e055b
data/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- # CHANGE LOG
1
+ # Changelog
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
@@ -8,126 +8,132 @@ This document is formatted according to the principles of [Keep A CHANGELOG](htt
8
8
 
9
9
  Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CONTRIBUTING.md) for more info on how to contribute to Cucumber.
10
10
 
11
- ---
11
+ ## [Unreleased]
12
12
 
13
- ## [In GIT](https://github.com/cucumber/cucumber-ruby-wire/compare/v6.0.1...main)
13
+ ### Changed
14
14
 
15
15
  ### Added
16
16
 
17
- ### Changed
18
-
19
- ### Deprecated
17
+ ### Fixed
20
18
 
21
19
  ### Removed
22
20
 
23
- ### Fixed
21
+ ## [6.2.1]
24
22
 
25
- ### Dependencies
23
+ ### Fixed
26
24
 
27
- ## [6.0.1](https://github.com/cucumber/cucumber-ruby-wire/compare/v6.0.0...v6.0.1)
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
28
 
29
- ### Dependencies
29
+ - Removed dependency to cucumber-messages
30
30
 
31
- - Patched `cucumber-core` and `cucumber-messages`
31
+ ## [6.2.0]
32
32
 
33
- ## [6.0.0](https://github.com/cucumber/cucumber-ruby-wire/compare/v5.0.1...v6.0.0)
33
+ ### Changed
34
34
 
35
- ### Dependencies
35
+ - Patched `cucumber-core`, `cucumber-expressions` and `cucumber-messages`
36
36
 
37
- - Updated `cucumber-core` ~> 10.0.0 and `cucumber-messages` ~> 17.0.0
38
- This brings breaking changes because of internal changes in Cucumber::Messages.
39
- ([#44](https://github.com/cucumber/cucumber-ruby-wire/pull/44))
37
+ ## [6.1.1]
40
38
 
41
- ## [5.0.1](https://github.com/cucumber/cucumber-ruby-wire/compare/v5.0.0...v5.0.1)
39
+ ### Changed
42
40
 
43
- ### Dependencies
41
+ - Use the new `InstallPlugin` hook rather than `AfterConfiguration`.
42
+ ([#52](https://github.com/cucumber/cucumber-ruby-wire/pull/52))
44
43
 
45
- - Updated `cucumber-core` ~> 9.0.1
44
+ ## [6.1.0]
45
+ ### Added
46
+ - The possibility to verify if the plugin has already been installed or not. To
47
+ do so, use `Cucumber::Wire::Plugin.installed?`.
48
+ ([46](https://github.com/cucumber/cucumber-ruby-wire/pull/46))
46
49
 
47
- ## [5.0.0](https://github.com/cucumber/cucumber-ruby-wire/compare/v4.0.1...v5.0.0)
50
+ ### Changed
51
+ - `cucumber-wire` is now able to install itself as a plugin into `cucumber-ruby`.
52
+ ([46](https://github.com/cucumber/cucumber-ruby-wire/pull/46))
48
53
 
54
+ ## [6.0.1]
49
55
  ### Changed
56
+ - Patched `cucumber-core` and `cucumber-messages`
50
57
 
51
- - Update from cucumber-expressions 10 to 12 introduces significant underlying changes
52
- in how step definitions are matched. This should be backward compatible but there
53
- is a risk of regressions.
58
+ ## [6.0.0]
59
+ ### Changed
60
+ - Updated `cucumber-core` ~> 10.0.0 and `cucumber-messages` ~> 17.0.0
61
+ This brings breaking changes because of internal changes in Cucumber::Messages.
62
+ ([#44](https://github.com/cucumber/cucumber-ruby-wire/pull/44))
54
63
 
55
- ### Dependencies
64
+ ## [5.0.1]
65
+ ### Changed
66
+ - Updated `cucumber-core` ~> 9.0.1
56
67
 
68
+ ## [5.0.0]
69
+ ### Changed
70
+ - Update from cucumber-expressions 10 to 12 introduces significant underlying changes
71
+ in how step definitions are matched. This should be backward compatible but there
72
+ is a risk of regressions.
57
73
  - Updated dependencies (look at the diff for details)
58
74
 
59
- ## [4.0.1](https://github.com/cucumber/cucumber-ruby-wire/compare/v4.0.0...v4.0.1)
60
-
61
- ### Dependencies
62
-
75
+ ## [4.0.1]
76
+ ### Changed
63
77
  - Updated dependencies (look at the diff for details)
64
78
 
65
- ## [4.0.0](https://github.com/cucumber/cucumber-ruby-wire/compare/v3.1.0...v4.0.0)
66
-
67
- - Release failed
68
-
69
- ## [3.1.0](https://github.com/cucumber/cucumber-ruby-wire/compare/v3.0.0...v3.1.0)
70
-
79
+ ## [3.1.0]
71
80
  ### Changed
72
-
81
+ - `cucumber-core` ~> 7.1.0
82
+ - `cucumber-messages` ~> 12.2.0
73
83
  - Updated gems:
74
- - `cucumber-core` ~> 7.1.0
75
- - `cucumber-messages` ~> 12.2.0
76
-
77
- ## [3.0.0](https://github.com/cucumber/cucumber-ruby-wire/compare/v2.0.1...v3.0.0)
78
84
 
85
+ ## [3.0.0]
79
86
  ### Changed
80
-
81
87
  - Use `cucumber-ruby-core` 7.0.0
82
-
88
+ - cucumber-cucumber-expressions ~> 10
89
+ - cucumber-messages ~> 12
83
90
  - Updated monorepo libraries:
84
- - cucumber-cucumber-expressions ~> 10
85
- - cucumber-messages ~> 12
86
-
87
- ## [2.0.1](https://github.com/cucumber/cucumber-ruby-wire/compare/v2.0.0...v2.0.1)
88
91
 
92
+ ## [2.0.1]
89
93
  ### Removed
90
-
91
94
  - Replace use of `MultiJSON` to use native JSON gem
92
95
 
93
- ## [2.0.0](https://github.com/cucumber/cucumber-ruby-wire/compare/v1.2.0...v2.0.0)
94
-
96
+ ## [2.0.0]
95
97
  ### Changed
96
-
97
98
  - Use `cucumber-ruby-core` 6.0.0
98
99
 
99
- ## [1.2.0](https://github.com/cucumber/cucumber-ruby-wire/compare/v1.1.0...v1.2.0)
100
-
101
- ### Removed
102
-
103
- - Multiline arguments do not need `Location` anymore
104
-
100
+ ## [1.2.0]
105
101
  ### Added
106
-
107
102
  - Use `Cucumber:Messages::IdGenerator::UUID` to provide ids for `Hooks`
108
103
 
109
- ## [1.1.0](https://github.com/cucumber/cucumber-ruby-wire/compare/v1.0.0...v1.1.0)
104
+ ### Removed
105
+ - Multiline arguments do not need `Location` anymore
110
106
 
107
+ ## [1.1.0]
111
108
  ### Changed
112
-
113
109
  - Update to cucumber-expressions 8.0.2
114
110
  - Update to cucumber 4.0.0
115
111
 
116
- ## [1.0.0](https://github.com/cucumber/cucumber-ruby-wire/compare/v0.0.1...v1.0.0)
117
-
112
+ ## [1.0.0]
118
113
  ### Added
119
-
120
114
  - 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))
121
115
 
122
116
  ### Changed
123
-
124
117
  - Changes to work with a modern Cucumber-Ruby ([#14](https://github.com/cucumber/cucumber-ruby-wire/pull/14) [brasmusson](https://github.com/brasmusson))
125
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))
126
119
 
127
- <!-- Contributors -->
128
-
129
- [brasmusson]: https://github.com/brasmusson
130
- [jaysonesmith]: https://github.com/jaysonesmith
131
- [junaruga]: https://github.com/junaruga
132
- [mattwynne]: https://github.com/mattwynne
133
- [olleolleolle]: https://github.com/olleolleolle
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
122
+ [6.2.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.1.1...v6.2.0
123
+ [6.1.1]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.1.0...v6.1.1
124
+ [6.1.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.0.1...v6.1.0
125
+ [6.0.1]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.0.0...v6.0.1
126
+ [6.0.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v5.0.1...v6.0.0
127
+ [5.0.1]: https://github.com/cucumber/cucumber-ruby-wire/compare/v5.0.0...v5.0.1
128
+ [5.0.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v4.0.1...v5.0.0
129
+ [4.0.1]: https://github.com/cucumber/cucumber-ruby-wire/compare/v4.0.0...v4.0.1
130
+ [3.1.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v3.0.0...v3.1.0
131
+ [3.0.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v2.0.1...v3.0.0
132
+ [2.0.1]: https://github.com/cucumber/cucumber-ruby-wire/compare/v2.0.0...v2.0.1
133
+ [2.0.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v1.2.0...v2.0.0
134
+ [1.2.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v1.1.0...v1.2.0
135
+ [1.1.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v1.0.0...v1.1.0
136
+ [1.0.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v0.0.1...v1.0.0
137
+ ire/compare/v6.1.0...main
138
+ [6.1.0]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.0.1...v6.1.0
139
+ [6.0.1]: https://github.com/cucumber/cucumber-ruby-wire/compare/v6.0.0...v6.0.1
data/CONTRIBUTING.md CHANGED
@@ -1,13 +1,2 @@
1
- Release Process
2
- ===============
3
-
4
- * Upgrade gems with `scripts/update-gemspec`
5
- * Bump the version number in `lib/cucumber/wire/version`
6
- * Update `CHANGELOG.md` with the upcoming version number and create a new `In Git` section
7
- * Remove empty sections from `CHANGELOG.md`
8
- * Now release it:
9
-
10
- ```
11
- git commit -am "Release X.Y.Z"
12
- make release
13
- ```
1
+ Please see https://github.com/cucumber/cucumber-ruby/blob/main/CONTRIBUTING.md for
2
+ more info about how to contribute to cucumber
@@ -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
- Cucumber::Hooks.before_hook(id_generator.new_id, Core::Test::Location.new('TODO:wire')) do
17
- connections.begin_scenario(test_case)
18
- end
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
- Cucumber::Hooks.after_hook(id_generator.new_id, Core::Test::Location.new('TODO:wire')) do
23
- connections.end_scenario(test_case)
24
- end
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 ||= Cucumber::Messages::IdGenerator::UUID.new
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
@@ -8,6 +8,10 @@ module Cucumber
8
8
  attr_reader :config, :registry
9
9
  private :config, :registry
10
10
 
11
+ def self.installed?
12
+ @@installed ||= false
13
+ end
14
+
11
15
  def initialize(config, registry)
12
16
  @config = config
13
17
  @registry = registry
@@ -18,6 +22,8 @@ module Cucumber
18
22
  config.filters << Filters::ActivateSteps.new(StepMatchSearch.new(connections.method(:step_matches), @config), @config)
19
23
  config.filters << AddHooksFilter.new(connections) unless @config.dry_run?
20
24
  config.register_snippet_generator Snippet::Generator.new(connections)
25
+
26
+ @@installed = true
21
27
  end
22
28
 
23
29
  def create_connection(wire_file)
@@ -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
@@ -1 +1 @@
1
- 6.0.1
1
+ 6.2.1
data/lib/cucumber/wire.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  require 'cucumber/wire/plugin'
2
2
 
3
- AfterConfiguration do |config|
4
- Cucumber::Wire::Plugin.new(config).install
3
+ return unless respond_to?(:InstallPlugin)
4
+
5
+ InstallPlugin do |config, registry|
6
+ Cucumber::Wire::Plugin.new(config, registry).install
5
7
  end
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.0.1
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: 2021-07-19 00:00:00.000000000 Z
11
+ date: 2022-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber-core
@@ -16,100 +16,80 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '10.0'
19
+ version: '10.1'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 10.0.1
22
+ version: 10.1.0
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
- version: '10.0'
29
+ version: '10.1'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 10.0.1
32
+ version: 10.1.0
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: '12.1'
39
+ version: '14.0'
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: 12.1.1
42
+ version: 14.0.0
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: '12.1'
49
+ version: '14.0'
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: 12.1.1
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.0'
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- version: 17.0.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.0'
70
- - - ">="
71
- - !ruby/object:Gem::Version
72
- version: 17.0.1
52
+ version: 14.0.0
73
53
  - !ruby/object:Gem::Dependency
74
54
  name: aruba
75
55
  requirement: !ruby/object:Gem::Requirement
76
56
  requirements:
77
57
  - - "~>"
78
58
  - !ruby/object:Gem::Version
79
- version: '1.1'
59
+ version: '2.0'
80
60
  - - ">="
81
61
  - !ruby/object:Gem::Version
82
- version: 1.1.2
62
+ version: 2.0.0
83
63
  type: :development
84
64
  prerelease: false
85
65
  version_requirements: !ruby/object:Gem::Requirement
86
66
  requirements:
87
67
  - - "~>"
88
68
  - !ruby/object:Gem::Version
89
- version: '1.1'
69
+ version: '2.0'
90
70
  - - ">="
91
71
  - !ruby/object:Gem::Version
92
- version: 1.1.2
72
+ version: 2.0.0
93
73
  - !ruby/object:Gem::Dependency
94
74
  name: cucumber
95
75
  requirement: !ruby/object:Gem::Requirement
96
76
  requirements:
97
77
  - - "~>"
98
78
  - !ruby/object:Gem::Version
99
- version: '6.1'
79
+ version: '7.1'
100
80
  - - ">="
101
81
  - !ruby/object:Gem::Version
102
- version: 6.1.0
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: '6.1'
89
+ version: '7.1'
110
90
  - - ">="
111
91
  - !ruby/object:Gem::Version
112
- version: 6.1.0
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.0.1
186
+ summary: cucumber-wire-6.2.1
207
187
  test_files:
208
- - spec/cucumber/wire/connection_spec.rb
209
188
  - spec/cucumber/wire/configuration_spec.rb
210
189
  - spec/cucumber/wire/connections_spec.rb
190
+ - spec/cucumber/wire/connection_spec.rb
211
191
  - spec/cucumber/wire/data_packet_spec.rb
212
192
  - spec/cucumber/wire/exception_spec.rb