cucumber 3.1.2 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +173 -14
  3. data/CONTRIBUTING.md +2 -18
  4. data/README.md +4 -5
  5. data/bin/cucumber +1 -1
  6. data/lib/autotest/cucumber_mixin.rb +34 -39
  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 +69 -74
  11. data/lib/cucumber/cli/profile_loader.rb +49 -26
  12. data/lib/cucumber/configuration.rb +31 -23
  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 +165 -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 +146 -0
  44. data/lib/cucumber/formatter/ignore_missing_messages.rb +1 -1
  45. data/lib/cucumber/formatter/interceptor.rb +8 -28
  46. data/lib/cucumber/formatter/io.rb +17 -11
  47. data/lib/cucumber/formatter/json.rb +101 -109
  48. data/lib/cucumber/formatter/junit.rb +56 -56
  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/query/hook_by_test_step.rb +31 -0
  54. data/lib/cucumber/formatter/query/pickle_by_test.rb +26 -0
  55. data/lib/cucumber/formatter/query/pickle_step_by_test_step.rb +26 -0
  56. data/lib/cucumber/formatter/query/step_definitions_by_test_step.rb +40 -0
  57. data/lib/cucumber/formatter/query/test_case_started_by_test_case.rb +40 -0
  58. data/lib/cucumber/formatter/rerun.rb +22 -4
  59. data/lib/cucumber/formatter/stepdefs.rb +1 -2
  60. data/lib/cucumber/formatter/steps.rb +2 -3
  61. data/lib/cucumber/formatter/summary.rb +16 -8
  62. data/lib/cucumber/formatter/unicode.rb +15 -17
  63. data/lib/cucumber/formatter/usage.rb +11 -10
  64. data/lib/cucumber/gherkin/data_table_parser.rb +17 -6
  65. data/lib/cucumber/gherkin/formatter/ansi_escapes.rb +13 -17
  66. data/lib/cucumber/gherkin/formatter/escaping.rb +2 -2
  67. data/lib/cucumber/gherkin/steps_parser.rb +17 -8
  68. data/lib/cucumber/glue/dsl.rb +1 -1
  69. data/lib/cucumber/glue/hook.rb +34 -11
  70. data/lib/cucumber/glue/invoke_in_world.rb +13 -18
  71. data/lib/cucumber/glue/proto_world.rb +42 -33
  72. data/lib/cucumber/glue/registry_and_more.rb +42 -12
  73. data/lib/cucumber/glue/snippet.rb +23 -22
  74. data/lib/cucumber/glue/step_definition.rb +42 -19
  75. data/lib/cucumber/glue/world_factory.rb +1 -1
  76. data/lib/cucumber/hooks.rb +11 -11
  77. data/lib/cucumber/multiline_argument.rb +4 -6
  78. data/lib/cucumber/multiline_argument/data_table.rb +97 -64
  79. data/lib/cucumber/multiline_argument/data_table/diff_matrices.rb +1 -1
  80. data/lib/cucumber/multiline_argument/doc_string.rb +1 -1
  81. data/lib/cucumber/platform.rb +3 -3
  82. data/lib/cucumber/rake/task.rb +16 -16
  83. data/lib/cucumber/rspec/disable_option_parser.rb +9 -8
  84. data/lib/cucumber/running_test_case.rb +2 -53
  85. data/lib/cucumber/runtime.rb +54 -58
  86. data/lib/cucumber/runtime/after_hooks.rb +8 -4
  87. data/lib/cucumber/runtime/before_hooks.rb +8 -4
  88. data/lib/cucumber/runtime/for_programming_languages.rb +4 -2
  89. data/lib/cucumber/runtime/step_hooks.rb +3 -2
  90. data/lib/cucumber/runtime/support_code.rb +13 -15
  91. data/lib/cucumber/runtime/user_interface.rb +6 -16
  92. data/lib/cucumber/step_definition_light.rb +4 -3
  93. data/lib/cucumber/step_definitions.rb +2 -2
  94. data/lib/cucumber/step_match.rb +12 -11
  95. data/lib/cucumber/step_match_search.rb +2 -1
  96. data/lib/cucumber/term/ansicolor.rb +9 -9
  97. data/lib/cucumber/version +1 -1
  98. metadata +224 -82
  99. data/lib/cucumber/events/gherkin_source_parsed.rb~ +0 -14
  100. data/lib/cucumber/formatter/ast_lookup.rb~ +0 -9
  101. data/lib/cucumber/formatter/cucumber.css +0 -286
  102. data/lib/cucumber/formatter/cucumber.sass +0 -247
  103. data/lib/cucumber/formatter/hook_query_visitor.rb +0 -42
  104. data/lib/cucumber/formatter/html_builder.rb +0 -121
  105. data/lib/cucumber/formatter/inline-js.js +0 -30
  106. data/lib/cucumber/formatter/jquery-min.js +0 -154
  107. data/lib/cucumber/formatter/json_pretty.rb +0 -11
  108. data/lib/cucumber/formatter/legacy_api/adapter.rb +0 -1028
  109. data/lib/cucumber/formatter/legacy_api/ast.rb +0 -394
  110. data/lib/cucumber/formatter/legacy_api/results.rb +0 -50
  111. data/lib/cucumber/formatter/legacy_api/runtime_facade.rb +0 -32
  112. 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: fd820c5e08e32e33bba11e646e1e98d4382028b6e071914ddcb4982bb0657278
