cucumber 2.99.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (395) hide show
  1. checksums.yaml +4 -4
  2. data/.cucumberproignore +6 -0
  3. data/.gitattributes +32 -0
  4. data/.github/ISSUE_TEMPLATE.md +1 -1
  5. data/.github/PULL_REQUEST_TEMPLATE.md +1 -0
  6. data/.rubocop.yml +13 -0
  7. data/.rubocop_todo.yml +991 -0
  8. data/.travis.yml +56 -10
  9. data/{History.md → CHANGELOG.md} +166 -32
  10. data/CONTRIBUTING.md +21 -1
  11. data/Gemfile +18 -5
  12. data/README.md +13 -4
  13. data/Rakefile +12 -2
  14. data/appveyor.yml +27 -0
  15. data/bin/cucumber +2 -1
  16. data/cucumber.gemspec +15 -10
  17. data/cucumber.yml +10 -11
  18. data/examples/i18n/Rakefile +1 -1
  19. data/examples/i18n/ar/features/step_definitions/calculator_steps.rb +8 -3
  20. data/examples/i18n/ar/lib/calculator.rb +2 -2
  21. data/examples/i18n/bg/features/step_definitions/calculator_steps.rb +6 -6
  22. data/examples/i18n/bg/features/support/env.rb +6 -1
  23. data/examples/i18n/bg/lib/calculator.rb +2 -1
  24. data/examples/i18n/ca/features/step_definitions/calculator_steps.rb +10 -5
  25. data/examples/i18n/ca/lib/calculadora.rb +2 -2
  26. data/examples/i18n/cs/features/step_definitions/calculator_steps.rb +10 -5
  27. data/examples/i18n/cs/lib/calculator.rb +3 -3
  28. data/examples/i18n/da/features/step_definitions/lommeregner_steps.rb +10 -5
  29. data/examples/i18n/da/lib/lommeregner.rb +2 -2
  30. data/examples/i18n/de/features/step_definitions/calculator_steps.rb +10 -5
  31. data/examples/i18n/de/lib/calculator.rb +2 -2
  32. data/examples/i18n/el/features/step_definitions/calculator_steps.rb +10 -5
  33. data/examples/i18n/el/lib/calculator.rb +2 -2
  34. data/examples/i18n/en/features/step_definitions/calculator_steps.rb +9 -4
  35. data/examples/i18n/en/lib/calculator.rb +2 -2
  36. data/examples/i18n/en-lol/features/step_definitions/cucumbrz_steps.rb +4 -4
  37. data/examples/i18n/en-lol/features/support/env.rb +6 -2
  38. data/examples/i18n/en-lol/lib/basket.rb +2 -2
  39. data/examples/i18n/en-lol/lib/belly.rb +2 -2
  40. data/examples/i18n/eo/features/step_definitions/calculator_steps.rb +9 -4
  41. data/examples/i18n/eo/lib/calculator.rb +2 -2
  42. data/examples/i18n/es/features/step_definitions/calculador_steps.rb +10 -5
  43. data/examples/i18n/es/lib/calculador.rb +2 -2
  44. data/examples/i18n/et/features/step_definitions/kalkulaator_steps.rb +10 -5
  45. data/examples/i18n/et/lib/kalkulaator.rb +3 -3
  46. data/examples/i18n/fi/features/step_definitions/laskin_steps.rb +9 -4
  47. data/examples/i18n/fi/lib/laskin.rb +1 -1
  48. data/examples/i18n/fr/features/step_definitions/calculatrice_steps.rb +8 -8
  49. data/examples/i18n/fr/features/support/env.rb +7 -2
  50. data/examples/i18n/fr/lib/calculatrice.rb +2 -2
  51. data/examples/i18n/he/features/step_definitions/calculator_steps.rb +10 -5
  52. data/examples/i18n/he/lib/calculator.rb +1 -1
  53. data/examples/i18n/hi/features/step_definitions/calculator_steps.rb +9 -4
  54. data/examples/i18n/hi/lib/calculator.rb +1 -1
  55. data/examples/i18n/ht/features/step_definitions/kalkilatris_steps.rb +9 -5
  56. data/examples/i18n/ht/lib/kalkilatris.rb +2 -2
  57. data/examples/i18n/hu/features/step_definitions/calculator_steps.rb +10 -5
  58. data/examples/i18n/hu/lib/calculator.rb +1 -1
  59. data/examples/i18n/id/features/step_definitions/calculator_steps.rb +10 -5
  60. data/examples/i18n/id/lib/calculator.rb +2 -2
  61. data/examples/i18n/it/features/step_definitions/calcolatrice_steps.rb +10 -5
  62. data/examples/i18n/it/lib/calcolatrice.rb +3 -3
  63. data/examples/i18n/ja/features/step_definitions/calculator_steps.rb +3 -3
  64. data/examples/i18n/ja/features/support/env.rb +7 -2
  65. data/examples/i18n/ja/lib/calculator.rb +2 -2
  66. data/examples/i18n/ko/features/step_definitions/calculator_steps.rb +10 -5
  67. data/examples/i18n/ko/lib/calculator.rb +2 -2
  68. data/examples/i18n/lt/features/step_definitions/calculator_steps.rb +10 -5
  69. data/examples/i18n/lt/lib/calculator.rb +2 -2
  70. data/examples/i18n/lv/features/step_definitions/calculator_steps.rb +10 -5
  71. data/examples/i18n/lv/lib/calculator.rb +2 -2
  72. data/examples/i18n/no/features/step_definitions/kalkulator_steps.rb +3 -3
  73. data/examples/i18n/no/features/support/env.rb +7 -2
  74. data/examples/i18n/no/lib/kalkulator.rb +2 -2
  75. data/examples/i18n/pl/features/step_definitions/calculator_steps.rb +10 -5
  76. data/examples/i18n/pl/features/support/env.rb +6 -1
  77. data/examples/i18n/pl/lib/calculator.rb +2 -2
  78. data/examples/i18n/pt/features/step_definitions/calculadora_steps.rb +3 -3
  79. data/examples/i18n/pt/features/support/env.rb +7 -2
  80. data/examples/i18n/pt/lib/calculadora.rb +1 -1
  81. data/examples/i18n/ro/features/step_definitions/calculator_steps.rb +11 -6
  82. data/examples/i18n/ro/lib/calculator.rb +1 -1
  83. data/examples/i18n/ru/features/step_definitions/calculator_steps.rb +5 -5
  84. data/examples/i18n/ru/features/support/env.rb +6 -1
  85. data/examples/i18n/ru/lib/calculator.rb +2 -1
  86. data/examples/i18n/sk/features/step_definitions/calculator_steps.rb +10 -5
  87. data/examples/i18n/sk/lib/calculator.rb +2 -2
  88. data/examples/i18n/sr-Cyrl/features/step_definitions/calculator_steps.rb +3 -3
  89. data/examples/i18n/sr-Cyrl/features/support/env.rb +7 -2
  90. data/examples/i18n/sr-Cyrl/lib/calculator.rb +2 -2
  91. data/examples/i18n/sr-Latn/features/step_definitions/calculator_steps.rb +10 -5
  92. data/examples/i18n/sr-Latn/lib/calculator.rb +2 -2
  93. data/examples/i18n/sv/features/step_definitions/kalkulator_steps.rb +9 -4
  94. data/examples/i18n/sv/lib/kalkulator.rb +2 -2
  95. data/examples/i18n/tr/features/step_definitions/hesap_makinesi_adimlari.rb +10 -5
  96. data/examples/i18n/tr/lib/hesap_makinesi.rb +2 -2
  97. data/examples/i18n/uk/features/step_definitions/calculator_steps.rb +4 -4
  98. data/examples/i18n/uk/features/support/env.rb +6 -1
  99. data/examples/i18n/uk/lib/calculator.rb +2 -1
  100. data/examples/i18n/uz/features/step_definitions/calculator_steps.rb +4 -4
  101. data/examples/i18n/uz/features/support/env.rb +6 -1
  102. data/examples/i18n/uz/lib/calculator.rb +2 -1
  103. data/examples/i18n/zh-CN/features/step_definitions/calculator_steps.rb +11 -6
  104. data/examples/i18n/zh-CN/lib/calculator.rb +2 -2
  105. data/examples/i18n/zh-TW/features/step_definitions/calculator_steps.rb +10 -5
  106. data/examples/i18n/zh-TW/lib/calculator.rb +2 -2
  107. data/examples/rspec_doubles/features/step_definitions/calvin_steps.rb +3 -3
  108. data/examples/sinatra/features/step_definitions/add_steps.rb +4 -4
  109. data/examples/sinatra/features/support/env.rb +6 -1
  110. data/examples/tcl/features/step_definitions/fib_steps.rb +2 -2
  111. data/examples/tcl/features/support/env.rb +2 -1
  112. data/examples/test_unit/features/step_definitions/test_unit_steps.rb +4 -4
  113. data/examples/watir/features/step_definitions/search_steps.rb +6 -5
  114. data/examples/watir/features/support/env.rb +5 -1
  115. data/examples/watir/features/support/screenshots.rb +5 -5
  116. data/features/docs/api/list_step_defs_as_json.feature +21 -7
  117. data/features/docs/api/listen_for_events.feature +9 -8
  118. data/features/docs/api/run_cli_main_with_existing_runtime.feature +1 -0
  119. data/features/docs/cli/dry_run.feature +3 -0
  120. data/features/docs/cli/execute_with_tag_filter.feature +8 -6
  121. data/features/docs/cli/fail_fast.feature +2 -0
  122. data/features/docs/cli/help.feature +8 -0
  123. data/features/docs/{gherkin/language_help.feature → cli/i18n.feature} +6 -6
  124. data/features/docs/cli/randomize.feature +2 -2
  125. data/features/docs/cli/retry_failing_tests.feature +75 -15
  126. data/features/docs/cli/run_scenarios_matching_name.feature +1 -0
  127. data/features/docs/cli/specifying_multiple_formatters.feature +3 -0
  128. data/features/docs/cli/strict_mode.feature +6 -0
  129. data/features/docs/defining_steps/ambiguous_steps.feature +89 -0
  130. data/features/docs/defining_steps/nested_steps.feature +5 -1
  131. data/features/docs/defining_steps/nested_steps_i18n.feature +3 -0
  132. data/features/docs/defining_steps/nested_steps_with_second_arg.feature +2 -0
  133. data/features/docs/defining_steps/printing_messages.feature +1 -2
  134. data/features/docs/defining_steps/skip_scenario.feature +1 -34
  135. data/features/docs/defining_steps/snippets.feature +18 -18
  136. data/features/docs/events/gherkin_source_read_event.feature +43 -0
  137. data/features/docs/events/step_activated_event.feature +36 -0
  138. data/features/docs/events/step_definition_registered_event.feature +29 -0
  139. data/features/docs/events/test_case_finished_event.feature +35 -0
  140. data/features/docs/events/test_case_started_event.feature +54 -0
  141. data/features/docs/events/test_run_finished_event.feature +40 -0
  142. data/features/docs/events/test_run_started_event.feature +41 -0
  143. data/features/docs/events/test_step_finished_event.feature +47 -0
  144. data/features/docs/events/test_step_started_event.feature +43 -0
  145. data/features/docs/exception_in_after_hook.feature +3 -2
  146. data/features/docs/exception_in_after_step_hook.feature +2 -0
  147. data/features/docs/exception_in_around_hook.feature +2 -0
  148. data/features/docs/exception_in_before_hook.feature +3 -1
  149. data/features/docs/extending_cucumber/custom_formatter.feature +12 -48
  150. data/features/docs/formatters/json_formatter.feature +4 -4
  151. data/features/docs/formatters/junit_formatter.feature +7 -6
  152. data/features/docs/formatters/pretty_formatter.feature +1 -0
  153. data/features/docs/formatters/progress_formatter.feature +1 -0
  154. data/features/docs/formatters/rerun_formatter.feature +2 -0
  155. data/features/docs/formatters/summary_formatter.feature +35 -0
  156. data/features/docs/formatters/usage_formatter.feature +3 -0
  157. data/features/docs/getting_started.feature +2 -1
  158. data/features/docs/gherkin/background.feature +5 -5
  159. data/features/docs/gherkin/doc_strings.feature +2 -0
  160. data/features/docs/gherkin/expand_option_for_outlines.feature +1 -0
  161. data/features/docs/gherkin/outlines.feature +6 -4
  162. data/features/docs/gherkin/unicode_table.feature +2 -1
  163. data/features/docs/gherkin/using_descriptions.feature +1 -0
  164. data/features/docs/gherkin/using_star_notation.feature +1 -1
  165. data/features/docs/post_configuration_hook.feature +1 -17
  166. data/features/docs/rake_task.feature +5 -0
  167. data/features/docs/raketask.feature +3 -1
  168. data/features/docs/work_in_progress.feature +5 -2
  169. data/features/docs/writing_support_code/after_step_hooks.feature +3 -1
  170. data/features/docs/writing_support_code/around_hooks.feature +6 -0
  171. data/features/docs/writing_support_code/before_hook.feature +1 -0
  172. data/features/docs/writing_support_code/hook_order.feature +3 -1
  173. data/features/docs/writing_support_code/parameter_types.feature +53 -0
  174. data/features/docs/writing_support_code/tagged_hooks.feature +1 -1
  175. data/features/docs/writing_support_code/world.feature +129 -0
  176. data/features/lib/step_definitions/aruba_steps.rb +5 -10
  177. data/features/lib/step_definitions/cli_steps.rb +4 -0
  178. data/features/lib/step_definitions/cucumber_steps.rb +9 -12
  179. data/features/lib/step_definitions/iso-8859-1_steps.rb +9 -5
  180. data/features/lib/step_definitions/json_steps.rb +2 -1
  181. data/features/lib/step_definitions/junit_steps.rb +2 -1
  182. data/features/lib/step_definitions/language_steps.rb +3 -2
  183. data/features/lib/step_definitions/profile_steps.rb +7 -6
  184. data/features/lib/step_definitions/retry_steps.rb +33 -13
  185. data/features/lib/step_definitions/ruby_steps.rb +2 -1
  186. data/features/lib/support/env.rb +3 -2
  187. data/features/lib/support/fake_wire_server.rb +17 -3
  188. data/features/lib/support/feature_factory.rb +2 -1
  189. data/features/lib/support/normalise_output.rb +14 -12
  190. data/features/lib/support/parameter_types.rb +5 -0
  191. data/gem_tasks/contributors.rake +10 -6
  192. data/gem_tasks/cov.rake +1 -0
  193. data/gem_tasks/downloads.rb +1 -0
  194. data/gem_tasks/environment.rake +2 -5
  195. data/gem_tasks/examples.rake +3 -2
  196. data/gem_tasks/fix_cr_lf.rake +19 -7
  197. data/gem_tasks/flog.rake +4 -3
  198. data/gem_tasks/rspec.rake +2 -1
  199. data/gem_tasks/sass.rake +2 -1
  200. data/lib/autotest/cucumber.rb +1 -0
  201. data/lib/autotest/cucumber_mixin.rb +17 -16
  202. data/lib/autotest/cucumber_rails.rb +1 -0
  203. data/lib/autotest/cucumber_rails_rspec.rb +1 -0
  204. data/lib/autotest/cucumber_rails_rspec2.rb +1 -0
  205. data/lib/autotest/cucumber_rspec.rb +1 -0
  206. data/lib/autotest/cucumber_rspec2.rb +1 -0
  207. data/lib/autotest/discover.rb +3 -2
  208. data/lib/cucumber/cli/configuration.rb +12 -21
  209. data/lib/cucumber/cli/main.rb +8 -7
  210. data/lib/cucumber/cli/options.rb +341 -217
  211. data/lib/cucumber/cli/profile_loader.rb +26 -21
  212. data/lib/cucumber/cli/rerun_file.rb +1 -0
  213. data/lib/cucumber/configuration.rb +54 -37
  214. data/lib/cucumber/constantize.rb +2 -1
  215. data/lib/cucumber/core_ext/string.rb +2 -1
  216. data/lib/cucumber/deprecate.rb +4 -3
  217. data/lib/cucumber/encoding.rb +1 -0
  218. data/lib/cucumber/errors.rb +3 -1
  219. data/lib/cucumber/events/gherkin_source_read.rb +17 -0
  220. data/lib/cucumber/events/{step_match.rb → step_activated.rb} +5 -2
  221. data/lib/cucumber/events/step_definition_registered.rb +24 -0
  222. data/lib/cucumber/events/test_case_finished.rb +18 -0
  223. data/lib/cucumber/events/test_case_started.rb +15 -0
  224. data/lib/cucumber/events/test_run_finished.rb +12 -0
  225. data/lib/cucumber/events/test_run_started.rb +16 -0
  226. data/lib/cucumber/events/test_step_finished.rb +20 -0
  227. data/lib/cucumber/events/test_step_started.rb +17 -0
  228. data/lib/cucumber/events.rb +23 -3
  229. data/lib/cucumber/file_specs.rb +1 -0
  230. data/lib/cucumber/filters/activate_steps.rb +8 -3
  231. data/lib/cucumber/filters/apply_after_hooks.rb +1 -0
  232. data/lib/cucumber/filters/apply_after_step_hooks.rb +1 -0
  233. data/lib/cucumber/filters/apply_around_hooks.rb +1 -0
  234. data/lib/cucumber/filters/apply_before_hooks.rb +1 -0
  235. data/lib/cucumber/filters/broadcast_test_run_started_event.rb +27 -0
  236. data/lib/cucumber/filters/gated_receiver.rb +1 -0
  237. data/lib/cucumber/filters/prepare_world.rb +1 -0
  238. data/lib/cucumber/filters/quit.rb +1 -0
  239. data/lib/cucumber/filters/randomizer.rb +1 -0
  240. data/lib/cucumber/filters/retry.rb +4 -4
  241. data/lib/cucumber/filters/tag_limits/test_case_index.rb +1 -0
  242. data/lib/cucumber/filters/tag_limits/verifier.rb +2 -1
  243. data/lib/cucumber/filters/tag_limits.rb +4 -3
  244. data/lib/cucumber/filters.rb +3 -0
  245. data/lib/cucumber/formatter/ansicolor.rb +9 -11
  246. data/lib/cucumber/formatter/backtrace_filter.rb +21 -8
  247. data/lib/cucumber/formatter/console.rb +72 -66
  248. data/lib/cucumber/formatter/console_counts.rb +44 -0
  249. data/lib/cucumber/formatter/console_issues.rb +58 -0
  250. data/lib/cucumber/formatter/duration.rb +2 -1
  251. data/lib/cucumber/formatter/duration_extractor.rb +1 -0
  252. data/lib/cucumber/formatter/fail_fast.rb +4 -2
  253. data/lib/cucumber/formatter/fanout.rb +1 -0
  254. data/lib/cucumber/formatter/hook_query_visitor.rb +1 -0
  255. data/lib/cucumber/formatter/html.rb +175 -249
  256. data/lib/cucumber/formatter/html_builder.rb +120 -0
  257. data/lib/cucumber/formatter/ignore_missing_messages.rb +1 -0
  258. data/lib/cucumber/formatter/inline-js.js +30 -0
  259. data/lib/cucumber/formatter/interceptor.rb +3 -2
  260. data/lib/cucumber/formatter/io.rb +2 -1
  261. data/lib/cucumber/formatter/json.rb +33 -30
  262. data/lib/cucumber/formatter/json_pretty.rb +1 -0
  263. data/lib/cucumber/formatter/junit.rb +26 -24
  264. data/lib/cucumber/formatter/legacy_api/adapter.rb +81 -69
  265. data/lib/cucumber/formatter/legacy_api/ast.rb +27 -22
  266. data/lib/cucumber/formatter/legacy_api/results.rb +7 -8
  267. data/lib/cucumber/formatter/legacy_api/runtime_facade.rb +1 -0
  268. data/lib/cucumber/formatter/pretty.rb +24 -18
  269. data/lib/cucumber/formatter/progress.rb +55 -13
  270. data/lib/cucumber/formatter/rerun.rb +15 -18
  271. data/lib/cucumber/formatter/stepdefs.rb +1 -0
  272. data/lib/cucumber/formatter/steps.rb +2 -1
  273. data/lib/cucumber/formatter/summary.rb +43 -20
  274. data/lib/cucumber/formatter/unicode.rb +2 -1
  275. data/lib/cucumber/formatter/usage.rb +33 -28
  276. data/lib/cucumber/gherkin/data_table_parser.rb +1 -0
  277. data/lib/cucumber/gherkin/formatter/ansi_escapes.rb +2 -1
  278. data/lib/cucumber/gherkin/formatter/escaping.rb +2 -1
  279. data/lib/cucumber/gherkin/i18n.rb +1 -0
  280. data/lib/cucumber/gherkin/steps_parser.rb +1 -0
  281. data/lib/cucumber/{rb_support/rb_dsl.rb → glue/dsl.rb} +41 -30
  282. data/lib/cucumber/glue/hook.rb +43 -0
  283. data/lib/cucumber/glue/invoke_in_world.rb +70 -0
  284. data/lib/cucumber/glue/proto_world.rb +220 -0
  285. data/lib/cucumber/{rb_support/rb_language.rb → glue/registry_and_more.rb} +60 -90
  286. data/lib/cucumber/{rb_support → glue}/snippet.rb +64 -26
  287. data/lib/cucumber/glue/step_definition.rb +143 -0
  288. data/lib/cucumber/glue/world_factory.rb +23 -0
  289. data/lib/cucumber/hooks.rb +9 -8
  290. data/lib/cucumber/load_path.rb +1 -0
  291. data/lib/cucumber/multiline_argument/data_table/diff_matrices.rb +158 -0
  292. data/lib/cucumber/multiline_argument/data_table.rb +47 -181
  293. data/lib/cucumber/multiline_argument/doc_string.rb +1 -0
  294. data/lib/cucumber/multiline_argument.rb +6 -15
  295. data/lib/cucumber/platform.rb +4 -5
  296. data/lib/cucumber/project_initializer.rb +3 -2
  297. data/lib/cucumber/rake/task.rb +19 -14
  298. data/lib/cucumber/rspec/disable_option_parser.rb +2 -1
  299. data/lib/cucumber/rspec/doubles.rb +2 -1
  300. data/lib/cucumber/running_test_case.rb +3 -27
  301. data/lib/cucumber/runtime/after_hooks.rb +2 -1
  302. data/lib/cucumber/runtime/before_hooks.rb +1 -0
  303. data/lib/cucumber/runtime/for_programming_languages.rb +2 -36
  304. data/lib/cucumber/runtime/step_hooks.rb +1 -0
  305. data/lib/cucumber/runtime/support_code.rb +21 -16
  306. data/lib/cucumber/runtime/user_interface.rb +10 -16
  307. data/lib/cucumber/runtime.rb +49 -32
  308. data/lib/cucumber/step_argument.rb +1 -2
  309. data/lib/cucumber/step_definition_light.rb +2 -0
  310. data/lib/cucumber/step_definitions.rb +1 -0
  311. data/lib/cucumber/step_match.rb +30 -15
  312. data/lib/cucumber/step_match_search.rb +3 -3
  313. data/lib/cucumber/term/ansicolor.rb +2 -1
  314. data/lib/cucumber/unit.rb +1 -0
  315. data/lib/cucumber/version +1 -1
  316. data/lib/cucumber.rb +1 -13
  317. data/lib/simplecov_setup.rb +2 -1
  318. data/scripts/invite-collaborator +40 -0
  319. data/scripts/update-changelog +86 -0
  320. data/spec/cucumber/cli/configuration_spec.rb +109 -98
  321. data/spec/cucumber/cli/main_spec.rb +8 -7
  322. data/spec/cucumber/cli/options_spec.rb +114 -79
  323. data/spec/cucumber/cli/profile_loader_spec.rb +25 -5
  324. data/spec/cucumber/cli/rerun_spec.rb +21 -20
  325. data/spec/cucumber/configuration_spec.rb +48 -47
  326. data/spec/cucumber/constantize_spec.rb +3 -2
  327. data/spec/cucumber/events_spec.rb +9 -0
  328. data/spec/cucumber/file_specs_spec.rb +26 -25
  329. data/spec/cucumber/filters/activate_steps_spec.rb +25 -22
  330. data/spec/cucumber/filters/gated_receiver_spec.rb +7 -6
  331. data/spec/cucumber/filters/retry_spec.rb +42 -23
  332. data/spec/cucumber/filters/tag_limits/test_case_index_spec.rb +12 -11
  333. data/spec/cucumber/filters/tag_limits/verifier_spec.rb +15 -14
  334. data/spec/cucumber/filters/tag_limits_spec.rb +9 -8
  335. data/spec/cucumber/formatter/ansicolor_spec.rb +10 -9
  336. data/spec/cucumber/formatter/backtrace_filter_spec.rb +32 -0
  337. data/spec/cucumber/formatter/console_counts_spec.rb +14 -0
  338. data/spec/cucumber/formatter/duration_spec.rb +4 -3
  339. data/spec/cucumber/formatter/fail_fast_spec.rb +27 -27
  340. data/spec/cucumber/formatter/html_spec.rb +65 -60
  341. data/spec/cucumber/formatter/interceptor_spec.rb +1 -0
  342. data/spec/cucumber/formatter/json_spec.rb +71 -97
  343. data/spec/cucumber/formatter/junit_spec.rb +46 -47
  344. data/spec/cucumber/formatter/legacy_api/adapter_spec.rb +134 -141
  345. data/spec/cucumber/formatter/pretty_spec.rb +105 -117
  346. data/spec/cucumber/formatter/progress_spec.rb +22 -21
  347. data/spec/cucumber/formatter/rerun_spec.rb +70 -64
  348. data/spec/cucumber/formatter/spec_helper.rb +14 -12
  349. data/spec/cucumber/{rb_support/rb_world_spec.rb → glue/proto_world_spec.rb} +22 -6
  350. data/spec/cucumber/glue/registry_and_more_spec.rb +213 -0
  351. data/spec/cucumber/{rb_support → glue}/snippet_spec.rb +62 -25
  352. data/spec/cucumber/glue/step_definition_spec.rb +207 -0
  353. data/spec/cucumber/hooks_spec.rb +5 -4
  354. data/spec/cucumber/multiline_argument/data_table_spec.rb +179 -129
  355. data/spec/cucumber/project_initializer_spec.rb +12 -11
  356. data/spec/cucumber/rake/forked_spec.rb +22 -17
  357. data/spec/cucumber/rake/task_spec.rb +21 -20
  358. data/spec/cucumber/running_test_case_spec.rb +36 -35
  359. data/spec/cucumber/runtime/for_programming_languages_spec.rb +2 -30
  360. data/spec/cucumber/runtime/support_code_spec.rb +1 -0
  361. data/spec/cucumber/runtime_spec.rb +3 -2
  362. data/spec/cucumber/step_argument_spec.rb +6 -5
  363. data/spec/cucumber/step_match_search_spec.rb +32 -41
  364. data/spec/cucumber/step_match_spec.rb +34 -33
  365. data/spec/cucumber/world/pending_spec.rb +12 -11
  366. data/spec/spec_helper.rb +1 -0
  367. data/spec/support/standard_step_actions.rb +2 -1
  368. metadata +132 -61
  369. data/features/docs/formatters/debug_formatter.feature +0 -47
  370. data/features/docs/formatters/formatter_step_file_colon_line.feature +0 -44
  371. data/features/docs/writing_support_code/transforms.feature +0 -98
  372. data/features/lib/step_definitions/wire_steps.rb +0 -58
  373. data/gem_tasks/cucumber.rake +0 -25
  374. data/lib/cucumber/ast.rb +0 -13
  375. data/lib/cucumber/core_ext/instance_exec.rb +0 -70
  376. data/lib/cucumber/events/after_test_case.rb +0 -25
  377. data/lib/cucumber/events/after_test_step.rb +0 -30
  378. data/lib/cucumber/events/before_test_case.rb +0 -18
  379. data/lib/cucumber/events/before_test_step.rb +0 -23
  380. data/lib/cucumber/events/bus.rb +0 -86
  381. data/lib/cucumber/events/finished_testing.rb +0 -9
  382. data/lib/cucumber/formatter/debug.rb +0 -35
  383. data/lib/cucumber/formatter/event_bus_report.rb +0 -38
  384. data/lib/cucumber/rb_support/rb_hook.rb +0 -19
  385. data/lib/cucumber/rb_support/rb_step_definition.rb +0 -131
  386. data/lib/cucumber/rb_support/rb_transform.rb +0 -59
  387. data/lib/cucumber/rb_support/rb_world.rb +0 -149
  388. data/spec/cucumber/core_ext/instance_exec_spec.rb +0 -4
  389. data/spec/cucumber/events/bus_spec.rb +0 -94
  390. data/spec/cucumber/formatter/debug_spec.rb +0 -64
  391. data/spec/cucumber/formatter/event_bus_report_spec.rb +0 -88
  392. data/spec/cucumber/rb_support/rb_language_spec.rb +0 -243
  393. data/spec/cucumber/rb_support/rb_step_definition_spec.rb +0 -199
  394. data/spec/cucumber/rb_support/rb_transform_spec.rb +0 -46
  395. data/spec/cucumber_spec.rb +0 -39
