cucumber 3.1.2 → 5.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +287 -14
- data/CONTRIBUTING.md +11 -25
- data/README.md +4 -5
- data/bin/cucumber +1 -1
- data/lib/autotest/cucumber_mixin.rb +46 -53
- data/lib/cucumber.rb +1 -1
- data/lib/cucumber/cli/configuration.rb +5 -5
- data/lib/cucumber/cli/main.rb +12 -12
- data/lib/cucumber/cli/options.rb +97 -76
- data/lib/cucumber/cli/profile_loader.rb +49 -26
- data/lib/cucumber/configuration.rb +44 -29
- data/lib/cucumber/constantize.rb +2 -5
- data/lib/cucumber/deprecate.rb +31 -7
- data/lib/cucumber/errors.rb +5 -7
- data/lib/cucumber/events.rb +13 -6
- data/lib/cucumber/events/envelope.rb +9 -0
- data/lib/cucumber/events/gherkin_source_parsed.rb +11 -0
- data/lib/cucumber/events/hook_test_step_created.rb +13 -0
- data/lib/cucumber/events/step_activated.rb +2 -1
- data/lib/cucumber/events/test_case_created.rb +13 -0
- data/lib/cucumber/events/test_case_ready.rb +12 -0
- data/lib/cucumber/events/test_step_created.rb +13 -0
- data/lib/cucumber/events/undefined_parameter_type.rb +10 -0
- data/lib/cucumber/file_specs.rb +6 -6
- data/lib/cucumber/filters.rb +1 -0
- data/lib/cucumber/filters/activate_steps.rb +5 -3
- data/lib/cucumber/filters/broadcast_test_case_ready_event.rb +12 -0
- data/lib/cucumber/filters/prepare_world.rb +5 -9
- data/lib/cucumber/filters/quit.rb +1 -3
- data/lib/cucumber/filters/tag_limits/verifier.rb +2 -4
- data/lib/cucumber/formatter/ansicolor.rb +40 -45
- data/lib/cucumber/formatter/ast_lookup.rb +163 -0
- data/lib/cucumber/formatter/backtrace_filter.rb +9 -8
- data/lib/cucumber/formatter/console.rb +58 -66
- data/lib/cucumber/formatter/console_counts.rb +4 -9
- data/lib/cucumber/formatter/console_issues.rb +6 -3
- data/lib/cucumber/formatter/duration.rb +1 -1
- data/lib/cucumber/formatter/duration_extractor.rb +3 -1
- data/lib/cucumber/formatter/errors.rb +6 -0
- data/lib/cucumber/formatter/fanout.rb +2 -0
- data/lib/cucumber/formatter/html.rb +11 -598
- data/lib/cucumber/formatter/http_io.rb +147 -0
- data/lib/cucumber/formatter/ignore_missing_messages.rb +1 -1
- data/lib/cucumber/formatter/interceptor.rb +11 -30
- data/lib/cucumber/formatter/io.rb +55 -13
- data/lib/cucumber/formatter/json.rb +102 -110
- data/lib/cucumber/formatter/junit.rb +55 -55
- data/lib/cucumber/formatter/message.rb +22 -0
- data/lib/cucumber/formatter/message_builder.rb +255 -0
- data/lib/cucumber/formatter/pretty.rb +359 -153
- data/lib/cucumber/formatter/progress.rb +30 -32
- data/lib/cucumber/formatter/publish_banner_printer.rb +77 -0
- data/lib/cucumber/formatter/query/hook_by_test_step.rb +31 -0
- data/lib/cucumber/formatter/query/pickle_by_test.rb +26 -0
- data/lib/cucumber/formatter/query/pickle_step_by_test_step.rb +26 -0
- data/lib/cucumber/formatter/query/step_definitions_by_test_step.rb +40 -0
- data/lib/cucumber/formatter/query/test_case_started_by_test_case.rb +40 -0
- data/lib/cucumber/formatter/rerun.rb +22 -4
- data/lib/cucumber/formatter/stepdefs.rb +1 -2
- data/lib/cucumber/formatter/steps.rb +3 -4
- data/lib/cucumber/formatter/summary.rb +16 -8
- data/lib/cucumber/formatter/unicode.rb +15 -17
- data/lib/cucumber/formatter/url_reporter.rb +17 -0
- data/lib/cucumber/formatter/usage.rb +11 -10
- data/lib/cucumber/gherkin/data_table_parser.rb +17 -6
- data/lib/cucumber/gherkin/formatter/ansi_escapes.rb +13 -17
- data/lib/cucumber/gherkin/formatter/escaping.rb +2 -2
- data/lib/cucumber/gherkin/steps_parser.rb +17 -8
- data/lib/cucumber/glue/hook.rb +34 -11
- data/lib/cucumber/glue/invoke_in_world.rb +13 -18
- data/lib/cucumber/glue/proto_world.rb +42 -33
- data/lib/cucumber/glue/registry_and_more.rb +42 -12
- data/lib/cucumber/glue/snippet.rb +23 -22
- data/lib/cucumber/glue/step_definition.rb +42 -19
- data/lib/cucumber/glue/world_factory.rb +1 -1
- data/lib/cucumber/hooks.rb +11 -11
- data/lib/cucumber/multiline_argument.rb +4 -6
- data/lib/cucumber/multiline_argument/data_table.rb +97 -64
- data/lib/cucumber/multiline_argument/data_table/diff_matrices.rb +2 -2
- data/lib/cucumber/multiline_argument/doc_string.rb +1 -1
- data/lib/cucumber/platform.rb +3 -3
- data/lib/cucumber/rake/task.rb +16 -18
- data/lib/cucumber/rspec/disable_option_parser.rb +9 -8
- data/lib/cucumber/rspec/doubles.rb +3 -5
- data/lib/cucumber/running_test_case.rb +2 -53
- data/lib/cucumber/runtime.rb +41 -58
- data/lib/cucumber/runtime/after_hooks.rb +8 -4
- data/lib/cucumber/runtime/before_hooks.rb +8 -4
- data/lib/cucumber/runtime/for_programming_languages.rb +4 -2
- data/lib/cucumber/runtime/step_hooks.rb +6 -2
- data/lib/cucumber/runtime/support_code.rb +13 -15
- data/lib/cucumber/runtime/user_interface.rb +6 -16
- data/lib/cucumber/step_definition_light.rb +4 -3
- data/lib/cucumber/step_definitions.rb +2 -2
- data/lib/cucumber/step_match.rb +12 -11
- data/lib/cucumber/step_match_search.rb +2 -1
- data/lib/cucumber/term/ansicolor.rb +9 -9
- data/lib/cucumber/term/banner.rb +56 -0
- data/lib/cucumber/version +1 -1
- metadata +254 -83
- data/lib/cucumber/events/gherkin_source_parsed.rb~ +0 -14
- data/lib/cucumber/formatter/ast_lookup.rb~ +0 -9
- data/lib/cucumber/formatter/cucumber.css +0 -286
- data/lib/cucumber/formatter/cucumber.sass +0 -247
- data/lib/cucumber/formatter/hook_query_visitor.rb +0 -42
- data/lib/cucumber/formatter/html_builder.rb +0 -121
- data/lib/cucumber/formatter/inline-js.js +0 -30
- data/lib/cucumber/formatter/jquery-min.js +0 -154
- data/lib/cucumber/formatter/json_pretty.rb +0 -11
- data/lib/cucumber/formatter/legacy_api/adapter.rb +0 -1028
- data/lib/cucumber/formatter/legacy_api/ast.rb +0 -394
- data/lib/cucumber/formatter/legacy_api/results.rb +0 -50
- data/lib/cucumber/formatter/legacy_api/runtime_facade.rb +0 -32
- data/lib/cucumber/step_argument.rb +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 36830fb7cfa9895488ea7f11bb33f6267c94328b8b3a08da75749d26f4047479
|
4
|
+
data.tar.gz: 725299585226f1af48d00c12af192844af884ec49d44e6966c22a8a607bd9fa8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 807a72bba0f0a30c266b68afd4866ead55178f2ee2f72bd5a86331445f6de62bf320ebd2a848c05dd6c906c52aa6d082c1b5f241a65cc00e5ff6df14ffe3d6b8
|
7
|
+
data.tar.gz: d11cfaaa57bf35ffbbf54273317825179beb5db3ab106feacb30c7d0860ca6aeacf90404774ee92eafba100db00b5a25428ca7f3447262b0f05687b57d03aeae
|
data/CHANGELOG.md
CHANGED
@@ -10,6 +10,292 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
|
|
10
10
|
|
11
11
|
----
|
12
12
|
|
13
|
+
## [In GIT](https://github.com/cucumber/cucumber-ruby/compare/v5.2.0...master)
|
14
|
+
|
15
|
+
### Added
|
16
|
+
|
17
|
+
### Changed
|
18
|
+
|
19
|
+
### Removed
|
20
|
+
|
21
|
+
### Deprecated
|
22
|
+
|
23
|
+
### Fixed
|
24
|
+
|
25
|
+
### Security fixes
|
26
|
+
|
27
|
+
## [5.2.0](https://github.com/cucumber/cucumber-ruby/compare/v5.1.3...v5.2.0)
|
28
|
+
|
29
|
+
### Changed
|
30
|
+
|
31
|
+
* `--publish` uses the response provided by the server as the banner [#1472](https://github.com/cucumber/cucumber-ruby/issues/1472)
|
32
|
+
|
33
|
+
## [5.1.3](https://github.com/cucumber/cucumber-ruby/compare/v5.1.2...v5.1.3)
|
34
|
+
|
35
|
+
### Fixed
|
36
|
+
|
37
|
+
* The `CUCUMBER_PUBLISH_TOKEN` now sets the correct HTTP header, following a fix in the curl option parser.
|
38
|
+
|
39
|
+
## [5.1.2](https://github.com/cucumber/cucumber-ruby/compare/v5.1.1...v5.1.2)
|
40
|
+
|
41
|
+
### Fixed
|
42
|
+
|
43
|
+
* Do not send headers after following redirection [#1475](https://github.com/cucumber/cucumber-ruby/pull/1475)
|
44
|
+
|
45
|
+
## [5.1.1](https://github.com/cucumber/cucumber-ruby/compare/v5.1.0...v5.1.1)
|
46
|
+
|
47
|
+
### Security fixes
|
48
|
+
|
49
|
+
* Update `cucumber-create-meta` to 2.0.2
|
50
|
+
|
51
|
+
## [5.1.0](https://github.com/cucumber/cucumber-ruby/compare/v5.0.0...5.1.0)
|
52
|
+
|
53
|
+
### Added
|
54
|
+
|
55
|
+
* `-X GET` in an `--out` URL will now issue a `GET` request *without* a body. If the response is `202 Accepted` *and*
|
56
|
+
the `Location` header is present, a new `PUT` request will be sent *with* the body.
|
57
|
+
|
58
|
+
The main reason for this added behaviour is to allow request bodies larger than 6Mb to be sent while using `--publish`.
|
59
|
+
This also improves performance since the request body is only sent once (previously it would be sent twice).
|
60
|
+
|
61
|
+
### Changed
|
62
|
+
|
63
|
+
* Set banner border color to green when publishing reports
|
64
|
+
* Postpone removal of `--format=json`, `embed` and `puts` to version 6.0.0 in deprecation messages
|
65
|
+
|
66
|
+
### Fixed
|
67
|
+
|
68
|
+
* Display banner on stderr when publishing reports [#1462](https://github.com/cucumber/cucumber-ruby/issues/1462)
|
69
|
+
|
70
|
+
## [5.0.0](https://github.com/cucumber/cucumber-ruby/compare/v4.1.0...5.0.0)
|
71
|
+
|
72
|
+
### Added
|
73
|
+
|
74
|
+
* `--publish` automatically publishes reports to [reports.cucumber.io](https://reports.cucumber.io)
|
75
|
+
* `--publish-quiet` does not print information banner about [reports.cucumber.io](https://reports.cucumber.io)
|
76
|
+
|
77
|
+
### Changed
|
78
|
+
|
79
|
+
* `-q, --quiet` will also imply `--publish-quiet` in addition to `--no-snippets --no-source --no-duration`
|
80
|
+
|
81
|
+
### Removed
|
82
|
+
|
83
|
+
* Dropped support for Ruby [2.3](https://www.ruby-lang.org/en/news/2019/03/31/support-of-ruby-2-3-has-ended/)
|
84
|
+
and [2.4](https://www.ruby-lang.org/en/news/2020/04/05/support-of-ruby-2-4-has-ended/)
|
85
|
+
|
86
|
+
### Fixed
|
87
|
+
|
88
|
+
* Update code to be compatible with `diff-lcs` versions 1.3 and 1.4
|
89
|
+
* Defer registration of `at_exit` hook that flushes and closes formatter streams
|
90
|
+
([#1458](https://github.com/cucumber/cucumber-ruby/pull/1458))
|
91
|
+
* Updated gems (see git diff for details)
|
92
|
+
* `cucumber-expressions`
|
93
|
+
* `cucumber-gherkin`
|
94
|
+
* `cucumber-create-meta`
|
95
|
+
* `cucumber-messages`
|
96
|
+
* Fix issue with timestamp nanos [#1438](https://github.com/cucumber/cucumber-ruby/issues/1438)
|
97
|
+
* `cucumber-html-formatter`
|
98
|
+
* Add filtering capabilities [#1444](https://github.com/cucumber/cucumber-ruby/issues/1444)
|
99
|
+
* Fix Interceptor that was raising exception when calling `puts` on the wrapped stream ([#1445](https://github.com/cucumber/cucumber-ruby/issues/1445))
|
100
|
+
|
101
|
+
## [4.1.0](https://github.com/cucumber/cucumber-ruby/compare/v4.0.1...v4.1.0)
|
102
|
+
|
103
|
+
### Changed
|
104
|
+
|
105
|
+
* Use [`cucumber-create-meta`](https://rubygems.org/gems/cucumber-create-meta) to produce the `Meta` message before the run.
|
106
|
+
|
107
|
+
* Updated gems:
|
108
|
+
* `cucumber-wire` ~> 3.1.0
|
109
|
+
* `cucumber-core` ~> 7.1.0
|
110
|
+
* `cucumber-gherkin` ~> 14.0.1
|
111
|
+
* Fix issue with empty feature files [#1427](https://github.com/cucumber/cucumber-ruby/issues/1427)
|
112
|
+
* `cucumber-messages` ~> 12.2.0
|
113
|
+
* `cucumber-html-formatter` ~> 7.0.0
|
114
|
+
* Fix issue with Hook attachments [#1420](https://github.com/cucumber/cucumber-ruby/issues/1420)
|
115
|
+
|
116
|
+
### Fixed
|
117
|
+
|
118
|
+
* `AfterStep` hook do not cause issue when running `message` formatter. [#1433](https://github.com/cucumber/cucumber-ruby/issues/1433) - [#1434](https://github.com/cucumber/cucumber-ruby/pull/1434)
|
119
|
+
|
120
|
+
|
121
|
+
## [4.0.1](https://github.com/cucumber/cucumber-ruby/compare/v4.0.0...v4.0.1)
|
122
|
+
|
123
|
+
### Fixed
|
124
|
+
|
125
|
+
* force reference to `diff-lcs` to 1.3 as 1.4 introduced breaking changes.
|
126
|
+
|
127
|
+
## [4.0.0](https://github.com/cucumber/cucumber-ruby/compare/v4.0.0.rc.5...v4.0.0)
|
128
|
+
|
129
|
+
### Changed
|
130
|
+
|
131
|
+
* `log` method can now be called with non-string objects and will run `.to_s` on them. [#1410](https://github.com/cucumber/cucumber-ruby/issues/1410)
|
132
|
+
|
133
|
+
### Improved
|
134
|
+
|
135
|
+
* Display snippet when using undefined parameter type [#1411](https://github.com/cucumber/cucumber-ruby/issues/1411)
|
136
|
+
|
137
|
+
## [4.0.0.rc.6](https://github.com/cucumber/cucumber-ruby/compare/v4.0.0.rc.5...4.0.0.rc.6)
|
138
|
+
|
139
|
+
### Changed
|
140
|
+
|
141
|
+
* Code snippet for an undefined step with a Doc String will ouput `doc_string` instead of `string` in block params
|
142
|
+
([#1401](https://github.com/cucumber/cucumber-ruby/issues/1401)
|
143
|
+
[#1402](https://github.com/cucumber/cucumber-ruby/pull/1402)
|
144
|
+
[karamosky](https://github.com/karamosky))
|
145
|
+
|
146
|
+
* Updated monorepo libraries:
|
147
|
+
- cucumber-gherkin ~> 13
|
148
|
+
- cucumber-html-formatter ~> 6
|
149
|
+
- cucumber-cucumber-expressions ~> 10
|
150
|
+
|
151
|
+
* Use `cucumber-ruby-core` 7.0.0
|
152
|
+
|
153
|
+
* Use `cucumber-ruby-wire` 3.0.0
|
154
|
+
|
155
|
+
* Use `body` field of attachments
|
156
|
+
|
157
|
+
### Improved
|
158
|
+
|
159
|
+
* `--out url` updates:
|
160
|
+
* supports redirects
|
161
|
+
* use `PUT` method by default
|
162
|
+
* use a cURL like options (for example: `cucumber --out 'http://example.com -X POST -H Content-Type: json`)
|
163
|
+
|
164
|
+
## [4.0.0.rc.5](https://github.com/cucumber/cucumber-ruby/compare/v4.0.0.rc.4...4.0.0.rc.5)
|
165
|
+
|
166
|
+
### Added
|
167
|
+
|
168
|
+
* New html formatter enabled by option `--format html --out report.html`.
|
169
|
+
|
170
|
+
* Accept `--out URL` to POST results to a web server
|
171
|
+
If a URL is used as output, the output will be sent with a POST request.
|
172
|
+
This can be overridden by specifying e.g. `http-method=PUT` as a query parameter.
|
173
|
+
Other `http-` prefixed query parameters will be converted to request headers
|
174
|
+
(with the `http-` prefix stripped off).
|
175
|
+
|
176
|
+
|
177
|
+
## [4.0.0.rc.4](https://github.com/cucumber/cucumber-ruby/compare/v4.0.0.rc.3...4.0.0.rc.4)
|
178
|
+
|
179
|
+
### Added
|
180
|
+
|
181
|
+
* Add `message`formatter which produces `Cucumber::Messages` ndjson output.
|
182
|
+
* Comply with [`cucumber-compatibility-kit](https://github.com/cucumber/cucumber/tree/master/compatibility-kit)
|
183
|
+
* Methods `log` and `attach` can be used in step definitions to attach text or images
|
184
|
+
|
185
|
+
### Deprecated
|
186
|
+
|
187
|
+
* `--format=json` in favor of the `message` formatter and the stand-alone JSON formatter
|
188
|
+
* `puts` in step definitions in favor of `log` ([cucumber#897](https://github.com/cucumber/cucumber/issues/897))
|
189
|
+
* `embed` in step definitions in favor of `attach` ([cucumber#897](https://github.com/cucumber/cucumber/issues/897))
|
190
|
+
|
191
|
+
|
192
|
+
## [4.0.0.rc.3](https://github.com/cucumber/cucumber-ruby/compare/v4.0.0.rc.2...v4.0.0.rc.3)
|
193
|
+
|
194
|
+
### Changed
|
195
|
+
|
196
|
+
* Update to cucumber-wire 1.1.
|
197
|
+
|
198
|
+
|
199
|
+
## [4.0.0.rc.2](https://github.com/cucumber/cucumber-ruby/compare/v4.0.0.rc.1...v4.0.0.rc.2)
|
200
|
+
|
201
|
+
### Added
|
202
|
+
* There is a new methodology in Cucumber for how the auto-loader works
|
203
|
+
* The old `load` behaviour is now replaced with a newer `require` behaviour
|
204
|
+
* Cucumber will (From version 4), now auto-load files using the `require` method
|
205
|
+
* If you wish to alter this, then you can set a top level config option: `Cucumber.use_legacy_autoloader`
|
206
|
+
* Like most config options, setting this inside a `spec_helper.rb` or `env.rb` file is advised
|
207
|
+
* For more information on this change, including why it was made. Please read this
|
208
|
+
[Blog Post](https://cucumber.io/blog/open-source/tweaking-cucumber-rubys-auto-loader/)
|
209
|
+
([#1349](https://github.com/cucumber/cucumber-ruby/pull/1349),
|
210
|
+
[#1043](https://github.com/cucumber/cucumber-ruby/issues/1043)
|
211
|
+
[luke-hill](https://github.com/luke-hill))
|
212
|
+
|
213
|
+
### Changed
|
214
|
+
* Going forward the minimum ruby version for all cucumber based gems is 2.3
|
215
|
+
([luke-hill](https://github.com/luke-hill))
|
216
|
+
|
217
|
+
### Removed
|
218
|
+
* Removed Travis publish job for cucumber-pro(a.k.a. jam)
|
219
|
+
([#1350](https://github.com/cucumber/cucumber-ruby/pull/1350)
|
220
|
+
[luke-hill](https://github.com/luke-hill))
|
221
|
+
|
222
|
+
* Drop support for JRuby. We may add this back if new versions of protobuf for JRuby
|
223
|
+
start working, or if someone can make the build pass with an older version.
|
224
|
+
All this means is we're ok to make releases while the jruby CI job is failing.
|
225
|
+
|
226
|
+
([aslakhellesoy](https://github.com/aslakhellesoy))
|
227
|
+
|
228
|
+
* Remove `dots-formatter introduced in `4.0.0rc1`
|
229
|
+
|
230
|
+
### Fixed
|
231
|
+
|
232
|
+
* Fix the placeholder expansions in the json formatter
|
233
|
+
([#1361](https://github.com/cucumber/cucumber-ruby/pull/1361)
|
234
|
+
[brasmusson](https://github.com/brasmusson))
|
235
|
+
* Fix seed printed in cucumber UI to match the seed that was actually used.
|
236
|
+
([#1329](https://github.com/cucumber/cucumber-ruby/pull/1329)
|
237
|
+
[deivid-rodriguez](https://github.com/deivid-rodriguez))
|
238
|
+
* Make SIGINT/`Ctrl+c` behavior consistent with SIGTERM/`kill` behavior - now first invocation causes existing scenario to stop running and jump to `at_exit`, second invocation causes immediate exit. Before that first invocation only instructed Cucumber to exit after scenario and second invocation caused immediate exit skipping `at_exit`.
|
239
|
+
([#1353](https://github.com/cucumber/cucumber-ruby/pull/1353)
|
240
|
+
[akostadinov](https://github.com/akostadinov))
|
241
|
+
|
242
|
+
### Improved
|
243
|
+
|
244
|
+
* Filter out any lines containing `site_ruby` from stacktrace
|
245
|
+
|
246
|
+
## [4.0.0.rc.1](https://github.com/cucumber/cucumber-ruby/compare/v3.1.2...v4.0.0.rc.1) (2018-09-29)
|
247
|
+
|
248
|
+
### Added
|
249
|
+
|
250
|
+
* Added support for new `Rule` keyword. [Read more here.](https://github.com/cucumber/cucumber/blob/master/gherkin/CHANGELOG.md#6013---2018-09-25)
|
251
|
+
* Added new `dots` formatter. This is the first step of a larger strategy to move the formatters to a new architecture where they delegate to shared executables via messages.
|
252
|
+
|
253
|
+
### Changed
|
254
|
+
|
255
|
+
* Use Gherkin v6.
|
256
|
+
([#1313](https://github.com/cucumber/cucumber-ruby/pull/1313)
|
257
|
+
[brasmusson](https://github.com/brasmusson))
|
258
|
+
* Do not apply Before and After Hooks to Test Cases with no Test Steps.
|
259
|
+
([#1311](https://github.com/cucumber/cucumber-ruby/pull/1311)
|
260
|
+
[brasmusson](https://github.com/brasmusson))
|
261
|
+
* Pass the registry to the Wire plugin.
|
262
|
+
([#1309](https://github.com/cucumber/cucumber-ruby/pull/1309)
|
263
|
+
[brasmusson](https://github.com/brasmusson))
|
264
|
+
* Adapt to using the Gherkin compiler and Pickles in the core.
|
265
|
+
([#1309](https://github.com/cucumber/cucumber-ruby/pull/1309)
|
266
|
+
[brasmusson](https://github.com/brasmusson))
|
267
|
+
* Let the Pretty Formatter use events.
|
268
|
+
([#1305](https://github.com/cucumber/cucumber-ruby/pull/1305)
|
269
|
+
[brasmusson](https://github.com/brasmusson))
|
270
|
+
* Use single quotes in generated template steps ([#1323](https://github.com/cucumber/cucumber-ruby/pull/1323) [acant](https://github.com/acant))
|
271
|
+
|
272
|
+
### Removed
|
273
|
+
|
274
|
+
* Remove the support of old style tag expressions.
|
275
|
+
([#1314](https://github.com/cucumber/cucumber-ruby/pull/1314),
|
276
|
+
[brasmusson](https://github.com/brasmusson))
|
277
|
+
* Remove the Legacy API for Formatters.
|
278
|
+
([#1230](https://github.com/cucumber/cucumber-ruby/pull/1230),
|
279
|
+
[#839](https://github.com/cucumber/cucumber-ruby/issues/839)
|
280
|
+
[brasmusson](https://github.com/brasmusson))
|
281
|
+
* Remove the JSON Pretty Formatter (which was the same as the JSON formatter).
|
282
|
+
([brasmusson](https://github.com/brasmusson))
|
283
|
+
* Remove the HTML Formatter.
|
284
|
+
([#1306](https://github.com/cucumber/cucumber-ruby/pull/1306)
|
285
|
+
[brasmusson](https://github.com/brasmusson))
|
286
|
+
|
287
|
+
### Fixed
|
288
|
+
|
289
|
+
* Wire protocol compatibility for docstrings.
|
290
|
+
([#1183](https://github.com/cucumber/cucumber-ruby/issues/1183))
|
291
|
+
* Let the Rerun Formatter handle flaky scenarios.
|
292
|
+
([#1310](https://github.com/cucumber/cucumber-ruby/pull/1310)
|
293
|
+
[brasmusson](https://github.com/brasmusson))
|
294
|
+
|
295
|
+
### Improved
|
296
|
+
|
297
|
+
* Code style changes completed as per backlog of Rubocop TODO file. ([#1021](https://github.com/cucumber/cucumber-ruby/issues/1021) [@jaysonesmith](https://github.com/jaysonesmith))
|
298
|
+
|
13
299
|
## [3.1.2](https://github.com/cucumber/cucumber-ruby/compare/v3.1.1...v3.1.2) (2018-07-13)
|
14
300
|
|
15
301
|
### Changed
|
@@ -89,13 +375,6 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
|
|
89
375
|
* Fix the printing of newlines in the rerun formatter - a problem introduced in [#1162](https://github.com/cucumber/cucumber-ruby/issues/1162) ([#1207](https://github.com/cucumber/cucumber-ruby/issues/1207) [@brasmusson](https://github.com/brasmusson))
|
90
376
|
* Handle the `--retry` option in profiles ([#1050](https://github.com/cucumber/cucumber-ruby/issues/1050) [@brasmusson](https://github.com/brasmusson))
|
91
377
|
|
92
|
-
### Improved
|
93
|
-
|
94
|
-
* Exclude the legacy_api from rubocop, regenerate Rubocop Todo ([@jaysonesmith](https://github.com/jaysonesmith), [@brasmusson](https://github.com/brasmusson))
|
95
|
-
* Review and handle excluded/ignored cops ([#1208](https://github.com/cucumber/cucumber-ruby/pull/1208) [@jaysonesmith](https://github.com/jaysonesmith))
|
96
|
-
* Fix SymbolProc issues ([#1212](https://github.com/cucumber/cucumber-ruby/pull/1212) [@jaysonesmith](https://github.com/jaysonesmith))
|
97
|
-
* Fix TrailingBlankLines ([#1211](https://github.com/cucumber/cucumber-ruby/pull/1211) [@jaysonesmith](https://github.com/jaysonesmith))
|
98
|
-
|
99
378
|
## [3.0.1](https://github.com/cucumber/cucumber-ruby/compare/v3.0.0...3.0.1) (2017-09-29)
|
100
379
|
|
101
380
|
### Fixed
|
@@ -131,12 +410,6 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
|
|
131
410
|
* Refactor: Extract HTMLBuilder#string_to_embed method to DRY up code ([#1187](https://github.com/cucumber/cucumber-ruby/pulls/1187) [@danascheider](https://github.com/danascheider))
|
132
411
|
* As per [#251](https://github.com/cucumber/cucumber/issues/251): renamed History.md to CHANGELOG.md, added contributing message at beginning, and misc formatting. ([#1185](https://github.com/cucumber/cucumber-ruby/issues/1185) [jaysonesmith](https://github.com/jaysonesmith))
|
133
412
|
* Use past tense in event names (`xStarting` -> `xStarted`) ([#1166](https://github.com/cucumber/cucumber-ruby/issues/1166) @brasmusson).
|
134
|
-
* Fix Lint/DeprecatedClassMethods ([#1172](https://github.com/cucumber/cucumber-ruby/issues/1172) [jaysonesmith](https://github.com/jaysonesmith))
|
135
|
-
* Fix Lint/DuplicateMethods ([#1173](https://github.com/cucumber/cucumber-ruby/issues/1173) [jaysonesmith](https://github.com/jaysonesmith))
|
136
|
-
* Fix Metrics/LineLength ([#1175](https://github.com/cucumber/cucumber-ruby/issues/1175), [#1175](https://github.com/cucumber/cucumber-ruby/issues/1175), [#1176](https://github.com/cucumber/cucumber-ruby/issues/1176) [jaysonesmith](https://github.com/jaysonesmith))
|
137
|
-
* Fix Style/AlignArray ([#1177](https://github.com/cucumber/cucumber-ruby/issues/1177) [jaysonesmith](https://github.com/jaysonesmith))
|
138
|
-
* Fix Style/AndOr ([#1178](https://github.com/cucumber/cucumber-ruby/issues/1178) [jaysonesmith](https://github.com/jaysonesmith))
|
139
|
-
* Fix Multiple Cops ([#1179](https://github.com/cucumber/cucumber-ruby/issues/1179) [jaysonesmith](https://github.com/jaysonesmith))
|
140
413
|
|
141
414
|
## [3.0.0.pre.2](https://github.com/cucumber/cucumber-ruby/compare/v2.4.0...v3.0.0.pre.2)
|
142
415
|
|
@@ -620,7 +893,7 @@ all.
|
|
620
893
|
* Upgrade Gherkin version to remove warnings when running on JRuby. ([#393](https://github.com/cucumber/cucumber-ruby/issues/393) Oleg Sukhodolsky)
|
621
894
|
* Do not use TagExpression.eval() which is deprecated in Gherkin 2.11.7 ([#420](https://github.com/cucumber/cucumber-ruby/issues/420) Oleg Sukhodolsky)
|
622
895
|
|
623
|
-
##
|
896
|
+
## 1.2.4
|
624
897
|
|
625
898
|
Yanked. See ([#428](https://github.com/cucumber/cucumber-ruby/issues/428)).
|
626
899
|
|
data/CONTRIBUTING.md
CHANGED
@@ -55,33 +55,19 @@ gem 'byebug'
|
|
55
55
|
If you are new to the project or to OSS, check the label
|
56
56
|
[Easy](https://github.com/cucumber/cucumber-ruby/labels/Easy). Also, you can
|
57
57
|
help us to correct style violations reported here:
|
58
|
-
[.rubocop_todo.
|
58
|
+
[.rubocop_todo.yml](https://github.com/cucumber/cucumber-ruby/blob/master/.rubocop_todo.yml).
|
59
59
|
|
60
60
|
## Release Process
|
61
61
|
|
62
|
-
*
|
63
|
-
*
|
62
|
+
* Upgrade gems with `scripts/update-gemspec`
|
63
|
+
* Bump the version number in `lib/cucumber/version`
|
64
|
+
* Update `CHANGELOG.md` with the upcoming version number and create a new `In Git` section
|
65
|
+
* Remove empty sections from `CHANGELOG.md`
|
66
|
+
* Now release it:
|
64
67
|
|
65
|
-
|
68
|
+
```
|
69
|
+
git commit -am "Release X.Y.Z"
|
70
|
+
make release
|
71
|
+
```
|
66
72
|
|
67
|
-
|
68
|
-
bundle exec rake
|
69
|
-
git commit -m "Release X.Y.Z"
|
70
|
-
rake release
|
71
|
-
|
72
|
-
## Gaining Release Karma
|
73
|
-
|
74
|
-
To become a release manager, create a pull request adding your name to the list below, and include your Rubygems email address in the ticket. One of the existing Release managers will then add you.
|
75
|
-
|
76
|
-
Current release managers:
|
77
|
-
* [Matt Wynne](https://rubygems.org/profiles/mattwynne)
|
78
|
-
* [Aslak Hellesøy](https://rubygems.org/profiles/aslakhellesoy)
|
79
|
-
* [Oleg Sukhodolsky](https://rubygems.org/profiles/os97673)
|
80
|
-
* [Steve Tooke](https://rubygems.org/profiles/tooky)
|
81
|
-
* [Björn Rasmusson](https://rubygems.org/profiles/brasmusson)
|
82
|
-
* [Andrew Walter](https://rubygems.org/profiles/xtrasimplicity)
|
83
|
-
|
84
|
-
To grant release karma, issue the following commands:
|
85
|
-
|
86
|
-
gem owner cucumber --add <NEW OWNER RUBYGEMS EMAIL>
|
87
|
-
gem owner cucumber-core --add <NEW OWNER RUBYGEMS EMAIL>
|
73
|
+
* Finally, update the cucumber-ruby version in the [documentation project](https://cucumber.io/docs/installation/) in [versions.yaml](https://github.com/cucumber/docs.cucumber.io/blob/master/data/versions.yaml) file.
|
data/README.md
CHANGED
@@ -5,7 +5,6 @@
|
|
5
5
|
|
6
6
|
[![Code Climate](https://codeclimate.com/github/cucumber/cucumber-ruby.svg)](https://codeclimate.com/github/cucumber/cucumber-ruby)
|
7
7
|
[![Coverage Status](https://coveralls.io/repos/cucumber/cucumber-ruby/badge.svg?branch=master)](https://coveralls.io/r/cucumber/cucumber-ruby?branch=master)
|
8
|
-
[![Dependency Status](https://gemnasium.com/cucumber/cucumber-ruby.svg)](https://gemnasium.com/cucumber/cucumber-ruby)
|
9
8
|
|
10
9
|
# Cucumber
|
11
10
|
|
@@ -16,8 +15,8 @@ your team.
|
|
16
15
|
|
17
16
|
Where to get more info:
|
18
17
|
|
19
|
-
* The main website: https://cucumber.io/
|
20
|
-
* Documentation: https://
|
18
|
+
* The main website: https://cucumber.io/
|
19
|
+
* Documentation: https://cucumber.io/docs
|
21
20
|
* Ruby API Documentation: http://www.rubydoc.info/github/cucumber/cucumber-ruby/
|
22
21
|
* Support forum: https://groups.google.com/group/cukes
|
23
22
|
* Chat: ([Slack](https://cucumber.io/support#slack) and [Gitter](https://cucumber.io/support#gitter))
|
@@ -25,11 +24,11 @@ Where to get more info:
|
|
25
24
|
See [CONTRIBUTING.md](CONTRIBUTING.md) for info on contributing to Cucumber.
|
26
25
|
|
27
26
|
## Supported platforms
|
27
|
+
* Ruby 2.6
|
28
28
|
* Ruby 2.5
|
29
29
|
* Ruby 2.4
|
30
30
|
* Ruby 2.3
|
31
|
-
*
|
32
|
-
* JRuby 9.1
|
31
|
+
* JRuby 9.2 (with [some limitations](https://github.com/cucumber/cucumber-ruby/blob/master/docs/jruby-limitations.md))
|
33
32
|
|
34
33
|
## Code of Conduct
|
35
34
|
|
data/bin/cucumber
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
file_name = File.dirname(__FILE__) + '/../lib'
|
3
|
-
|
3
|
+
$LOAD_PATH.unshift(file_name) unless $LOAD_PATH.include?(file_name)
|
4
4
|
|
5
5
|
require 'simplecov_setup'
|
6
6
|
require 'cucumber/rspec/disable_option_parser'
|
@@ -7,7 +7,7 @@ require 'cucumber/cli/profile_loader'
|
|
7
7
|
|
8
8
|
module Autotest::CucumberMixin
|
9
9
|
def self.included(receiver)
|
10
|
-
receiver::ALL_HOOKS << [
|
10
|
+
receiver::ALL_HOOKS << %i[run_features ran_features]
|
11
11
|
end
|
12
12
|
|
13
13
|
attr_accessor :features_to_run
|
@@ -23,26 +23,22 @@ module Autotest::CucumberMixin
|
|
23
23
|
reset_features
|
24
24
|
add_sigint_handler
|
25
25
|
|
26
|
-
self.last_mtime = Time.now if $f
|
27
|
-
|
28
26
|
loop do # ^c handler
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
hook :all_good
|
36
|
-
end
|
37
|
-
wait_for_changes
|
38
|
-
# Once tests and features are green, reset features every
|
39
|
-
# time a file is changed to see if anything breaks.
|
40
|
-
reset_features
|
41
|
-
rescue Interrupt
|
42
|
-
break if self.wants_to_quit
|
43
|
-
reset
|
44
|
-
reset_features
|
27
|
+
get_to_green
|
28
|
+
if tainted
|
29
|
+
rerun_all_tests
|
30
|
+
rerun_all_features if all_good
|
31
|
+
else
|
32
|
+
hook :all_good
|
45
33
|
end
|
34
|
+
wait_for_changes
|
35
|
+
# Once tests and features are green, reset features every
|
36
|
+
# time a file is changed to see if anything breaks.
|
37
|
+
reset_features
|
38
|
+
rescue Interrupt
|
39
|
+
break if wants_to_quit
|
40
|
+
reset
|
41
|
+
reset_features
|
46
42
|
end
|
47
43
|
hook :quit
|
48
44
|
end
|
@@ -51,12 +47,13 @@ module Autotest::CucumberMixin
|
|
51
47
|
features_to_run == ''
|
52
48
|
end
|
53
49
|
|
54
|
-
def get_to_green
|
55
|
-
|
50
|
+
def get_to_green # rubocop:disable Naming/AccessorMethodName
|
51
|
+
loop do
|
56
52
|
super
|
57
53
|
run_features
|
58
54
|
wait_for_changes unless all_features_good
|
59
|
-
|
55
|
+
break if all_features_good
|
56
|
+
end
|
60
57
|
end
|
61
58
|
|
62
59
|
def rerun_all_features
|
@@ -71,67 +68,63 @@ module Autotest::CucumberMixin
|
|
71
68
|
def run_features
|
72
69
|
hook :run_features
|
73
70
|
Tempfile.open('autotest-cucumber') do |dirty_features_file|
|
74
|
-
cmd =
|
71
|
+
cmd = make_cucumber_cmd(features_to_run, dirty_features_file.path)
|
75
72
|
break if cmd.empty?
|
76
|
-
puts cmd unless $q
|
77
73
|
old_sync = $stdout.sync
|
78
74
|
$stdout.sync = true
|
79
75
|
self.results = []
|
80
76
|
line = []
|
81
77
|
begin
|
82
|
-
open("| #{cmd}", 'r') do |f|
|
78
|
+
open("| #{cmd}", 'r') do |f| # rubocop:disable Security/Open
|
83
79
|
until f.eof?
|
84
80
|
c = f.getc || break
|
85
|
-
|
86
|
-
print c
|
87
|
-
else
|
88
|
-
putc c
|
89
|
-
end
|
81
|
+
print(c)
|
90
82
|
line << c
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
else
|
95
|
-
line.pack 'c*'
|
96
|
-
end
|
97
|
-
line.clear
|
98
|
-
end
|
83
|
+
next unless c == "\n"
|
84
|
+
results << line.join
|
85
|
+
line.clear
|
99
86
|
end
|
100
87
|
end
|
101
88
|
ensure
|
102
89
|
$stdout.sync = old_sync
|
103
90
|
end
|
104
91
|
self.features_to_run = dirty_features_file.read.strip
|
105
|
-
self.tainted = true unless
|
92
|
+
self.tainted = true unless features_to_run == ''
|
106
93
|
end
|
107
94
|
hook :ran_features
|
108
95
|
end
|
109
96
|
|
110
|
-
def make_cucumber_cmd(features_to_run,
|
111
|
-
return '' if features_to_run
|
97
|
+
def make_cucumber_cmd(features_to_run, _dirty_features_filename)
|
98
|
+
return '' if features_to_run.empty?
|
112
99
|
|
113
100
|
profile_loader = Cucumber::Cli::ProfileLoader.new
|
114
101
|
|
115
|
-
profile
|
116
|
-
|
117
|
-
|
102
|
+
profile = profile(profile_loader)
|
103
|
+
|
104
|
+
args = created_args(features_to_run, profile)
|
118
105
|
|
106
|
+
"#{Cucumber::RUBY_BINARY} #{Cucumber::BINARY} #{args}"
|
107
|
+
end
|
108
|
+
|
109
|
+
def profile(profile_loader)
|
110
|
+
profile ||= 'autotest-all' if profile_loader.profile?('autotest-all') && features_to_run == :all
|
111
|
+
profile ||= 'autotest' if profile_loader.profile?('autotest')
|
112
|
+
profile || nil
|
113
|
+
end
|
114
|
+
|
115
|
+
def created_args(features_to_run, profile)
|
119
116
|
args = if profile
|
120
117
|
['--profile', profile]
|
121
118
|
else
|
122
|
-
%w
|
119
|
+
%w[--format] << (features_to_run == :all ? 'progress' : 'pretty')
|
123
120
|
end
|
124
121
|
# No --color option as some IDEs (Netbeans) don't output them very well ([31m1 failed step[0m)
|
125
|
-
args += %w
|
122
|
+
args += %w[--format rerun --out] << dirty_features_filename
|
126
123
|
args << (features_to_run == :all ? '' : features_to_run)
|
127
124
|
|
128
|
-
#
|
129
|
-
unless features_to_run == :all
|
130
|
-
args << 'features/step_definitions' << 'features/support'
|
131
|
-
end
|
132
|
-
|
133
|
-
args = args.join(' ')
|
125
|
+
# All steps becom undefined during rerun unless the following is run.
|
126
|
+
args << 'features/step_definitions' << 'features/support' unless features_to_run == :all
|
134
127
|
|
135
|
-
|
128
|
+
args.join(' ')
|
136
129
|
end
|
137
130
|
end
|