4
+ data.tar.gz: 13c93ab1fa304955ac45f8ce702eeb68dbcf2e316e383c9ae0ababe04a476762
5
5
  SHA512:
6
- metadata.gz: 560857486693d265017f21421942be4bc737f852d2972cd5a76c93f678ffe4ac06a0fd58e91f52b7ccb2d5c63156c2af13cb2e11e2bdaf9e194e516ddd663387
7
- data.tar.gz: e3ecdbb8d5a93e5e20d0e72a46be9ccb10021b12caa7d023cd3f16e845882331231764fb772cf7d1935c4db724166dbbe3eb40bbda33a4a84760ff7bd296e54a
6
+ metadata.gz: ddd5940fbb47aaa12942842323cf81372051ddf0ad496d9213dd93d0538afbe80e5e35edf6a5d27ccdea2840a1091f86b6f65ec46e14e017cbbe724fd61e1269
7
+ data.tar.gz: 27e575d0c0730bf88574d7e42262e031ff34328b71a22af15d0a3c1dc8d3b14dacc7d62250a912de01dda4d85bdd22615d166faaa78b81dc5e24bb75a71374fd
@@ -10,6 +10,178 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
10
10
 
11
11
  ----
12
12
 
13
+ ## [4.0.0](https://github.com/cucumber/cucumber-ruby/compare/v4.0.0.rc.5...v4.0.0)
14
+
15
+ ### Changed
16
+
17
+ * `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)
18
+
19
+ ### Improved
20
+
21
+ * Display snippet when using undefined parameter type [#1411](https://github.com/cucumber/cucumber-ruby/issues/1411)
22
+
23
+ ## [4.0.0.rc.6](https://github.com/cucumber/cucumber-ruby/compare/v4.0.0.rc.5...4.0.0.rc.6)
24
+
25
+ ### Changed
26
+
27
+ * Code snippet for an undefined step with a Doc String will ouput `doc_string` instead of `string` in block params
28
+ ([#1401](https://github.com/cucumber/cucumber-ruby/issues/1401)
29
+ [#1402](https://github.com/cucumber/cucumber-ruby/pull/1402)
30
+ [karamosky](https://github.com/karamosky))
31
+
32
+ * Updated monorepo libraries:
33
+ - cucumber-gherkin ~> 13
34
+ - cucumber-html-formatter ~> 6
35
+ - cucumber-cucumber-expressions ~> 10
36
+
37
+ * Use `cucumber-ruby-core` 7.0.0
38
+
39
+ * Use `cucumber-ruby-wire` 3.0.0
40
+
41
+ * Use `body` field of attachments
42
+
43
+ ### Improved
44
+
45
+ * `--out url` updates:
46
+ * supports redirects
47
+ * use `PUT` method by default
48
+ * use a cURL like options (for example: `cucumber --out 'http://example.com -X POST -H Content-Type: json`)
49
+
50
+ ## [4.0.0.rc.5](https://github.com/cucumber/cucumber-ruby/compare/v4.0.0.rc.4...4.0.0.rc.5)
51
+
52
+ ### Added
53
+
54
+ * New html formatter enabled by option `--format html --out report.html`.
55
+
56
+ * Accept `--out URL` to POST results to a web server
57
+ If a URL is used as output, the output will be sent with a POST request.
58
+ This can be overridden by specifying e.g. `http-method=PUT` as a query parameter.
59
+ Other `http-` prefixed query parameters will be converted to request headers
60
+ (with the `http-` prefix stripped off).
61
+
62
+
63
+ ## [4.0.0.rc.4](https://github.com/cucumber/cucumber-ruby/compare/v4.0.0.rc.3...4.0.0.rc.4)
64
+
65
+ ### Added
66
+
67
+ * Add `message`formatter which produces `Cucumber::Messages` ndjson output.
68
+ * Comply with [`cucumber-compatibility-kit](https://github.com/cucumber/cucumber/tree/master/compatibility-kit)
69
+ * Methods `log` and `attach` can be used in step definitions to attach text or images
70
+
71
+ ### Deprecated
72
+
73
+ * `--format=json` in favor of the `message` formatter and the stand-alone JSON formatter
74
+ * `puts` in step definitions in favor of `log` ([cucumber#897](https://github.com/cucumber/cucumber/issues/897))
75
+ * `embed` in step definitions in favor of `attach` ([cucumber#897](https://github.com/cucumber/cucumber/issues/897))
76
+
77
+
78
+ ## [4.0.0.rc.3](https://github.com/cucumber/cucumber-ruby/compare/v4.0.0.rc.2...v4.0.0.rc.3)
79
+
80
+ ### Changed
81
+
82
+ * Update to cucumber-wire 1.1.
83
+
84
+
85
+ ## [4.0.0.rc.2](https://github.com/cucumber/cucumber-ruby/compare/v4.0.0.rc.1...v4.0.0.rc.2)
86
+
87
+ ### Added
88
+ * There is a new methodology in Cucumber for how the auto-loader works
89
+ * The old `load` behaviour is now replaced with a newer `require` behaviour
90
+ * Cucumber will (From version 4), now auto-load files using the `require` method
91
+ * If you wish to alter this, then you can set a top level config option: `Cucumber.use_legacy_autoloader`
92
+ * Like most config options, setting this inside a `spec_helper.rb` or `env.rb` file is advised
93
+ * For more information on this change, including why it was made. Please read this
94
+ [Blog Post](www.google.com)
95
+ ([#1349](https://github.com/cucumber/cucumber-ruby/pull/1349),
96
+ [#1043](https://github.com/cucumber/cucumber-ruby/issues/1043)
97
+ [luke-hill](https://github.com/luke-hill))
98
+
99
+ ### Changed
100
+ * Going forward the minimum ruby version for all cucumber based gems is 2.3
101
+ ([luke-hill](https://github.com/luke-hill))
102
+
103
+ ### Removed
104
+ * Removed Travis publish job for cucumber-pro(a.k.a. jam)
105
+ ([#1350](https://github.com/cucumber/cucumber-ruby/pull/1350)
106
+ [luke-hill](https://github.com/luke-hill))
107
+
108
+ * Drop support for JRuby. We may add this back if new versions of protobuf for JRuby
109
+ start working, or if someone can make the build pass with an older version.
110
+ All this means is we're ok to make releases while the jruby CI job is failing.
111
+
112
+ ([aslakhellesoy](https://github.com/aslakhellesoy))
113
+
114
+ * Remove `dots-formatter introduced in `4.0.0rc1`
115
+
116
+ ### Fixed
117
+
118
+ * Fix the placeholder expansions in the json formatter
119
+ ([#1361](https://github.com/cucumber/cucumber-ruby/pull/1361)
120
+ [brasmusson](https://github.com/brasmusson))
121
+ * Fix seed printed in cucumber UI to match the seed that was actually used.
122
+ ([#1329](https://github.com/cucumber/cucumber-ruby/pull/1329)
123
+ [deivid-rodriguez](https://github.com/deivid-rodriguez))
124
+ * 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`.
125
+ ([#1353](https://github.com/cucumber/cucumber-ruby/pull/1353)
126
+ [akostadinov](https://github.com/akostadinov))
127
+
128
+ ### Improved
129
+
130
+ * Filter out any lines containing `site_ruby` from stacktrace
131
+
132
+ ## [4.0.0.rc.1](https://github.com/cucumber/cucumber-ruby/compare/v3.1.2...v4.0.0.rc.1) (2018-09-29)
133
+
134
+ ### Added
135
+
136
+ * Added support for new `Rule` keyword. [Read more here.](https://github.com/cucumber/cucumber/blob/master/gherkin/CHANGELOG.md#6013---2018-09-25)
137
+ * 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.
138
+
139
+ ### Changed
140
+
141
+ * Use Gherkin v6.
142
+ ([#1313](https://github.com/cucumber/cucumber-ruby/pull/1313)
143
+ [brasmusson](https://github.com/brasmusson))
144
+ * Do not apply Before and After Hooks to Test Cases with no Test Steps.
145
+ ([#1311](https://github.com/cucumber/cucumber-ruby/pull/1311)
146
+ [brasmusson](https://github.com/brasmusson))
147
+ * Pass the registry to the Wire plugin.
148
+ ([#1309](https://github.com/cucumber/cucumber-ruby/pull/1309)
149
+ [brasmusson](https://github.com/brasmusson))
150
+ * Adapt to using the Gherkin compiler and Pickles in the core.
151
+ ([#1309](https://github.com/cucumber/cucumber-ruby/pull/1309)
152
+ [brasmusson](https://github.com/brasmusson))
153
+ * Let the Pretty Formatter use events.
154
+ ([#1305](https://github.com/cucumber/cucumber-ruby/pull/1305)
155
+ [brasmusson](https://github.com/brasmusson))
156
+ * Use single quotes in generated template steps ([#1323](https://github.com/cucumber/cucumber-ruby/pull/1323) [acant](https://github.com/acant))
157
+
158
+ ### Removed
159
+
160
+ * Remove the support of old style tag expressions.
161
+ ([#1314](https://github.com/cucumber/cucumber-ruby/pull/1314),
162
+ [brasmusson](https://github.com/brasmusson))
163
+ * Remove the Legacy API for Formatters.
164
+ ([#1230](https://github.com/cucumber/cucumber-ruby/pull/1230),
165
+ [#839](https://github.com/cucumber/cucumber-ruby/issues/839)
166
+ [brasmusson](https://github.com/brasmusson))
167
+ * Remove the JSON Pretty Formatter (which was the same as the JSON formatter).
168
+ ([brasmusson](https://github.com/brasmusson))
169
+ * Remove the HTML Formatter.
170
+ ([#1306](https://github.com/cucumber/cucumber-ruby/pull/1306)
171
+ [brasmusson](https://github.com/brasmusson))
172
+
173
+ ### Fixed
174
+
175
+ * Wire protocol compatibility for docstrings.
176
+ ([#1183](https://github.com/cucumber/cucumber-ruby/issues/1183))
177
+ * Let the Rerun Formatter handle flaky scenarios.
178
+ ([#1310](https://github.com/cucumber/cucumber-ruby/pull/1310)
179
+ [brasmusson](https://github.com/brasmusson))
180
+
181
+ ### Improved
182
+
183
+ * 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))
184
+
13
185
  ## [3.1.2](https://github.com/cucumber/cucumber-ruby/compare/v3.1.1...v3.1.2) (2018-07-13)
14
186
 
15
187
  ### Changed
@@ -89,13 +261,6 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
89
261
  * 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
262
  * Handle the `--retry` option in profiles ([#1050](https://github.com/cucumber/cucumber-ruby/issues/1050) [@brasmusson](https://github.com/brasmusson))
91
263
 
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
264
  ## [3.0.1](https://github.com/cucumber/cucumber-ruby/compare/v3.0.0...3.0.1) (2017-09-29)
100
265
 
101
266
  ### Fixed
@@ -131,12 +296,6 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
131
296
  * 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
297
  * 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
298
  * 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
299
 
141
300
  ## [3.0.0.pre.2](https://github.com/cucumber/cucumber-ruby/compare/v2.4.0...v3.0.0.pre.2)
142
301
 
@@ -620,7 +779,7 @@ all.
620
779
  * Upgrade Gherkin version to remove warnings when running on JRuby. ([#393](https://github.com/cucumber/cucumber-ruby/issues/393) Oleg Sukhodolsky)
621
780
  * 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
781
 
623
- ## 1.2.4
782
+ ## 1.2.4
624
783
 
625
784
  Yanked. See ([#428](https://github.com/cucumber/cucumber-ruby/issues/428)).
626
785
 
@@ -55,7 +55,7 @@ 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
 
@@ -67,21 +67,5 @@ Now release it
67
67
  bundle update
68
68
  bundle exec rake
69
69
  git commit -m "Release X.Y.Z"
70
+ # Make sure you run gem signin as the cukebot@cucumber.io user before running the following step. Credentials can be found in 1Password
70
71
  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>
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,12 +23,10 @@ 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
27
  begin
30
28
  get_to_green
31
- if self.tainted then
29
+ if tainted
32
30
  rerun_all_tests
33
31
  rerun_all_features if all_good
34
32
  else
@@ -39,7 +37,7 @@ module Autotest::CucumberMixin
39
37
  # time a file is changed to see if anything breaks.
40
38
  reset_features
41
39
  rescue Interrupt
42
- break if self.wants_to_quit
40
+ break if wants_to_quit
43
41
  reset
44
42
  reset_features
45
43
  end
@@ -51,12 +49,13 @@ module Autotest::CucumberMixin
51
49
  features_to_run == ''
52
50
  end
53
51
 
54
- def get_to_green
55
- begin
52
+ def get_to_green # rubocop:disable Naming/AccessorMethodName
53
+ loop do
56
54
  super
57
55
  run_features
58
56
  wait_for_changes unless all_features_good
59
- end until all_features_good
57
+ break if all_features_good
58
+ end
60
59
  end
61
60
 
62
61
  def rerun_all_features
@@ -71,67 +70,63 @@ module Autotest::CucumberMixin
71
70
  def run_features
72
71
  hook :run_features
73
72
  Tempfile.open('autotest-cucumber') do |dirty_features_file|
74
- cmd = self.make_cucumber_cmd(self.features_to_run, dirty_features_file.path)
73
+ cmd = make_cucumber_cmd(features_to_run, dirty_features_file.path)
75
74
  break if cmd.empty?
76
- puts cmd unless $q
77
75
  old_sync = $stdout.sync
78
76
  $stdout.sync = true
79
77
  self.results = []
80
78
  line = []
81
79
  begin
82
- open("| #{cmd}", 'r') do |f|
80
+ open("| #{cmd}", 'r') do |f| # rubocop:disable Security/Open
83
81
  until f.eof?
84
82
  c = f.getc || break
85
- if RUBY_VERSION >= '1.9' then
86
- print c
87
- else
88
- putc c
89
- end
83
+ print(c)
90
84
  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
85
+ next unless c == "\n"
86
+ results << line.join
87
+ line.clear
99
88
  end
100
89
  end
101
90
  ensure
102
91
  $stdout.sync = old_sync
103
92
  end
104
93
  self.features_to_run = dirty_features_file.read.strip
105
- self.tainted = true unless self.features_to_run == ''
94
+ self.tainted = true unless features_to_run == ''
106
95
  end
107
96
  hook :ran_features
108
97
  end
109
98
 
110
- def make_cucumber_cmd(features_to_run, dirty_features_filename)
111
- return '' if features_to_run == ''
99
+ def make_cucumber_cmd(features_to_run, _dirty_features_filename)
100
+ return '' if features_to_run.empty?
112
101
 
113
102
  profile_loader = Cucumber::Cli::ProfileLoader.new
114
103
 
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
104
+ profile = profile(profile_loader)
105
+
106
+ args = created_args(features_to_run, profile)
107
+
108
+ "#{Cucumber::RUBY_BINARY} #{Cucumber::BINARY} #{args}"
109
+ end
118
110
 
111
+ def profile(profile_loader)
112
+ profile ||= 'autotest-all' if profile_loader.profile?('autotest-all') && features_to_run == :all
113
+ profile ||= 'autotest' if profile_loader.profile?('autotest')
114
+ profile || nil
115
+ end
116
+
117
+ def created_args(features_to_run, profile)
119
118
  args = if profile
120
119
  ['--profile', profile]
121
120
  else
122
- %w{--format} << (features_to_run == :all ? 'progress' : 'pretty')
121
+ %w[--format] << (features_to_run == :all ? 'progress' : 'pretty')
123
122
  end
124
123
  # 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
124
+ args += %w[--format rerun --out] << dirty_features_filename
126
125
  args << (features_to_run == :all ? '' : features_to_run)
127
126
 
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(' ')
127
+ # All steps becom undefined during rerun unless the following is run.
128
+ args << 'features/step_definitions' << 'features/support' unless features_to_run == :all
134
129
 
135
- return "#{Cucumber::RUBY_BINARY} #{Cucumber::BINARY} #{args}"
130
+ args.join(' ')
136
131
  end
137
132
  end
@@ -10,7 +10,7 @@ require 'cucumber/term/ansicolor'
10
10
 
11
11
  module Cucumber
12
12
  class << self
13
- attr_accessor :wants_to_quit
13
+ attr_accessor :wants_to_quit, :use_legacy_autoloader
14
14
 
15
15
  def logger
16
16
  return @log if @log