cucumber 3.1.2 → 5.1.3

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.
Files changed (115) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +281 -14
  3. data/CONTRIBUTING.md +11 -25
  4. data/README.md +4 -5
  5. data/bin/cucumber +1 -1
  6. data/lib/autotest/cucumber_mixin.rb +46 -53
  7. data/lib/cucumber.rb +1 -1
  8. data/lib/cucumber/cli/configuration.rb +5 -5
  9. data/lib/cucumber/cli/main.rb +12 -12
  10. data/lib/cucumber/cli/options.rb +97 -76
  11. data/lib/cucumber/cli/profile_loader.rb +49 -26
  12. data/lib/cucumber/configuration.rb +44 -29
  13. data/lib/cucumber/constantize.rb +2 -5
  14. data/lib/cucumber/deprecate.rb +31 -7
  15. data/lib/cucumber/errors.rb +5 -7
  16. data/lib/cucumber/events.rb +13 -6
  17. data/lib/cucumber/events/envelope.rb +9 -0
  18. data/lib/cucumber/events/gherkin_source_parsed.rb +11 -0
  19. data/lib/cucumber/events/hook_test_step_created.rb +13 -0
  20. data/lib/cucumber/events/step_activated.rb +2 -1
  21. data/lib/cucumber/events/test_case_created.rb +13 -0
  22. data/lib/cucumber/events/test_case_ready.rb +12 -0
  23. data/lib/cucumber/events/test_step_created.rb +13 -0
  24. data/lib/cucumber/events/undefined_parameter_type.rb +10 -0
  25. data/lib/cucumber/file_specs.rb +6 -6
  26. data/lib/cucumber/filters.rb +1 -0
  27. data/lib/cucumber/filters/activate_steps.rb +5 -3
  28. data/lib/cucumber/filters/broadcast_test_case_ready_event.rb +12 -0
  29. data/lib/cucumber/filters/prepare_world.rb +5 -9
  30. data/lib/cucumber/filters/quit.rb +1 -3
  31. data/lib/cucumber/filters/tag_limits/verifier.rb +2 -4
  32. data/lib/cucumber/formatter/ansicolor.rb +40 -45
  33. data/lib/cucumber/formatter/ast_lookup.rb +163 -0
  34. data/lib/cucumber/formatter/backtrace_filter.rb +9 -8
  35. data/lib/cucumber/formatter/console.rb +58 -66
  36. data/lib/cucumber/formatter/console_counts.rb +4 -9
  37. data/lib/cucumber/formatter/console_issues.rb +6 -3
  38. data/lib/cucumber/formatter/duration.rb +1 -1
  39. data/lib/cucumber/formatter/duration_extractor.rb +3 -1
  40. data/lib/cucumber/formatter/errors.rb +6 -0
  41. data/lib/cucumber/formatter/fanout.rb +2 -0
  42. data/lib/cucumber/formatter/html.rb +11 -598
  43. data/lib/cucumber/formatter/http_io.rb +151 -0
  44. data/lib/cucumber/formatter/ignore_missing_messages.rb +1 -1
  45. data/lib/cucumber/formatter/interceptor.rb +11 -30
  46. data/lib/cucumber/formatter/io.rb +54 -12
  47. data/lib/cucumber/formatter/json.rb +101 -109
  48. data/lib/cucumber/formatter/junit.rb +55 -55
  49. data/lib/cucumber/formatter/message.rb +22 -0
  50. data/lib/cucumber/formatter/message_builder.rb +255 -0
  51. data/lib/cucumber/formatter/pretty.rb +359 -153
  52. data/lib/cucumber/formatter/progress.rb +30 -32
  53. data/lib/cucumber/formatter/publish_banner_printer.rb +77 -0
  54. data/lib/cucumber/formatter/query/hook_by_test_step.rb +31 -0
  55. data/lib/cucumber/formatter/query/pickle_by_test.rb +26 -0
  56. data/lib/cucumber/formatter/query/pickle_step_by_test_step.rb +26 -0
  57. data/lib/cucumber/formatter/query/step_definitions_by_test_step.rb +40 -0
  58. data/lib/cucumber/formatter/query/test_case_started_by_test_case.rb +40 -0
  59. data/lib/cucumber/formatter/rerun.rb +21 -3
  60. data/lib/cucumber/formatter/stepdefs.rb +1 -2
  61. data/lib/cucumber/formatter/steps.rb +2 -3
  62. data/lib/cucumber/formatter/summary.rb +16 -8
  63. data/lib/cucumber/formatter/unicode.rb +15 -17
  64. data/lib/cucumber/formatter/url_reporter.rb +30 -0
  65. data/lib/cucumber/formatter/usage.rb +11 -10
  66. data/lib/cucumber/gherkin/data_table_parser.rb +17 -6
  67. data/lib/cucumber/gherkin/formatter/ansi_escapes.rb +13 -17
  68. data/lib/cucumber/gherkin/formatter/escaping.rb +2 -2
  69. data/lib/cucumber/gherkin/steps_parser.rb +17 -8
  70. data/lib/cucumber/glue/hook.rb +34 -11
  71. data/lib/cucumber/glue/invoke_in_world.rb +13 -18
  72. data/lib/cucumber/glue/proto_world.rb +42 -33
  73. data/lib/cucumber/glue/registry_and_more.rb +42 -12
  74. data/lib/cucumber/glue/snippet.rb +23 -22
  75. data/lib/cucumber/glue/step_definition.rb +42 -19
  76. data/lib/cucumber/glue/world_factory.rb +1 -1
  77. data/lib/cucumber/hooks.rb +11 -11
  78. data/lib/cucumber/multiline_argument.rb +4 -6
  79. data/lib/cucumber/multiline_argument/data_table.rb +97 -64
  80. data/lib/cucumber/multiline_argument/data_table/diff_matrices.rb +2 -2
  81. data/lib/cucumber/multiline_argument/doc_string.rb +1 -1
  82. data/lib/cucumber/platform.rb +3 -3
  83. data/lib/cucumber/rake/task.rb +16 -18
  84. data/lib/cucumber/rspec/disable_option_parser.rb +9 -8
  85. data/lib/cucumber/rspec/doubles.rb +3 -5
  86. data/lib/cucumber/running_test_case.rb +2 -53
  87. data/lib/cucumber/runtime.rb +41 -58
  88. data/lib/cucumber/runtime/after_hooks.rb +8 -4
  89. data/lib/cucumber/runtime/before_hooks.rb +8 -4
  90. data/lib/cucumber/runtime/for_programming_languages.rb +4 -2
  91. data/lib/cucumber/runtime/step_hooks.rb +6 -2
  92. data/lib/cucumber/runtime/support_code.rb +13 -15
  93. data/lib/cucumber/runtime/user_interface.rb +6 -16
  94. data/lib/cucumber/step_definition_light.rb +4 -3
  95. data/lib/cucumber/step_definitions.rb +2 -2
  96. data/lib/cucumber/step_match.rb +12 -11
  97. data/lib/cucumber/step_match_search.rb +2 -1
  98. data/lib/cucumber/term/ansicolor.rb +9 -9
  99. data/lib/cucumber/term/banner.rb +56 -0
  100. data/lib/cucumber/version +1 -1
  101. metadata +254 -83
  102. data/lib/cucumber/events/gherkin_source_parsed.rb~ +0 -14
  103. data/lib/cucumber/formatter/ast_lookup.rb~ +0 -9
  104. data/lib/cucumber/formatter/cucumber.css +0 -286
  105. data/lib/cucumber/formatter/cucumber.sass +0 -247
  106. data/lib/cucumber/formatter/hook_query_visitor.rb +0 -42
  107. data/lib/cucumber/formatter/html_builder.rb +0 -121
  108. data/lib/cucumber/formatter/inline-js.js +0 -30
  109. data/lib/cucumber/formatter/jquery-min.js +0 -154
  110. data/lib/cucumber/formatter/json_pretty.rb +0 -11
  111. data/lib/cucumber/formatter/legacy_api/adapter.rb +0 -1028
  112. data/lib/cucumber/formatter/legacy_api/ast.rb +0 -394
  113. data/lib/cucumber/formatter/legacy_api/results.rb +0 -50
  114. data/lib/cucumber/formatter/legacy_api/runtime_facade.rb +0 -32
  115. data/lib/cucumber/step_argument.rb +0 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: fef34be35b9337e5d78fe68a0b9e642e96a5bc8e
