gherkin 4.0.0 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. data/.rsync +5 -0
  3. data/.travis.yml +16 -1
  4. data/Makefile +31 -36
  5. data/berp/CommandLine.dll +0 -0
  6. data/berp/RazorEngine.dll +0 -0
  7. data/berp/RazorEngine.pdb +0 -0
  8. data/berp/System.Web.Razor.dll +0 -0
  9. data/berp/berp.exe +0 -0
  10. data/berp/berp.pdb +0 -0
  11. data/bin/gherkin +34 -0
  12. data/bin/gherkin-generate-tokens +1 -1
  13. data/gherkin-languages.json +3191 -0
  14. data/gherkin.berp +46 -0
  15. data/gherkin.gemspec +6 -6
  16. data/lib/gherkin/gherkin-languages.json +225 -3
  17. data/lib/gherkin/pickles/compiler.rb +31 -31
  18. data/lib/gherkin/stream/gherkin_events.rb +69 -0
  19. data/lib/gherkin/stream/source_events.rb +26 -0
  20. data/lib/gherkin/token_scanner.rb +1 -1
  21. data/testdata/bad/inconsistent_cell_count.feature +14 -0
  22. data/testdata/bad/inconsistent_cell_count.feature.errors.ndjson +2 -0
  23. data/testdata/bad/invalid_language.feature +6 -0
  24. data/testdata/bad/invalid_language.feature.errors.ndjson +1 -0
  25. data/testdata/bad/multiple_parser_errors.feature +9 -0
  26. data/testdata/bad/multiple_parser_errors.feature.errors.ndjson +2 -0
  27. data/testdata/bad/not_gherkin.feature +2 -0
  28. data/testdata/bad/not_gherkin.feature.errors.ndjson +1 -0
  29. data/testdata/bad/single_parser_error.feature +7 -0
  30. data/testdata/bad/single_parser_error.feature.errors.ndjson +1 -0
  31. data/testdata/bad/unexpected_eof.feature +6 -0
  32. data/testdata/bad/unexpected_eof.feature.errors.ndjson +1 -0
  33. data/testdata/good/background.feature +8 -0
  34. data/testdata/good/background.feature.ast.ndjson +1 -0
  35. data/testdata/good/background.feature.pickles.ndjson +1 -0
  36. data/testdata/good/background.feature.source.ndjson +1 -0
  37. data/testdata/good/background.feature.tokens +9 -0
  38. data/testdata/good/datatables.feature +18 -0
  39. data/testdata/good/datatables.feature.ast.ndjson +1 -0
  40. data/testdata/good/datatables.feature.pickles.ndjson +1 -0
  41. data/testdata/good/datatables.feature.source.ndjson +1 -0
  42. data/testdata/good/datatables.feature.tokens +19 -0
  43. data/testdata/good/descriptions.feature +52 -0
  44. data/testdata/good/descriptions.feature.ast.ndjson +1 -0
  45. data/testdata/good/descriptions.feature.pickles.ndjson +8 -0
  46. data/testdata/good/descriptions.feature.source.ndjson +1 -0
  47. data/testdata/good/descriptions.feature.tokens +53 -0
  48. data/testdata/good/docstrings.feature +43 -0
  49. data/testdata/good/docstrings.feature.ast.ndjson +1 -0
  50. data/testdata/good/docstrings.feature.pickles.ndjson +1 -0
  51. data/testdata/good/docstrings.feature.source.ndjson +1 -0
  52. data/testdata/good/docstrings.feature.tokens +44 -0
  53. data/testdata/good/empty.feature +0 -0
  54. data/testdata/good/empty.feature.ast.ndjson +1 -0
  55. data/testdata/good/empty.feature.pickles.ndjson +0 -0
  56. data/testdata/good/empty.feature.source.ndjson +1 -0
  57. data/testdata/good/empty.feature.tokens +1 -0
  58. data/testdata/good/escaped_pipes.feature +11 -0
  59. data/testdata/good/escaped_pipes.feature.ast.ndjson +1 -0
  60. data/testdata/good/escaped_pipes.feature.pickles.ndjson +1 -0
  61. data/testdata/good/escaped_pipes.feature.source.ndjson +1 -0
  62. data/testdata/good/escaped_pipes.feature.tokens +14 -0
  63. data/testdata/good/example_token_multiple.feature +8 -0
  64. data/testdata/good/example_token_multiple.feature.ast.ndjson +1 -0
  65. data/testdata/good/example_token_multiple.feature.pickles.ndjson +1 -0
  66. data/testdata/good/example_token_multiple.feature.source.ndjson +1 -0
  67. data/testdata/good/example_token_multiple.feature.tokens +9 -0
  68. data/testdata/good/example_tokens_everywhere.feature +14 -0
  69. data/testdata/good/example_tokens_everywhere.feature.ast.ndjson +1 -0
  70. data/testdata/good/example_tokens_everywhere.feature.pickles.ndjson +2 -0
  71. data/testdata/good/example_tokens_everywhere.feature.source.ndjson +1 -0
  72. data/testdata/good/example_tokens_everywhere.feature.tokens +15 -0
  73. data/testdata/good/i18n_emoji.feature +5 -0
  74. data/testdata/good/i18n_emoji.feature.ast.ndjson +1 -0
  75. data/testdata/good/i18n_emoji.feature.pickles.ndjson +1 -0
  76. data/testdata/good/i18n_emoji.feature.source.ndjson +1 -0
  77. data/testdata/good/i18n_emoji.feature.tokens +6 -0
  78. data/testdata/good/i18n_fr.feature +63 -0
  79. data/testdata/good/i18n_fr.feature.ast.ndjson +1 -0
  80. data/testdata/good/i18n_fr.feature.pickles.ndjson +11 -0
  81. data/testdata/good/i18n_fr.feature.source.ndjson +1 -0
  82. data/testdata/good/i18n_fr.feature.tokens +64 -0
  83. data/testdata/good/i18n_no.feature +7 -0
  84. data/testdata/good/i18n_no.feature.ast.ndjson +1 -0
  85. data/testdata/good/i18n_no.feature.pickles.ndjson +1 -0
  86. data/testdata/good/i18n_no.feature.source.ndjson +1 -0
  87. data/testdata/good/i18n_no.feature.tokens +8 -0
  88. data/testdata/good/incomplete_background_1.feature +6 -0
  89. data/testdata/good/incomplete_background_1.feature.ast.ndjson +1 -0
  90. data/testdata/good/incomplete_background_1.feature.pickles.ndjson +1 -0
  91. data/testdata/good/incomplete_background_1.feature.source.ndjson +1 -0
  92. data/testdata/good/incomplete_background_1.feature.tokens +7 -0
  93. data/testdata/good/incomplete_background_2.feature +7 -0
  94. data/testdata/good/incomplete_background_2.feature.ast.ndjson +1 -0
  95. data/testdata/good/incomplete_background_2.feature.pickles.ndjson +1 -0
  96. data/testdata/good/incomplete_background_2.feature.source.ndjson +1 -0
  97. data/testdata/good/incomplete_background_2.feature.tokens +8 -0
  98. data/testdata/good/incomplete_feature_1.feature +2 -0
  99. data/testdata/good/incomplete_feature_1.feature.ast.ndjson +1 -0
  100. data/testdata/good/incomplete_feature_1.feature.pickles.ndjson +0 -0
  101. data/testdata/good/incomplete_feature_1.feature.source.ndjson +1 -0
  102. data/testdata/good/incomplete_feature_1.feature.tokens +3 -0
  103. data/testdata/good/incomplete_feature_2.feature +1 -0
  104. data/testdata/good/incomplete_feature_2.feature.ast.ndjson +1 -0
  105. data/testdata/good/incomplete_feature_2.feature.pickles.ndjson +0 -0
  106. data/testdata/good/incomplete_feature_2.feature.source.ndjson +1 -0
  107. data/testdata/good/incomplete_feature_2.feature.tokens +2 -0
  108. data/testdata/good/incomplete_feature_3.feature +1 -0
  109. data/testdata/good/incomplete_feature_3.feature.ast.ndjson +1 -0
  110. data/testdata/good/incomplete_feature_3.feature.pickles.ndjson +0 -0
  111. data/testdata/good/incomplete_feature_3.feature.source.ndjson +1 -0
  112. data/testdata/good/incomplete_feature_3.feature.tokens +2 -0
  113. data/testdata/good/incomplete_scenario.feature +6 -0
  114. data/testdata/good/incomplete_scenario.feature.ast.ndjson +1 -0
  115. data/testdata/good/incomplete_scenario.feature.pickles.ndjson +0 -0
  116. data/testdata/good/incomplete_scenario.feature.source.ndjson +1 -0
  117. data/testdata/good/incomplete_scenario.feature.tokens +7 -0
  118. data/testdata/good/incomplete_scenario_outline.feature +24 -0
  119. data/testdata/good/incomplete_scenario_outline.feature.ast.ndjson +1 -0
  120. data/testdata/good/incomplete_scenario_outline.feature.pickles.ndjson +0 -0
  121. data/testdata/good/incomplete_scenario_outline.feature.source.ndjson +1 -0
  122. data/testdata/good/incomplete_scenario_outline.feature.tokens +25 -0
  123. data/testdata/good/language.feature +6 -0
  124. data/testdata/good/language.feature.ast.ndjson +1 -0
  125. data/testdata/good/language.feature.pickles.ndjson +1 -0
  126. data/testdata/good/language.feature.source.ndjson +1 -0
  127. data/testdata/good/language.feature.tokens +7 -0
  128. data/testdata/good/minimal.feature +4 -0
  129. data/testdata/good/minimal.feature.ast.ndjson +1 -0
  130. data/testdata/good/minimal.feature.pickles.ndjson +1 -0
  131. data/testdata/good/minimal.feature.source.ndjson +1 -0
  132. data/testdata/good/minimal.feature.tokens +5 -0
  133. data/testdata/good/readme_example.feature +18 -0
  134. data/testdata/good/readme_example.feature.ast.ndjson +1 -0
  135. data/testdata/good/readme_example.feature.pickles.ndjson +2 -0
  136. data/testdata/good/readme_example.feature.source.ndjson +1 -0
  137. data/testdata/good/readme_example.feature.tokens +19 -0
  138. data/testdata/good/scenario_outline.feature +8 -0
  139. data/testdata/good/scenario_outline.feature.ast.ndjson +1 -0
  140. data/testdata/good/scenario_outline.feature.pickles.ndjson +1 -0
  141. data/testdata/good/scenario_outline.feature.source.ndjson +1 -0
  142. data/testdata/good/scenario_outline.feature.tokens +9 -0
  143. data/testdata/good/scenario_outline_no_newline.feature +8 -0
  144. data/testdata/good/scenario_outline_no_newline.feature.ast.ndjson +1 -0
  145. data/testdata/good/scenario_outline_no_newline.feature.pickles.ndjson +1 -0
  146. data/testdata/good/scenario_outline_no_newline.feature.source.ndjson +1 -0
  147. data/testdata/good/scenario_outline_no_newline.feature.tokens +9 -0
  148. data/testdata/good/scenario_outlines_with_tags.feature +18 -0
  149. data/testdata/good/scenario_outlines_with_tags.feature.ast.ndjson +1 -0
  150. data/testdata/good/scenario_outlines_with_tags.feature.pickles.ndjson +2 -0
  151. data/testdata/good/scenario_outlines_with_tags.feature.source.ndjson +1 -0
  152. data/testdata/good/scenario_outlines_with_tags.feature.tokens +19 -0
  153. data/testdata/good/several_examples.feature +17 -0
  154. data/testdata/good/several_examples.feature.ast.ndjson +1 -0
  155. data/testdata/good/several_examples.feature.pickles.ndjson +2 -0
  156. data/testdata/good/several_examples.feature.source.ndjson +1 -0
  157. data/testdata/good/several_examples.feature.tokens +18 -0
  158. data/testdata/good/spaces_in_language.feature +2 -0
  159. data/testdata/good/spaces_in_language.feature.ast.ndjson +1 -0
  160. data/testdata/good/spaces_in_language.feature.pickles.ndjson +0 -0
  161. data/testdata/good/spaces_in_language.feature.source.ndjson +1 -0
  162. data/testdata/good/spaces_in_language.feature.tokens +3 -0
  163. data/testdata/good/tags.feature +25 -0
  164. data/testdata/good/tags.feature.ast.ndjson +1 -0
  165. data/testdata/good/tags.feature.pickles.ndjson +3 -0
  166. data/testdata/good/tags.feature.source.ndjson +1 -0
  167. data/testdata/good/tags.feature.tokens +26 -0
  168. metadata +176 -25
  169. data/bin/gherkin-generate-ast +0 -22
  170. data/bin/gherkin-generate-pickles +0 -26