data/.travis.yml CHANGED
@@ -1,23 +1,69 @@
1
1
  sudo: false
2
2
 
3
- rvm:
4
- - 2.3.0
5
- - 2.2
6
- - 2.1
7
- - 2.0
8
- - 1.9.3
9
- - jruby-1.7.12
3
+ matrix:
4
+ include:
5
+ - rvm: ruby-head
6
+ os: linux
7
+ - rvm: ruby-head
8
+ os: osx
9
+ - rvm: 2.4.1
10
+ os: linux
11
+ # TravisCI OSX doesn't work with Ruby 2.4.1 yet (https://github.com/travis-ci/travis-ci/issues/7848)
12
+ - rvm: 2.4.0
13
+ os: osx
14
+ - rvm: 2.3.4
15
+ os: linux
16
+ - rvm: 2.3.4
17
+ os: osx
18
+ - rvm: 2.2
19
+ os: linux
20
+ - rvm: 2.2
21
+ os: osx
22
+ - rvm: 2.1
23
+ os: linux
24
+ - rvm: 2.1
25
+ os: osx
26
+ - rvm: jruby-9.1.13.0
27
+ os: linux
28
+ env:
29
+ # Travis by default also have "-Dcext.enabled=false" set in
30
+ # JRUBY_OPTS, but JRuby 9 does not support C extensions at all
31
+ # so it issues warning that will mess up the sterr checks.
32
+ - JRUBY_OPTS="--server -Xcompile.invokedynamic=false"
33
+ # Somehow a "ASCII-8BIT to UTF-8 conversion error" appears for
34
+ # JRuby 9
35
+ - LC_ALL=en_US.UTF-8
36
+ - LANG=en_US.UTF-8
37
+ - LANGUAGE=en_US.UTF-8
38
+ - rvm: jruby-9.1.13.0
39
+ os: osx
40
+ env:
41
+ # Travis by default also have "-Dcext.enabled=false" set in
42
+ # JRUBY_OPTS, but JRuby 9 does not support C extensions at all
43
+ # so it issues warning that will mess up the sterr checks.
44
+ - JRUBY_OPTS="--server -Xcompile.invokedynamic=false"
45
+ # Somehow a "ASCII-8BIT to UTF-8 conversion error" appears for
46
+ # JRuby 9
47
+ - LC_ALL=en_US.UTF-8
48
+ - LANG=en_US.UTF-8
49
+ - LANGUAGE=en_US.UTF-8
50
+ allow_failures:
51
+ - rvm: ruby-head
52
+ fast_finish: true
10
53
 