4
- data.tar.gz: 5331fac4008b678c3bdc18ec18f4df77e3e67bfb
2
+ SHA256:
3
+ metadata.gz: 3e1477c70b949106c7f0a7f30f5b387cfa8a86ed41180d791d3bed792dde0c38
4
+ data.tar.gz: d0aa04c7c51cd100d2419684f4b7e8c4d245a68567588fe6cf5e1e4c2a301ac6
5
5
  SHA512:
6
- metadata.gz: 560857486693d265017f21421942be4bc737f852d2972cd5a76c93f678ffe4ac06a0fd58e91f52b7ccb2d5c63156c2af13cb2e11e2bdaf9e194e516ddd663387
7
- data.tar.gz: e3ecdbb8d5a93e5e20d0e72a46be9ccb10021b12caa7d023cd3f16e845882331231764fb772cf7d1935c4db724166dbbe3eb40bbda33a4a84760ff7bd296e54a
6
+ metadata.gz: 4d32e30dca15261c3f1aca9e0393c7a75ef2d044cae7bd209861a0d32580dc3ba59fc334269a6fe66fd29c792041552806c2fb3670670586c3cf27bf969795aa
7
+ data.tar.gz: a17f70e4b4731c13b700be8e2ff3a9c8e97e8075531938a351d9a9df711fbbd1a1911f88903953e9c387079767b3efb9cfe647a0e3c658aca7be3ac9a70b444d
@@ -10,6 +10,286 @@ 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.1.3...master)
14
+
15
+ ### Added
16
+
17
+ ### Changed
18
+
19
+ ### Removed
20
+
21
+ ### Deprecated
22
+
23
+ ### Fixed
24
+
25
+ ### Security fixes
26
+
27
+ ## [In GIT](https://github.com/cucumber/cucumber-ruby/compare/v5.1.2...v5.1.3)
28
+
29
+ ### Fixed
30
+
31
+ * The `CUCUMBER_PUBLISH_TOKEN` now sets the correct HTTP header, following a fix in the curl option parser.
32
+
33
+ ## [5.1.2](https://github.com/cucumber/cucumber-ruby/compare/v5.1.1...v5.1.2)
34
+
35
+ ### Fixed
36
+
37
+ * Do not send headers after following redirection [#1475](https://github.com/cucumber/cucumber-ruby/pull/1475)
38
+
39
+ ## [5.1.1](https://github.com/cucumber/cucumber-ruby/compare/v5.1.0...v5.1.1)
40
+
41
+ ### Security fixes
42
+
43
+ * Update `cucumber-create-meta` to 2.0.2
44
+
45
+ ## [5.1.0](https://github.com/cucumber/cucumber-ruby/compare/v5.0.0...5.1.0)
46
+
47
+ ### Added
48
+
49
+ * `-X GET` in an `--out` URL will now issue a `GET` request *without* a body. If the response is `202 Accepted` *and*
50
+ the `Location` header is present, a new `PUT` request will be sent *with* the body.
51
+
52
+ The main reason for this added behaviour is to allow request bodies larger than 6Mb to be sent while using `--publish`.
53
+ This also improves performance since the request body is only sent once (previously it would be sent twice).
54
+
55
+ ### Changed
56
+
57
+ * Set banner border color to green when publishing reports
58
+ * Postpone removal of `--format=json`, `embed` and `puts` to version 6.0.0 in deprecation messages
59
+
60
+ ### Fixed
61
+
62
+ * Display banner on stderr when publishing reports [#1462](https://github.com/cucumber/cucumber-ruby/issues/1462)
63
+
64
+ ## [5.0.0](https://github.com/cucumber/cucumber-ruby/compare/v4.1.0...5.0.0)
65
+
66
+ ### Added
67
+
68
+ * `--publish` automatically publishes reports to [reports.cucumber.io](https://reports.cucumber.io)
69
+ * `--publish-quiet` does not print information banner about [reports.cucumber.io](https://reports.cucumber.io)
70
+
71
+ ### Changed
72
+
73
+ * `-q, --quiet` will also imply `--publish-quiet` in addition to `--no-snippets --no-source --no-duration`
74
+
75
+ ### Removed
76
+
77
+ * Dropped support for Ruby [2.3](https://www.ruby-lang.org/en/news/2019/03/31/support-of-ruby-2-3-has-ended/)
78
+ and [2.4](https://www.ruby-lang.org/en/news/2020/04/05/support-of-ruby-2-4-has-ended/)
79
+
80
+ ### Fixed
81
+
82
+ * Update code to be compatible with `diff-lcs` versions 1.3 and 1.4
83
+ * Defer registration of `at_exit` hook that flushes and closes formatter streams
84
+ ([#1458](https://github.com/cucumber/cucumber-ruby/pull/1458))
85
+ * Updated gems (see git diff for details)
86
+ * `cucumber-expressions`
87
+ * `cucumber-gherkin`
88
+ * `cucumber-create-meta`
89
+ * `cucumber-messages`
90
+ * Fix issue with timestamp nanos [#1438](https://github.com/cucumber/cucumber-ruby/issues/1438)
91
+ * `cucumber-html-formatter`
92
+ * Add filtering capabilities [#1444](https://github.com/cucumber/cucumber-ruby/issues/1444)
93
+ * Fix Interceptor that was raising exception when calling `puts` on the wrapped stream ([#1445](https://github.com/cucumber/cucumber-ruby/issues/1445))
94
+
95
+ ## [4.1.0](https://github.com/cucumber/cucumber-ruby/compare/v4.0.1...v4.1.0)
96
+
97
+ ### Changed
98
+
99
+ * Use [`cucumber-create-meta`](https://rubygems.org/gems/cucumber-create-meta) to produce the `Meta` message before the run.
100
+
101
+ * Updated gems:
102
+ * `cucumber-wire` ~> 3.1.0
103
+ * `cucumber-core` ~> 7.1.0
104
+ * `cucumber-gherkin` ~> 14.0.1
105
+ * Fix issue with empty feature files [#1427](https://github.com/cucumber/cucumber-ruby/issues/1427)
106
+ * `cucumber-messages` ~> 12.2.0
107
+ * `cucumber-html-formatter` ~> 7.0.0
108
+ * Fix issue with Hook attachments [#1420](https://github.com/cucumber/cucumber-ruby/issues/1420)
109
+
110
+ ### Fixed
111
+
112
+ * `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)
113
+
114
+
115
+ ## [4.0.1](https://github.com/cucumber/cucumber-ruby/compare/v4.0.0...v4.0.1)
116
+
117
+ ### Fixed
118
+
119
+ * force reference to `diff-lcs` to 1.3 as 1.4 introduced breaking changes.
120
+
121
+ ## [4.0.0](https://github.com/cucumber/cucumber-ruby/compare/v4.0.0.rc.5...v4.0.0)
122
+
123
+ ### Changed
124
+
125
+ * `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)
126
+
127
+ ### Improved
128
+
129
+ * Display snippet when using undefined parameter type [#1411](https://github.com/cucumber/cucumber-ruby/issues/1411)
130
+
131
+ ## [4.0.0.rc.6](https://github.com/cucumber/cucumber-ruby/compare/v4.0.0.rc.5...4.0.0.rc.6)
132
+
133
+ ### Changed
134
+
135
+ * Code snippet for an undefined step with a Doc String will ouput `doc_string` instead of `string` in block params
136
+ ([#1401](https://github.com/cucumber/cucumber-ruby/issues/1401)
137
+ [#1402](https://github.com/cucumber/cucumber-ruby/pull/1402)
138
+ [karamosky](https://github.com/karamosky))
139
+
140
+ * Updated monorepo libraries:
141
+ - cucumber-gherkin ~> 13
142
+ - cucumber-html-formatter ~> 6
143
+ - cucumber-cucumber-expressions ~> 10
144
+
145
+ * Use `cucumber-ruby-core` 7.0.0
146
+
147
+ * Use `cucumber-ruby-wire` 3.0.0
148
+
149
+ * Use `body` field of attachments
150
+
151
+ ### Improved
152
+
153
+ * `--out url` updates:
154
+ * supports redirects
155
+ * use `PUT` method by default
156
+ * use a cURL like options (for example: `cucumber --out 'http://example.com -X POST -H Content-Type: json`)
157
+
158
+ ## [4.0.0.rc.5](https://github.com/cucumber/cucumber-ruby/compare/v4.0.0.rc.4...4.0.0.rc.5)
159
+
160
+ ### Added
161
+
162
+ * New html formatter enabled by option `--format html --out report.html`.
163
+
164
+ * Accept `--out URL` to POST results to a web server
165
+ If a URL is used as output, the output will be sent with a POST request.
166
+ This can be overridden by specifying e.g. `http-method=PUT` as a query parameter.
167
+ Other `http-` prefixed query parameters will be converted to request headers
168
+ (with the `http-` prefix stripped off).
169
+
170
+
171
+ ## [4.0.0.rc.4](https://github.com/cucumber/cucumber-ruby/compare/v4.0.0.rc.3...4.0.0.rc.4)
172
+
173
+ ### Added
174
+
175
+ * Add `message`formatter which produces `Cucumber::Messages` ndjson output.
176
+ * Comply with [`cucumber-compatibility-kit](https://github.com/cucumber/cucumber/tree/master/compatibility-kit)
177
+ * Methods `log` and `attach` can be used in step definitions to attach text or images
178
+
179
+ ### Deprecated
180
+
181
+ * `--format=json` in favor of the `message` formatter and the stand-alone JSON formatter
182
+ * `puts` in step definitions in favor of `log` ([cucumber#897](https://github.com/cucumber/cucumber/issues/897))
183
+ * `embed` in step definitions in favor of `attach` ([cucumber#897](https://github.com/cucumber/cucumber/issues/897))
184
+
185
+
186
+ ## [4.0.0.rc.3](https://github.com/cucumber/cucumber-ruby/compare/v4.0.0.rc.2...v4.0.0.rc.3)
187
+
188
+ ### Changed
189
+
190
+ * Update to cucumber-wire 1.1.
191
+
192
+
193
+ ## [4.0.0.rc.2](https://github.com/cucumber/cucumber-ruby/compare/v4.0.0.rc.1...v4.0.0.rc.2)
194
+
195
+ ### Added
196
+ * There is a new methodology in Cucumber for how the auto-loader works
197
+ * The old `load` behaviour is now replaced with a newer `require` behaviour
198
+ * Cucumber will (From version 4), now auto-load files using the `require` method
199
+ * If you wish to alter this, then you can set a top level config option: `Cucumber.use_legacy_autoloader`
200
+ * Like most config options, setting this inside a `spec_helper.rb` or `env.rb` file is advised
201
+ * For more information on this change, including why it was made. Please read this
202
+ [Blog Post](https://cucumber.io/blog/open-source/tweaking-cucumber-rubys-auto-loader/)
203
+ ([#1349](https://github.com/cucumber/cucumber-ruby/pull/1349),
204
+ [#1043](https://github.com/cucumber/cucumber-ruby/issues/1043)
205
+ [luke-hill](https://github.com/luke-hill))
206
+
207
+ ### Changed
208
+ * Going forward the minimum ruby version for all cucumber based gems is 2.3
209
+ ([luke-hill](https://github.com/luke-hill))
210
+
211
+ ### Removed
212
+ * Removed Travis publish job for cucumber-pro(a.k.a. jam)
213
+ ([#1350](https://github.com/cucumber/cucumber-ruby/pull/1350)
214
+ [luke-hill](https://github.com/luke-hill))
215
+
216
+ * Drop support for JRuby. We may add this back if new versions of protobuf for JRuby
217
+ start working, or if someone can make the build pass with an older version.
218
+ All this means is we're ok to make releases while the jruby CI job is failing.
219
+
220
+ ([aslakhellesoy](https://github.com/aslakhellesoy))
221
+
222
+ * Remove `dots-formatter introduced in `4.0.0rc1`
223
+
224
+ ### Fixed
225
+
226
+ * Fix the placeholder expansions in the json formatter
227
+ ([#1361](https://github.com/cucumber/cucumber-ruby/pull/1361)
228
+ [brasmusson](https://github.com/brasmusson))
229
+ * Fix seed printed in cucumber UI to match the seed that was actually used.
230
+ ([#1329](https://github.com/cucumber/cucumber-ruby/pull/1329)
231
+ [deivid-rodriguez](https://github.com/deivid-rodriguez))
232
+ * 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`.
233
+ ([#1353](https://github.com/cucumber/cucumber-ruby/pull/1353)
234
+ [akostadinov](https://github.com/akostadinov))
235
+
236
+ ### Improved
237
+
238
+ * Filter out any lines containing `site_ruby` from stacktrace
239
+
240
+ ## [4.0.0.rc.1](https://github.com/cucumber/cucumber-ruby/compare/v3.1.2...v4.0.0.rc.1) (2018-09-29)
241
+
242
+ ### Added
243
+
244
+ * Added support for new `Rule` keyword. [Read more here.](https://github.com/cucumber/cucumber/blob/master/gherkin/CHANGELOG.md#6013---2018-09-25)
245
+ * 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.
246
+
247
+ ### Changed
248
+
249
+ * Use Gherkin v6.
250
+ ([#1313](https://github.com/cucumber/cucumber-ruby/pull/1313)
251
+ [brasmusson](https://github.com/brasmusson))
252
+ * Do not apply Before and After Hooks to Test Cases with no Test Steps.
253
+ ([#1311](https://github.com/cucumber/cucumber-ruby/pull/1311)
254
+ [brasmusson](https://github.com/brasmusson))
255
+ * Pass the registry to the Wire plugin.
256
+ ([#1309](https://github.com/cucumber/cucumber-ruby/pull/1309)
257
+ [brasmusson](https://github.com/brasmusson))
258
+ * Adapt to using the Gherkin compiler and Pickles in the core.
259
+ ([#1309](https://github.com/cucumber/cucumber-ruby/pull/1309)
260
+ [brasmusson](https://github.com/brasmusson))
261
+ * Let the Pretty Formatter use events.
262
+ ([#1305](https://github.com/cucumber/cucumber-ruby/pull/1305)
263
+ [brasmusson](https://github.com/brasmusson))
264
+ * Use single quotes in generated template steps ([#1323](https://github.com/cucumber/cucumber-ruby/pull/1323) [acant](https://github.com/acant))
265
+
266
+ ### Removed
267
+
268
+ * Remove the support of old style tag expressions.
269
+ ([#1314](https://github.com/cucumber/cucumber-ruby/pull/1314),
270
+ [brasmusson](https://github.com/brasmusson))
271
+ * Remove the Legacy API for Formatters.
272
+ ([#1230](https://github.com/cucumber/cucumber-ruby/pull/1230),
273
+ [#839](https://github.com/cucumber/cucumber-ruby/issues/839)
274
+ [brasmusson](https://github.com/brasmusson))
275
+ * Remove the JSON Pretty Formatter (which was the same as the JSON formatter).
276
+ ([brasmusson](https://github.com/brasmusson))
277
+ * Remove the HTML Formatter.
278
+ ([#1306](https://github.com/cucumber/cucumber-ruby/pull/1306)
279
+ [brasmusson](https://github.com/brasmusson))
280
+
281
+ ### Fixed
282
+
283
+ * Wire protocol compatibility for docstrings.
284
+ ([#1183](https://github.com/cucumber/cucumber-ruby/issues/1183))
285
+ * Let the Rerun Formatter handle flaky scenarios.
286
+ ([#1310](https://github.com/cucumber/cucumber-ruby/pull/1310)
287
+ [brasmusson](https://github.com/brasmusson))
288
+
289
+ ### Improved
290
+
291
+ * 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))
292
+
13
293
  ## [3.1.2](https://github.com/cucumber/cucumber-ruby/compare/v3.1.1...v3.1.2) (2018-07-13)
14
294
 
15
295
  ### Changed
@@ -89,13 +369,6 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
89
369
  * 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
370
  * Handle the `--retry` option in profiles ([#1050](https://github.com/cucumber/cucumber-ruby/issues/1050) [@brasmusson](https://github.com/brasmusson))
91
371
 
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
372
  ## [3.0.1](https://github.com/cucumber/cucumber-ruby/compare/v3.0.0...3.0.1) (2017-09-29)
100
373
 
101
374
  ### Fixed
@@ -131,12 +404,6 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
131
404
  * 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
405
  * 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
406
  * 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
407
 
141
408
  ## [3.0.0.pre.2](https://github.com/cucumber/cucumber-ruby/compare/v2.4.0...v3.0.0.pre.2)
142
409
 
@@ -620,7 +887,7 @@ all.
620
887
  * Upgrade Gherkin version to remove warnings when running on JRuby. ([#393](https://github.com/cucumber/cucumber-ruby/issues/393) Oleg Sukhodolsky)
621
888
  * 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
889
 
623
- ## 1.2.4
890
+ ## 1.2.4
624
891
 
625
892
  Yanked. See ([#428](https://github.com/cucumber/cucumber-ruby/issues/428)).
626
893
 
@@ -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.yaml](https://github.com/cucumber/cucumber-ruby/blob/master/.rubocop_todo.yml).
58
+ [.rubocop_todo.yml](https://github.com/cucumber/cucumber-ruby/blob/master/.rubocop_todo.yml).
59
59
 
60
60
  ## Release Process
61
61
 
62
- * Bump the version number in `lib/cucumber/version`.
63
- * Make sure `CHANGELOG.md` is updated with the upcoming version number, and has entries for all fixes.
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
- Now release it
68
+ ```
69
+ git commit -am "Release X.Y.Z"
70
+ make release
71
+ ```
66
72
 
67
- bundle update
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://docs.cucumber.io
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
- * Ruby 2.2
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
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  file_name = File.dirname(__FILE__) + '/../lib'
3
- $:.unshift(file_name) unless $:.include?(file_name)
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 << [:run_features, :ran_features]
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
- begin
30
- get_to_green
31
- if self.tainted then
32
- rerun_all_tests
33
- rerun_all_features if all_good
34
- else
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
- begin
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
- end until all_features_good
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 = self.make_cucumber_cmd(self.features_to_run, dirty_features_file.path)
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
- if RUBY_VERSION >= '1.9' then
86
- print c
87
- else
88
- putc c
89
- end
81
+ print(c)
90
82
  line << c
91
- if c == ?\n then
92
- self.results << if RUBY_VERSION >= '1.9' then
93
- line.join
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 self.features_to_run == ''
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, dirty_features_filename)
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 ||= 'autotest-all' if profile_loader.has_profile?('autotest-all') && features_to_run == :all
116
- profile ||= 'autotest' if profile_loader.has_profile?('autotest')
117
- profile ||= nil
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{--format} << (features_to_run == :all ? 'progress' : 'pretty')
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 (1 failed step)
125
- args += %w{--format rerun --out} << dirty_features_filename
122
+ args += %w[--format rerun --out] << dirty_features_filename
126
123
  args << (features_to_run == :all ? '' : features_to_run)
127
124
 
128
- # Unless I do this, all the steps turn up undefined during the rerun...
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
- return "#{Cucumber::RUBY_BINARY} #{Cucumber::BINARY} #{args}"
128
+ args.join(' ')
136
129
  end
137
130
  end