@@ -1,22 +0,0 @@
1
- #!/usr/bin/env ruby
2
- $VERBOSE=nil # Shut up JRuby warnings on Travis
3
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__),"../lib"))
4
- require 'gherkin/parser'
5
- require 'json'
6
-
7
- parser = Gherkin::Parser.new
8
- parser.stop_at_first_error = false
9
- files = ARGV.any? ? ARGV : (STDIN.tty? ? [] : [STDIN])
10
- start_time = Time.now
11
- files.each do |file|
12
- begin
13
- File.open(file, 'r:UTF-8') do |io|
14
- puts JSON.generate(parser.parse(io))
15
- end
16
- rescue Gherkin::ParserError => e
17
- STDERR.puts e.message
18
- exit 1
19
- end
20
- end
21
- end_time = Time.now
22
- STDERR.puts (end_time - start_time)*1000 if ENV['GHERKIN_PERF']
@@ -1,26 +0,0 @@
1
- #!/usr/bin/env ruby
2
- $VERBOSE=nil # Shut up JRuby warnings on Travis
3
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__),"../lib"))
4
- require 'gherkin/pickles/compiler'
5
- require 'gherkin/parser'
6
- require 'json'
7
-
8
- compiler = Gherkin::Pickles::Compiler.new
9
- parser = Gherkin::Parser.new
10
- parser.stop_at_first_error = false
11
- files = ARGV.any? ? ARGV : (STDIN.tty? ? [] : [STDIN])
12
- start_time = Time.now
13
- files.each do |file|
14
- begin
15
- File.open(file, 'r:UTF-8') do |io|
16
- feature = parser.parse(io)
17
- pickles = compiler.compile(feature, file);
18
- puts JSON.generate(pickles)
19
- end
20
- rescue Gherkin::ParserError => e
21
- STDERR.puts e.message
22
- exit 1
23
- end
24
- end
25
- end_time = Time.now
26
- STDERR.puts (end_time - start_time)*1000 if ENV['GHERKIN_PERF']