11
54
  # whitelist
12
55
  branches:
13
56
  only:
14
57
  - master
15
- - resolve-issue-882
16
58
  - v1.3.x-bugfix
17
- - v2.x-bugfix
59
+ - expanded_ci
18
60
 
19
61
  before_install:
62
+ - gem update --system
20
63
  - gem update bundler
21
64
 
22
65
  notifications:
23
- email: false
66
+ webhooks:
67
+ urls: # gitter
68
+ - https://webhooks.gitter.im/e/dc010332f9d40fcc21c4
69
+ slack: cucumberbdd:oQFVhzsx4R94KWmjlejAJYnM
@@ -1,10 +1,144 @@
1
- ## [In Git](https://github.com/cucumber/cucumber-ruby/compare/v2.4.0...v2.x-bugfix)
1
+ # CHANGE LOG
2
2
 
3
- ### New Features
3
+ All notable changes to this project will be documented in this file.
4
4
 
5
- ### Bugfixes
5
+ This project adheres to [Semantic Versioning](http://semver.org).
6
+
7
+ This document is formatted according to the principles of [Keep A CHANGELOG](http://keepachangelog.com).
8
+
9
+ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CONTRIBUTING.md) for more info on how to contribute to Cucumber.
10
+
11
+ ----
12
+
13
+ ## [In Git](https://github.com/cucumber/cucumber-ruby/compare/v3.0.0...master) (targeting 3.1.0)
14
+
15
+ ### Changed
16
+
17
+ * N/A
18
+
19
+ ### Added
20
+
21
+ * N/A
22
+
23
+ ### Fixed
24
+
25
+ * N/A
26
+
27
+ ### Improved
28
+
29
+ * N/A
30
+
31
+ ## [3.0.0](https://github.com/cucumber/cucumber-ruby/compare/v3.0.0.pre.2...v3.0.0) (2017-09-27)
32
+
33
+ ### Changed
34
+
35
+ * Rename `Step#name` to `#text` ([#1130](https://github.com/cucumber/cucumber-ruby/pull/1130) [@olleolleolle](https://github.com/olleolleolle))
36
+ * `Transform` has been removed and replaced with `ParameterType`. See [upgrading instructions](https://cucumber.io/blog/2017/09/21/upgrading-to-cucumber-3). ([#1190](https://github.com/cucumber/cucumber-ruby/issues/1190) @aslakhellesoy)
37
+ * Nested capture groups are not counted as parameters. See [upgrading instructions](https://cucumber.io/blog/2017/09/21/upgrading-to-cucumber-3). (@aslakhellesoy)
38
+
39
+ ### Added
40
+
41
+ * Handle selective strict options. ([#1169](https://github.com/cucumber/cucumber-ruby/pull/1169), [#1160](https://github.com/cucumber/cucumber-ruby/issues/1160) @brasmusson)
42
+
43
+ ### Fixed
44
+
45
+ * Use absolute path in IO formatter to prevent `chdir` issues. ([#1111](https://github.com/cucumber/cucumber-ruby/pull/1111/files) @akostadinov)
46
+
47
+ * Fix bug in DataTable#symbolic_hashes ([#1200](https://github.com/cucumber/cucumber-ruby/pull/1200) @Ben-Behar)
48
+
49
+ * Fix typo in JSON formatter ([#1196](https://github.com/cucumber/cucumber-ruby/pull/1196) @alb-i986)
50
+
51
+ * Handle ambiguous steps as failed steps, when not using `--guess` ([#1132](https://github.com/cucumber/cucumber-ruby/pull/1132), [#1113](https://github.com/cucumber/cucumber-ruby/issues/1113) @MadameSheema, @enkessler, @brasmusson)
52
+
53
+ ### Improved
54
+
55
+ * 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))
56
+ * 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))
57
+ * Use past tense in event names (`xStarting` -> `xStarted`) ([#1166](https://github.com/cucumber/cucumber-ruby/issues/1166) @brasmusson).
58
+ * Fix Lint/DeprecatedClassMethods ([#1172](https://github.com/cucumber/cucumber-ruby/issues/1172) [jaysonesmith](https://github.com/jaysonesmith))
59
+ * Fix Lint/DuplicateMethods ([#1173](https://github.com/cucumber/cucumber-ruby/issues/1173) [jaysonesmith](https://github.com/jaysonesmith))
60
+ * 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))
61
+ * Fix Style/AlignArray ([#1177](https://github.com/cucumber/cucumber-ruby/issues/1177) [jaysonesmith](https://github.com/jaysonesmith))
62
+ * Fix Style/AndOr ([#1178](https://github.com/cucumber/cucumber-ruby/issues/1178) [jaysonesmith](https://github.com/jaysonesmith))
63
+ * Fix Multiple Cops ([#1179](https://github.com/cucumber/cucumber-ruby/issues/1179) [jaysonesmith](https://github.com/jaysonesmith))
64
+
65
+ ## [3.0.0.pre.2](https://github.com/cucumber/cucumber-ruby/compare/v2.4.0...v3.0.0.pre.2)
66
+
67
+ ### Breaking changes
68
+
69
+ * Remove support for Ruby 1.9.3 ([#993](https://github.com/cucumber/cucumber-ruby/pull/993) @brasmusson)
70
+ * Remove support for Ruby 2.0.0 ([#1068](https://github.com/cucumber/cucumber-ruby/pull/1068) @mattwynne)
71
+
72
+ ### New Features
6
73
 
7
- ## [v2.4.0](https://github.com/cucumber/cucumber-ruby/compare/v2.3.3...v2.4.0)
74
+ * Support for Cucumber Expressions ([#1156](https://github.com/cucumber/cucumber-ruby/pull/1156))
75
+ * Use newlines in the rerun file produces by the rerun formatter ([1162](https://github.com/cucumber/cucumber-ruby/issues/1162) @brasmusson)
76
+ * Detect and list flaky scenarios in the list of not ok scenarios ([#1159](https://github.com/cucumber/cucumber-ruby/pull/1159), ([1044](https://github.com/cucumber/cucumber-ruby/issues/1044)) @brasmusson)
77
+ * List all not ok scenarios in the summary ([#1158](https://github.com/cucumber/cucumber-ruby/pull/1158) @brasmusson)
78
+ * Emulate Cucumber-JS's new i18n CLI options ([#1140](https://github.com/cucumber/cucumber-ruby/pull/1140) @aidamanna)
79
+ * Use the event bus in Cucumber-Ruby-Core ([#973](https://github.com/cucumber/cucumber-ruby/pull/973) @mattwynne)
80
+ * Add --retry option to retry failed tests as part of the same run ([#920](https://github.com/cucumber/cucumber-ruby/pull/920) @DanaScheider)
81
+ * Add a summary formatter ([#999](https://github.com/cucumber/cucumber-ruby/pull/999) @mattwynne)
82
+ * Namespaced World modules ([#1007](https://github.com/cucumber/cucumber-ruby/pull/1007) @nodo)
83
+ * Add per-formatter CLI options ([#1058](https://github.com/cucumber/cucumber-ruby/pull/1058) @nodo)
84
+ * Use tag expressions for tag filtering ([#1054](https://github.com/cucumber/cucumber-ruby/pull/1054) @brasmusson)
85
+ * Add a `TestRunStarting` event ([#1082](https://github.com/cucumber/cucumber-ruby/pull/1082) @mattwynne)
86
+
87
+ ### Bugfixes
88
+
89
+ * Fix the profile loader on Windows ([#1133](https://github.com/cucumber/cucumber-ruby/pulls/1133) @enkessler)
90
+ * Fix incorrect `DataTable#diff!` results ([#1102](https://github.com/cucumber/cucumber-ruby/pulls/1102) @botandrose)
91
+ * Do not apply the hooks to the test case several times when using the retry option ([#1098](https://github.com/cucumber/cucumber-ruby/issues/1098) @brasmusson)
92
+ * Fix bug in comparing empty data tables ([#1097](https://github.com/cucumber/cucumber-ruby/pulls/1097), resolves [#1096](https://github.com/cucumber/cucumber-ruby/issues/1096))
93
+ * Configure Gemfile to fetch cucumber-ruby-wire from git if the repo is not found locally ([#983](https://github.com/cucumber/cucumber-ruby/pulls/983), resolves [#961](https://github.com/cucumber/cucumber-ruby/issues/961))
94
+ * Fix regression displaying CLI help ([#991](https://github.com/cucumber/cucumber-ruby/pull/991) @mattwynne)
95
+ * with_filtered_backtrace called on Test::Result::Unknown with strange feature file ([#967](https://github.com/cucumber/cucumber-ruby/issues/967) @danascheider)
96
+ * fix HTML formatter backtrace duplicate line bug ([#965](https://gthub.com/cucumber/cucumber-ruby/pull/965) @josephks)
97
+ * Update env names correctly ([#1067](https://github.com/cucumber/cucumber-ruby/pull/1067) @junaruga)
98
+ * Relax filter for "/usr/local/ruby-X.Y.Z/bin/bundle" ([#1079](https://github.com/cucumber/cucumber-ruby/pull/1079) @junaruga)
99
+ * Avoid showing "@ rb_sysopen" noise for Ruby 2.4 ([#1080](https://github.com/cucumber/cucumber-ruby/pull/1080) @junaruga)
100
+
101
+ ### Refactoring / Developer Experience
102
+
103
+ * Spec: Events.registry exercised ([#1126](https://github.com/cucumber/cucumber-ruby/pulls/1126) @olleolleolle)
104
+ * Remove programming language abstraction ([#1131](https://github.com/cucumber/cucumber-ruby/pulls/1131) @tooky, @mattwynne)
105
+ * Update cucumber yaml to use new tag syntax ([#1147](https://github.com/cucumber/cucumber-ruby/pulls/1147) @danascheider)
106
+ * Turn off Windows failures ([#1142](https://github.com/cucumber/cucumber-ruby/pulls/1142) @enkessler)
107
+ * Add script to update history.md ([#1141](https://github.com/cucumber/cucumber-ruby/pulls/1141) @mattwynne)
108
+ * Update Ruby 2.3 and 2.4 in .travis.yml ([#1100](https://github.com/cucumber/cucumber-ruby/pull/1100) @junaruga)
109
+ * Fixes for rubocop violations ([#1095](https://github.com/cucumber/cucumber-ruby/pull/1095) @bv)
110
+ * Fixes for rubocop violations ([#1042](https://github.com/cucumber/cucumber-ruby/pull/1042) @phoebeclarke)
111
+ * Add frozen string literal magic comment to files and fix issues it causes ([#996](https://github.com/cucumber/cucumber-ruby/pull/996) @twalpole)
112
+ * Several tests failing with rbenv ([#1017](https://github.com/cucumber/cucumber-ruby/issues/1017) @nodo)
113
+ * Add rubocop to check the style of the codebase ([1014](https://github.com/cucumber/cucumber-ruby/issues/1014) @nodo)
114
+ * Fix the rubocop violation 'Lint/AmbiguousRegexpLiteral' ([1025](https://github.com/cucumber/cucumber-ruby/pull/1025) @pmatsinopoulos)
115
+ * Fix rubocop violations ([#1024](https://github.com/cucumber/cucumber-ruby/pull/1024) @madundead)
116
+ * Fix style violations ([#1023](https://github.com/cucumber/cucumber-ruby/pull/1023) @nodo)
117
+ * fix Lint/UselessAssignment ([1029](https://github.com/cucumber/cucumber-ruby/pull/1029) @hotovson)
118
+ * fix Lint/EndAlignment ([#1032](https://github.com/cucumber/cucumber-ruby/pull/1032) @hotovson)
119
+ * fix Lint/NonLocalExitFromIterator ([#1037](https://github.com/cucumber/cucumber-ruby/pull/1037) @hotovson)
120
+ * fix Lint/UselessAccessModifier ([#1036](https://github.com/cucumber/cucumber-ruby/pull/1036) @hotovson)
121
+ * Refs #1021 - Fixes the rubocop violation 'Style/StringLiterals' ([#1027](https://github.com/cucumber/cucumber-ruby/pull/1027) @pmatsinopoulos)
122
+ * Fixes rubocop violation Lint/StringConversionInInterpolation ([#1038](https://github.com/cucumber/cucumber-ruby/pull/1038) @hotovson)
123
+ * Fixes rubocop violation Style/FormatString ([#1040](https://github.com/cucumber/cucumber-ruby/pull/1040) @pmatsinopoulos)
124
+ * Don't check temporary files by rubocop ([#1034](https://github.com/cucumber/cucumber-ruby/pull/1034) @hotovson)
125
+ * fix Lint/NestedMethodDefinition ([#1035](https://github.com/cucumber/cucumber-ruby/pull/1035) @hotovson)
126
+ * fix Lint/UnusedArgument ([#1033](https://github.com/cucumber/cucumber-ruby/pull/1033) @hotovson)
127
+ * Fixes rubocop violation Performance/StringReplacement ([#1039](https://github.com/cucumber/cucumber-ruby/pull/1039) @pmatsinopoulos)
128
+ * Fix an json compile error for "bundle install" on Ruby 2.4 ([#1069](https://github.com/cucumber/cucumber-ruby/pull/1069) @junaruga)
129
+ * Add Ruby 2.4.0 as allow_failures in .travis.yml ([#1078](https://github.com/cucumber/cucumber-ruby/pull/1078) @junaruga)
130
+ * Add ruby-head as a allow failures in .travis.yml ([#1087](https://github.com/cucumber/cucumber-ruby/pull/1087) @junaruga)
131
+ * Refactoring for Rakefile to display cucumber task by "rake -T". ([#1088](https://github.com/cucumber/cucumber-ruby/pull/1088) @junaruga)
132
+ * Fix some rubocop offenses ([#1093](https://github.com/cucumber/cucumber-ruby/pull/1093) @bv)
133
+ * Add supported platforms to README.md. ([#1092](https://github.com/cucumber/cucumber-ruby/pull/1092) @junaruga)
134
+ * Remove Ruby 2.4 from allow_failures in .travis.yml. ([#1099](https://github.com/cucumber/cucumber-ruby/pull/1099) @junaruga)
135
+ * History: change bad character to space ([#1104](https://github.com/cucumber/cucumber-ruby/pull/1104) @olleolleolle)
136
+ * Travis: jruby-9.1.8.0 in CI ([#1105](https://github.com/cucumber/cucumber-ruby/pull/1105) @olleolleolle)
137
+ * Fix rubocop offenses 1021 003 ([#1107](https://github.com/cucumber/cucumber-ruby/pull/1107) @bv)
138
+ * Travis: use jruby-9.1.10.0 ([#1114](https://github.com/cucumber/cucumber-ruby/pull/1114) @olleolleolle)
139
+ * Change the Progress, Usage and Stepdef formatter use events ([#977](https://github.com/cucumber/cucumber-ruby/pull/977), [#1129](https://github.com/cucumber/cucumber-ruby/pull/1129) @brasmusson)
140
+
141
+ ## [2.4.0](https://github.com/cucumber/cucumber-ruby/compare/v2.3.3...v2.4.0)
8
142
 
9
143
  ### New Features
10
144
 
@@ -20,7 +154,7 @@
20
154
  * Allow Rake task to accept multiple profiles. ([#907](https://github.com/cucumber/cucumber-ruby/pull/907) @jasonkarns)
21
155
  * Let the JUnit formatter handle running test cases for different features interweaved ([#952](https://github.com/cucumber/cucumber-ruby/issues/952) @brasmusson)
22
156
 
23
- ## [v2.3.3](https://github.com/cucumber/cucumber-ruby/compare/v2.3.2...v2.3.3)
157
+ ## [2.3.3](https://github.com/cucumber/cucumber-ruby/compare/v2.3.2...v2.3.3)
24
158
 
25
159
  Added a message pointing users to [The Great Cucumber and BDD Census of 2016](https://cucumber.typeform.com/to/kjrSc2?audience=cucumber-ruby) to the installer message. Please take a few moments to help us all learn more about how you're using Cucumber and BDD.
26
160
 
@@ -29,15 +163,15 @@ Added a message pointing users to [The Great Cucumber and BDD Census of 2016](ht
29
163
  * Let the JSON formatter include data tables in the JSON file ([#948](https://github.com/cucumber/cucumber-ruby/issues/948) @brasmusson)
30
164
  * Stringifying location in the JSON formatter for more consistent json parsing ([949](https://github.com/cucumber/cucumber-ruby/pull/949), [945](https://github.com/cucumber/cucumber-ruby/issues/945) @larryprice)
31
165
 
32
- ## [v2.3.2](https://github.com/cucumber/cucumber-ruby/compare/v2.3.1...v2.3.2)
166
+ ## [2.3.2](https://github.com/cucumber/cucumber-ruby/compare/v2.3.1...v2.3.2)
33
167
 
34
168
  Brought the event bus code back into Cucumber to avoid https://github.com/fedux-org/event-bus/issues/6
35
169
 
36
- ## [v2.3.1](https://github.com/cucumber/cucumber-ruby/compare/v2.3.0...v2.3.1)
170
+ ## [2.3.1](https://github.com/cucumber/cucumber-ruby/compare/v2.3.0...v2.3.1)
37
171
 
38
172
  Better deprecation warnings to help fix https://github.com/cucumber/cucumber-ruby/issues/942
39
173
 
40
- ## [v2.3.0](https://github.com/cucumber/cucumber-ruby/compare/v2.2.0...v2.3.0)
174
+ ## [2.3.0](https://github.com/cucumber/cucumber-ruby/compare/v2.2.0...v2.3.0)
41
175
 
42
176
  ### New Features
43
177
 
@@ -47,7 +181,7 @@ Better deprecation warnings to help fix https://github.com/cucumber/cucumber-rub
47
181
 
48
182
  ### Refactoring
49
183
 
50
- ## [v2.2.0](https://github.com/cucumber/cucumber-ruby/compare/v2.1.0...v2.2.0)
184
+ ## [2.2.0](https://github.com/cucumber/cucumber-ruby/compare/v2.1.0...v2.2.0)
51
185
 
52
186
  Although this release is only bugfixes and refactorings, the extraction of the wire protocol is quite a significant change and
53
187
  could cause breaking changes for users of undocumented APIs. Hence the minor version bump.
@@ -64,7 +198,7 @@ could cause breaking changes for users of undocumented APIs. Hence the minor ver
64
198
  * Remove wire protocol to plugin ([#878](https://github.com/cucumber/cucumber-ruby/pull/878) @mattwynne @tooky)
65
199
  * Remove event bus to separate gem ([#933](https://github.com/cucumber/cucumber-ruby/pull/933) @dg-ratiodata)
66
200
 
67
- ## [v2.1.0](https://github.com/cucumber/cucumber-ruby/compare/v2.0.2...v2.1.0)
201
+ ## [2.1.0](https://github.com/cucumber/cucumber-ruby/compare/v2.0.2...v2.1.0)
68
202
 
69
203
  ### New Features
70
204
 
@@ -84,14 +218,14 @@ could cause breaking changes for users of undocumented APIs. Hence the minor ver
84
218
  * Move behaviour from `Cucumber::Cli::Configuration` to `Cucumber::Configuration` (@tooky, @mattwynne)
85
219
  * Integrate Gherkin3 parser ([884](https://github.com/cucumber/cucumber-ruby/pull/884) (@brasmusson)
86
220
 
87
- ## [v2.0.2](https://github.com/cucumber/cucumber-ruby/compare/v2.0.1...v2.0.2)
221
+ ## [2.0.2](https://github.com/cucumber/cucumber-ruby/compare/v2.0.1...v2.0.2)
88
222
 
89
223
  ### Bugfixes
90
224
 
91
225
  * Revert interface change in Cucumber::Formatter::Console (which can break custom formatters in v2.0.1) ([893](https://github.com/cucumber/cucumber-ruby/issues/893) @brasmusson).
92
226
  * Calculate the locations of hooks properly (so it also work between drives on Windows) ([885](https://github.com/cucumber/cucumber-ruby/issues/885) @brasmusson).
93
227
 
94
- ## [v2.0.1](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0...v2.0.1)
228
+ ## [2.0.1](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0...v2.0.1)
95
229
 
96
230
  ### New Features
97
231
 
@@ -118,7 +252,7 @@ could cause breaking changes for users of undocumented APIs. Hence the minor ver
118
252
  * Rewrite the JUnit Formatter to the new formatter API ([855](https://github.com/cucumber/cucumber-ruby/pull/855) @brasmusson)
119
253
  * Rewrite the Progress, Usage, Stepdefs formatters to the new formatter API ([859](https://github.com/cucumber/cucumber-ruby/pull/859) @brasmusson)
120
254
 
121
- ## [v2.0.0](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0.rc.5...v2.0.0)
255
+ ## [2.0.0](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0.rc.5...v2.0.0)
122
256
 
123
257
  ### New Features
124
258
 
@@ -130,7 +264,7 @@ could cause breaking changes for users of undocumented APIs. Hence the minor ver
130
264
  * Ensure After Hooks execute in reverse order (@tooky)
131
265
  * Make console output with embedded cr/lf look correct. ([820](https://github.com/cucumber/cucumber-ruby/pull/820) @SteveDonie)
132
266
 
133
- ## [v2.0.0.rc5](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0.rc.4...v2.0.0.rc.5)
267
+ ## [2.0.0.rc5](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0.rc.4...v2.0.0.rc.5)
134
268
 
135
269
  ### New Features
136
270
 
@@ -147,7 +281,7 @@ could cause breaking changes for users of undocumented APIs. Hence the minor ver
147
281
  * JUnit expand option ([808](https://github.com/cucumber/cucumber-ruby/pull/808) @richarda @brasmusson)
148
282
  * Around hooks not executing in correct world context ([807](https://github.com/cucumber/cucumber-ruby/pull/807) @tooky)
149
283
 
150
- ## [v2.0.0.rc.4](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0.rc.3...2.0.0.rc.4)
284
+ ## [2.0.0.rc.4](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0.rc.3...2.0.0.rc.4)
151
285
 
152
286
  ### Features
153
287
 
@@ -161,19 +295,19 @@ could cause breaking changes for users of undocumented APIs. Hence the minor ver
161
295
  * Sort scenarios by location ([789](https://github.com/cucumber/cucumber-ruby/issues/789) @mattwynne)
162
296
  * Remove keyword from name property of test case object yielded to hooks ([768](https://github.com/cucumber/cucumber-ruby/issues/768) @richarda, @akostadinov)
163
297
 
164
- ## [v2.0.0.rc.3](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0.rc.2...v2.0.0.rc.3)
298
+ ## [2.0.0.rc.3](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0.rc.2...v2.0.0.rc.3)
165
299
 
166
300
  ### Bugfixes
167
301
 
168
302
  * MultilineArgument::DataTable#diff will correctly compare to an Array (@tooky)
169
303
 
170
- ## [v2.0.0.rc.2](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0.rc.1...v2.0.0.rc.2)
304
+ ## [2.0.0.rc.2](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0.rc.1...v2.0.0.rc.2)
171
305
 
172
306
  ### Bugfixes
173
307
 
174
308
  * World#table no longer creates invalid table objects when using an Array (@tooky, @mattwynne)
175
309
 
176
- ## [v2.0.0.rc.1](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0.beta.5...v2.0.0.rc.1)
310
+ ## [2.0.0.rc.1](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0.beta.5...v2.0.0.rc.1)
177
311
 
178
312
  ### Removed Features
179
313
 
@@ -192,11 +326,11 @@ could cause breaking changes for users of undocumented APIs. Hence the minor ver
192
326
  * Using file:line CLI to select scenarios was running same scenario multiple times ([786](https://github.com/cucumber/cucumber-ruby/pull/786) @jdks)
193
327
  * Allow spaces in filenames for rerun formatter ([793](https://github.com/cucumber/cucumber-ruby/pull/793) @callahat)
194
328
 
195
- ## [v2.0.0.beta.5](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0.beta.4...v2.0.0.beta.5)
329
+ ## [2.0.0.beta.5](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0.beta.4...v2.0.0.beta.5)
196
330
 
197
331
  * Depend on the correct version of core (@tooky)
198
332
 
199
- ## [v2.0.0.beta.4](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0.beta.3...v2.0.0.beta.4)
333
+ ## [2.0.0.beta.4](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0.beta.3...v2.0.0.beta.4)
200
334
  ### New Features
201
335
 
202
336
  * Support both new and legacy formatter APIs simultaneously (@mattwynne and @tooky)
@@ -211,7 +345,7 @@ could cause breaking changes for users of undocumented APIs. Hence the minor ver
211
345
 
212
346
  * Re-write rerun formatter against new formatter API
213
347
 
214
- ## [v2.0.0.beta.3](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0.beta.2...v2.0.0.beta.3)
348
+ ## [2.0.0.beta.3](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0.beta.2...v2.0.0.beta.3)
215
349
 
216
350
  ### Removed Features
217
351
 
@@ -231,14 +365,14 @@ could cause breaking changes for users of undocumented APIs. Hence the minor ver
231
365
  * Add back support for the DataTable API ([729](https://github.com/cucumber/cucumber-ruby/pull/729) @mattwynne and @tooky)
232
366
  * Fix Windows support loading files properly ([739](https://github.com/cucumber/cucumber-ruby/issues/739) @os97673)
233
367
 
234
- ## [v2.0.0.beta.2](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0.beta.1...v2.0.0.beta.2)
368
+ ## [2.0.0.beta.2](https://github.com/cucumber/cucumber-ruby/compare/v2.0.0.beta.1...v2.0.0.beta.2)
235
369
 
236
370
  ### Bugfixes
237
371
 
238
372
  * Better reporting of exceptions in Before / After hooks ([723](https://github.com/cucumber/cucumber-ruby/pull/723) @mattwynne)
239
373
  * Add `#source_tag_names` method to `TestCase` object passed to hooks (@mattwynne)
240
374
 
241
- ## [v2.0.0.beta.1 ](https://github.com/cucumber/cucumber-ruby/compare/v1.3.8...v2.0.0.beta.1)
375
+ ## [2.0.0.beta.1 ](https://github.com/cucumber/cucumber-ruby/compare/v1.3.8...v2.0.0.beta.1)
242
376
 
243
377
  Version 2.0 contains a major internal redesign, extracting the core logic of
244
378
  parsing and executing tests into a [separate gem](https://github.com/cucumber/cucumber-ruby-ruby-core).
@@ -273,49 +407,49 @@ all.
273
407
 
274
408
  * Greek examples added ([497](https://github.com/cucumber/cucumber-ruby/issues/497) @rousisk)
275
409
 
276
- ## [v1.3.16](https://github.com/cucumber/cucumber-ruby/compare/v1.3.15...v1.3.16)
410
+ ## [1.3.16](https://github.com/cucumber/cucumber-ruby/compare/v1.3.15...v1.3.16)
277
411
 
278
412
  * Pass output from the step definition on to the JSON formatter ([701](https://github.com/cucumber/cucumber-ruby/pull/701) @brasmusson)
279
413
  * Add RSpec 3 test double support ([689](https://github.com/cucumber/cucumber-ruby/pull/689) @cyphactor)
280
414
  * Fix bug with rerun formatter and `--expand` option ([710](https://github.com/cucumber/cucumber-ruby/pull/710) @brasmusson)
281
415
 
282
- ## [v1.3.15](https://github.com/cucumber/cucumber-ruby/compare/v1.3.14...v1.3.15)
416
+ ## [1.3.15](https://github.com/cucumber/cucumber-ruby/compare/v1.3.14...v1.3.15)
283
417
 
284
418
  * Fixed intermittent ConcurrencyError seen in JRuby
285
419
  ([671](https://github.com/cucumber/cucumber-ruby/issues/670) @cbusbey)
286
420
 
287
- ## [v1.3.14](https://github.com/cucumber/cucumber-ruby/compare/v1.3.13...v1.3.14)
421
+ ## [1.3.14](https://github.com/cucumber/cucumber-ruby/compare/v1.3.13...v1.3.14)
288
422
 
289
423
  * Rerun formatter includes all scenarios when the background fails
290
424
  ([660](https://github.com/cucumber/cucumber-ruby/issues/660),
291
425
  [661](https://github.com/cucumber/cucumber-ruby/pull/661) @brasmusson)
292
426
 
293
- ## [v1.3.13](https://github.com/cucumber/cucumber-ruby/compare/v1.3.12...v1.3.13)
427
+ ## [1.3.13](https://github.com/cucumber/cucumber-ruby/compare/v1.3.12...v1.3.13)
294
428
 
295
429
  * Rerun formatter includes all scenarios when the background fails
296
430
  ([654](https://github.com/cucumber/cucumber-ruby/pull/654) @brasmusson)
297
431
 
298
- ## [v1.3.12](https://github.com/cucumber/cucumber-ruby/compare/v1.3.11...v1.3.12)
432
+ ## [1.3.12](https://github.com/cucumber/cucumber-ruby/compare/v1.3.11...v1.3.12)
299
433
 
300
434
  * Use MultiTest to handle assertions library selection (@tooky)
301
435
  * Adds full support for rails 4.1 / Minitest
302
436
 
303
- ## [v1.3.11](https://github.com/cucumber/cucumber-ruby/compare/v1.3.10...v1.3.11)
437
+ ## [1.3.11](https://github.com/cucumber/cucumber-ruby/compare/v1.3.10...v1.3.11)
304
438
 
305
439
  * Add Ruby 2.1 Support ([#644](https://github.com/cucumber/cucumber-ruby/pull/644) @tooky, @chrismdp)
306
440
 
307
- ## [v1.3.10](https://github.com/cucumber/cucumber-ruby/compare/v1.3.9...v1.3.10)
441
+ ## [1.3.10](https://github.com/cucumber/cucumber-ruby/compare/v1.3.9...v1.3.10)
308
442
 
309
443
  * Fixed "nil:NilClass (NoMethodError)" problem for auto-formatting ([599](https://github.com/cucumber/cucumber-ruby/pull/599) @jmcaffee)
310
444
 
311
- ## [v1.3.9](https://github.com/cucumber/cucumber-ruby/compare/v1.3.8...v1.3.9)
445
+ ## [1.3.9](https://github.com/cucumber/cucumber-ruby/compare/v1.3.8...v1.3.9)
312
446
 
313
447
  * Disable minitest autorun after loading support files (@tooky)
314
448
  * Add `Ast::Table#map_column` for non-mutating column mapping (@tooky)
315
449
  * Remove deprecation warnings on `Ast::Table` (@tooky)
316
450
  * Fixed ArgumentError for NoStepMatch#format_args ([587](https://github.com/cucumber/cucumber-ruby/pull/587) @jshraibman-mdsol)
317
451
 
318
- ## [v1.3.8](https://github.com/cucumber/cucumber-ruby/compare/v1.3.7...v1.3.8)
452
+ ## [1.3.8](https://github.com/cucumber/cucumber-ruby/compare/v1.3.7...v1.3.8)
319
453
 
320
454
  * Make the MultiJson dependency less restrictive (@tooky)
321
455
 
data/CONTRIBUTING.md CHANGED
@@ -17,7 +17,20 @@ The rest of this document is a guide for those maintaining Cucumber, and others
17
17
 
18
18
  ## Talking with other devs
19
19
 
20
- You can chat with the core team on https://gitter.im/cucumber/cucumber. We try to have office hours on Fridays.
20
+ You can chat with the core team on https://gitter.im/cucumber/contributors. We try to have office hours on Fridays.
21
+
22
+ ## Installing your own gems
23
+
24
+ A `Gemfile.local`-file can be used to have your own gems installed to support
25
+ your normal development workflow.
26
+
27
+ Example:
28
+
29
+ ~~~ruby
30
+ gem 'pry'
31
+ gem 'pry-byebug'
32
+ gem 'byebug'
33
+ ~~~
21
34
 
22
35
  ## Note on Patches/Pull Requests
23
36
 
@@ -37,6 +50,13 @@ You can chat with the core team on https://gitter.im/cucumber/cucumber. We try t
37
50
 
38
51
  To get code coverage results, run `bundle exec rake cov`
39
52
 
53
+ ## First timer? No problem!
54
+
55
+ If you are new to the project or to OSS, check the label
56
+ [Easy](https://github.com/cucumber/cucumber-ruby/labels/Easy). Also, you can
57
+ help us to correct style violations reported here:
58
+ [.rubocop_todo.yaml](https://github.com/cucumber/cucumber-ruby/blob/master/.rubocop_todo.yml).
59
+
40
60
  ## Release Process
41
61
 
42
62
  * Bump the version number in `lib/cucumber/platform.rb`.
data/Gemfile CHANGED
@@ -1,14 +1,27 @@
1
- gem "cucumber-pro", "0.0.13", :group => :test
2
- source "https://rubygems.org"
1
+ gem 'cucumber-pro', '0.0.13', :group => :test
2
+ source 'https://rubygems.org'
3
3
  gemspec
4
+ load File.expand_path('../Gemfile.local', __FILE__) if File.file? File.expand_path('../Gemfile.local', __FILE__)
5
+
4
6
  unless ENV['CUCUMBER_USE_RELEASED_CORE']
5
- core_path = File.expand_path("../../cucumber-ruby-core", __FILE__)
6
- wire_path = File.expand_path("../../cucumber-ruby-wire", __FILE__)
7
+ core_path = File.expand_path('../../cucumber-ruby-core', __FILE__)
8
+ wire_path = File.expand_path('../../cucumber-ruby-wire', __FILE__)
7
9
  if File.exist?(core_path) && !ENV['CUCUMBER_USE_GIT_CORE']
8
10
  gem 'cucumber-core', :path => core_path
11
+ else
12
+ gem 'cucumber-core', :git => 'https://github.com/cucumber/cucumber-ruby-core.git'
13
+ end
14
+
15
+ if File.exist?(wire_path) && !ENV['CUCUMBER_USE_GIT_WIRE']
9
16
  gem 'cucumber-wire', :path => wire_path
10
17
  else
11
- gem 'cucumber-core', :git => "https://github.com/cucumber/cucumber-ruby-core.git", :branch => 'v1.x-bugfix'
18
+ gem 'cucumber-wire', :git => 'https://github.com/cucumber/cucumber-ruby-wire.git'
19
+ end
20
+
21
+ if ENV['CUCUMBER_EXPRESSIONS']
22
+ gem 'cucumber-expressions', :path => ENV['CUCUMBER_EXPRESSIONS']
23
+ else
24
+ gem 'cucumber-expressions', :git => 'https://github.com/cucumber/cucumber-expressions-ruby.git'
12
25
  end
13
26
  end
14
27
 
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  [![Join the chat at https://gitter.im/cucumber/cucumber-ruby](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cucumber/cucumber-ruby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
2
- [![Build Status](https://secure.travis-ci.org/cucumber/cucumber-ruby.svg)](http://travis-ci.org/cucumber/cucumber-ruby)
2
+ [![Build Status](https://travis-ci.org/cucumber/cucumber-ruby.svg?branch=master)](https://travis-ci.org/cucumber/cucumber-ruby)
3
+ [![Windows Build Status](https://ci.appveyor.com/api/projects/status/ncqhcevrv93hhu5j?svg=true)](https://ci.appveyor.com/project/cucumberbdd/cucumber-ruby)
4
+
3
5
  [![Code Climate](https://codeclimate.com/github/cucumber/cucumber-ruby.svg)](https://codeclimate.com/github/cucumber/cucumber-ruby)
4
6
  [![Coverage Status](https://coveralls.io/repos/cucumber/cucumber-ruby/badge.svg?branch=master)](https://coveralls.io/r/cucumber/cucumber-ruby?branch=master)
5
7
  [![Dependency Status](https://gemnasium.com/cucumber/cucumber-ruby.svg)](https://gemnasium.com/cucumber/cucumber-ruby)
@@ -17,12 +19,19 @@ Where to get more info:
17
19
  * Documentation: https://github.com/cucumber/cucumber/wiki
18
20
  * Ruby API Documentation: http://www.rubydoc.info/github/cucumber/cucumber-ruby/
19
21
  * Support forum: https://groups.google.com/group/cukes
20
- * Developer chat: https://gitter.im/cucumber/cucumber-ruby
21
- * User chat: https://gitter.im/cucumber/chat
22
+ * Chat: ([Slack](https://cucumber.io/support#slack) and [Gitter](https://cucumber.io/support#gitter))
22
23
 
23
24
  See [CONTRIBUTING.md](CONTRIBUTING.md) for info on contributing to Cucumber.
24
25
 
25
- ## Code of Conduct
26
+ ## Supported platforms
27
+
28
+ * Ruby 2.4
29
+ * Ruby 2.3
30
+ * Ruby 2.2
31
+ * Ruby 2.1
32
+ * JRuby 9.1
33
+
34
+ ## Code of Conduct
26
35
 
27
36
  Everyone interacting in this codebase and issue tracker is expected to follow the Cucumber [code of conduct](https://github.com/cucumber/cucumber/blob/master/CODE_OF_CONDUCT.md).
28
37
 
data/Rakefile CHANGED
@@ -6,7 +6,15 @@ Bundler::GemHelper.install_tasks
6
6
  $:.unshift(File.dirname(__FILE__) + '/lib')
7
7
  Dir['gem_tasks/**/*.rake'].each { |rake| load rake }
8
8
 
9
- task :default => [:spec, :cucumber]
9
+ require 'rubocop/rake_task'
10
+ RuboCop::RakeTask.new
11
+
12
+ require 'cucumber/rake/task'
13
+ Cucumber::Rake::Task.new do |t|
14
+ t.profile = 'ruby' if Cucumber::RUBY
15
+ end
16
+
17
+ default_tasks = [:spec, :rubocop, :cucumber]
10
18
 
11
19
  if ENV['TRAVIS']
12
20
  ENV['SIMPLECOV'] = 'ci'
@@ -15,8 +23,10 @@ if ENV['TRAVIS']
15
23
  require 'coveralls/rake/task'
16
24
  Coveralls::RakeTask.new
17
25
 
18
- task :default => [:spec, :cucumber, 'coveralls:push']
26
+ default_tasks << 'coveralls:push'
19
27
  end
20
28
 
29
+ task :default => default_tasks
30
+
21
31
  require 'rake/clean'
22
32
  CLEAN.include %w(**/*.{log,pyc,rbc,tgz} doc)
data/appveyor.yml ADDED
@@ -0,0 +1,27 @@
1
+ version: '1.0.{build}'
2
+
3
+ environment:
4
+ matrix:
5
+ - RUBY_VERSION: 23
6
+ - RUBY_VERSION: 23-x64
7
+
8
+
9
+ install:
10
+ - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
11
+ - bundle install
12
+
13
+ build: off
14
+
15
+ before_test:
16
+ - ruby -v
17
+ - gem -v
18
+ - bundle -v
19
+
20
+ test_script:
21
+ - bundle exec rake
22
+
23
+ notifications:
24
+ - provider: Slack
25
+ incoming_webhook:
26
+ secure: Zj2V5eXlqH4jMNvdzMBmdLA+lr658qwlJO+o7yfvUc1TMRSLNQaId9rpVWX+FsEH6DsQxYr46BRWU0bymATBe7rf7KSkomCgsAdupvKYciI=
27
+
data/bin/cucumber CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
- $:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib')
2
+ file_name = File.dirname(__FILE__) + '/../lib'
3
+ $:.unshift(file_name) unless $:.include?(file_name)
3
4
 
4
5
  require 'simplecov_setup'
5
6
  require 'cucumber/rspec/disable_option_parser'