gherkin 4.0.0 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rsync +5 -0
- data/.travis.yml +16 -1
- data/Makefile +31 -36
- data/berp/CommandLine.dll +0 -0
- data/berp/RazorEngine.dll +0 -0
- data/berp/RazorEngine.pdb +0 -0
- data/berp/System.Web.Razor.dll +0 -0
- data/berp/berp.exe +0 -0
- data/berp/berp.pdb +0 -0
- data/bin/gherkin +34 -0
- data/bin/gherkin-generate-tokens +1 -1
- data/gherkin-languages.json +3191 -0
- data/gherkin.berp +46 -0
- data/gherkin.gemspec +6 -6
- data/lib/gherkin/gherkin-languages.json +225 -3
- data/lib/gherkin/pickles/compiler.rb +31 -31
- data/lib/gherkin/stream/gherkin_events.rb +69 -0
- data/lib/gherkin/stream/source_events.rb +26 -0
- data/lib/gherkin/token_scanner.rb +1 -1
- data/testdata/bad/inconsistent_cell_count.feature +14 -0
- data/testdata/bad/inconsistent_cell_count.feature.errors.ndjson +2 -0
- data/testdata/bad/invalid_language.feature +6 -0
- data/testdata/bad/invalid_language.feature.errors.ndjson +1 -0
- data/testdata/bad/multiple_parser_errors.feature +9 -0
- data/testdata/bad/multiple_parser_errors.feature.errors.ndjson +2 -0
- data/testdata/bad/not_gherkin.feature +2 -0
- data/testdata/bad/not_gherkin.feature.errors.ndjson +1 -0
- data/testdata/bad/single_parser_error.feature +7 -0
- data/testdata/bad/single_parser_error.feature.errors.ndjson +1 -0
- data/testdata/bad/unexpected_eof.feature +6 -0
- data/testdata/bad/unexpected_eof.feature.errors.ndjson +1 -0
- data/testdata/good/background.feature +8 -0
- data/testdata/good/background.feature.ast.ndjson +1 -0
- data/testdata/good/background.feature.pickles.ndjson +1 -0
- data/testdata/good/background.feature.source.ndjson +1 -0
- data/testdata/good/background.feature.tokens +9 -0
- data/testdata/good/datatables.feature +18 -0
- data/testdata/good/datatables.feature.ast.ndjson +1 -0
- data/testdata/good/datatables.feature.pickles.ndjson +1 -0
- data/testdata/good/datatables.feature.source.ndjson +1 -0
- data/testdata/good/datatables.feature.tokens +19 -0
- data/testdata/good/descriptions.feature +52 -0
- data/testdata/good/descriptions.feature.ast.ndjson +1 -0
- data/testdata/good/descriptions.feature.pickles.ndjson +8 -0
- data/testdata/good/descriptions.feature.source.ndjson +1 -0
- data/testdata/good/descriptions.feature.tokens +53 -0
- data/testdata/good/docstrings.feature +43 -0
- data/testdata/good/docstrings.feature.ast.ndjson +1 -0
- data/testdata/good/docstrings.feature.pickles.ndjson +1 -0
- data/testdata/good/docstrings.feature.source.ndjson +1 -0
- data/testdata/good/docstrings.feature.tokens +44 -0
- data/testdata/good/empty.feature +0 -0
- data/testdata/good/empty.feature.ast.ndjson +1 -0
- data/testdata/good/empty.feature.pickles.ndjson +0 -0
- data/testdata/good/empty.feature.source.ndjson +1 -0
- data/testdata/good/empty.feature.tokens +1 -0
- data/testdata/good/escaped_pipes.feature +11 -0
- data/testdata/good/escaped_pipes.feature.ast.ndjson +1 -0
- data/testdata/good/escaped_pipes.feature.pickles.ndjson +1 -0
- data/testdata/good/escaped_pipes.feature.source.ndjson +1 -0
- data/testdata/good/escaped_pipes.feature.tokens +14 -0
- data/testdata/good/example_token_multiple.feature +8 -0
- data/testdata/good/example_token_multiple.feature.ast.ndjson +1 -0
- data/testdata/good/example_token_multiple.feature.pickles.ndjson +1 -0
- data/testdata/good/example_token_multiple.feature.source.ndjson +1 -0
- data/testdata/good/example_token_multiple.feature.tokens +9 -0
- data/testdata/good/example_tokens_everywhere.feature +14 -0
- data/testdata/good/example_tokens_everywhere.feature.ast.ndjson +1 -0
- data/testdata/good/example_tokens_everywhere.feature.pickles.ndjson +2 -0
- data/testdata/good/example_tokens_everywhere.feature.source.ndjson +1 -0
- data/testdata/good/example_tokens_everywhere.feature.tokens +15 -0
- data/testdata/good/i18n_emoji.feature +5 -0
- data/testdata/good/i18n_emoji.feature.ast.ndjson +1 -0
- data/testdata/good/i18n_emoji.feature.pickles.ndjson +1 -0
- data/testdata/good/i18n_emoji.feature.source.ndjson +1 -0
- data/testdata/good/i18n_emoji.feature.tokens +6 -0
- data/testdata/good/i18n_fr.feature +63 -0
- data/testdata/good/i18n_fr.feature.ast.ndjson +1 -0
- data/testdata/good/i18n_fr.feature.pickles.ndjson +11 -0
- data/testdata/good/i18n_fr.feature.source.ndjson +1 -0
- data/testdata/good/i18n_fr.feature.tokens +64 -0
- data/testdata/good/i18n_no.feature +7 -0
- data/testdata/good/i18n_no.feature.ast.ndjson +1 -0
- data/testdata/good/i18n_no.feature.pickles.ndjson +1 -0
- data/testdata/good/i18n_no.feature.source.ndjson +1 -0
- data/testdata/good/i18n_no.feature.tokens +8 -0
- data/testdata/good/incomplete_background_1.feature +6 -0
- data/testdata/good/incomplete_background_1.feature.ast.ndjson +1 -0
- data/testdata/good/incomplete_background_1.feature.pickles.ndjson +1 -0
- data/testdata/good/incomplete_background_1.feature.source.ndjson +1 -0
- data/testdata/good/incomplete_background_1.feature.tokens +7 -0
- data/testdata/good/incomplete_background_2.feature +7 -0
- data/testdata/good/incomplete_background_2.feature.ast.ndjson +1 -0
- data/testdata/good/incomplete_background_2.feature.pickles.ndjson +1 -0
- data/testdata/good/incomplete_background_2.feature.source.ndjson +1 -0
- data/testdata/good/incomplete_background_2.feature.tokens +8 -0
- data/testdata/good/incomplete_feature_1.feature +2 -0
- data/testdata/good/incomplete_feature_1.feature.ast.ndjson +1 -0
- data/testdata/good/incomplete_feature_1.feature.pickles.ndjson +0 -0
- data/testdata/good/incomplete_feature_1.feature.source.ndjson +1 -0
- data/testdata/good/incomplete_feature_1.feature.tokens +3 -0
- data/testdata/good/incomplete_feature_2.feature +1 -0
- data/testdata/good/incomplete_feature_2.feature.ast.ndjson +1 -0
- data/testdata/good/incomplete_feature_2.feature.pickles.ndjson +0 -0
- data/testdata/good/incomplete_feature_2.feature.source.ndjson +1 -0
- data/testdata/good/incomplete_feature_2.feature.tokens +2 -0
- data/testdata/good/incomplete_feature_3.feature +1 -0
- data/testdata/good/incomplete_feature_3.feature.ast.ndjson +1 -0
- data/testdata/good/incomplete_feature_3.feature.pickles.ndjson +0 -0
- data/testdata/good/incomplete_feature_3.feature.source.ndjson +1 -0
- data/testdata/good/incomplete_feature_3.feature.tokens +2 -0
- data/testdata/good/incomplete_scenario.feature +6 -0
- data/testdata/good/incomplete_scenario.feature.ast.ndjson +1 -0
- data/testdata/good/incomplete_scenario.feature.pickles.ndjson +0 -0
- data/testdata/good/incomplete_scenario.feature.source.ndjson +1 -0
- data/testdata/good/incomplete_scenario.feature.tokens +7 -0
- data/testdata/good/incomplete_scenario_outline.feature +24 -0
- data/testdata/good/incomplete_scenario_outline.feature.ast.ndjson +1 -0
- data/testdata/good/incomplete_scenario_outline.feature.pickles.ndjson +0 -0
- data/testdata/good/incomplete_scenario_outline.feature.source.ndjson +1 -0
- data/testdata/good/incomplete_scenario_outline.feature.tokens +25 -0
- data/testdata/good/language.feature +6 -0
- data/testdata/good/language.feature.ast.ndjson +1 -0
- data/testdata/good/language.feature.pickles.ndjson +1 -0
- data/testdata/good/language.feature.source.ndjson +1 -0
- data/testdata/good/language.feature.tokens +7 -0
- data/testdata/good/minimal.feature +4 -0
- data/testdata/good/minimal.feature.ast.ndjson +1 -0
- data/testdata/good/minimal.feature.pickles.ndjson +1 -0
- data/testdata/good/minimal.feature.source.ndjson +1 -0
- data/testdata/good/minimal.feature.tokens +5 -0
- data/testdata/good/readme_example.feature +18 -0
- data/testdata/good/readme_example.feature.ast.ndjson +1 -0
- data/testdata/good/readme_example.feature.pickles.ndjson +2 -0
- data/testdata/good/readme_example.feature.source.ndjson +1 -0
- data/testdata/good/readme_example.feature.tokens +19 -0
- data/testdata/good/scenario_outline.feature +8 -0
- data/testdata/good/scenario_outline.feature.ast.ndjson +1 -0
- data/testdata/good/scenario_outline.feature.pickles.ndjson +1 -0
- data/testdata/good/scenario_outline.feature.source.ndjson +1 -0
- data/testdata/good/scenario_outline.feature.tokens +9 -0
- data/testdata/good/scenario_outline_no_newline.feature +8 -0
- data/testdata/good/scenario_outline_no_newline.feature.ast.ndjson +1 -0
- data/testdata/good/scenario_outline_no_newline.feature.pickles.ndjson +1 -0
- data/testdata/good/scenario_outline_no_newline.feature.source.ndjson +1 -0
- data/testdata/good/scenario_outline_no_newline.feature.tokens +9 -0
- data/testdata/good/scenario_outlines_with_tags.feature +18 -0
- data/testdata/good/scenario_outlines_with_tags.feature.ast.ndjson +1 -0
- data/testdata/good/scenario_outlines_with_tags.feature.pickles.ndjson +2 -0
- data/testdata/good/scenario_outlines_with_tags.feature.source.ndjson +1 -0
- data/testdata/good/scenario_outlines_with_tags.feature.tokens +19 -0
- data/testdata/good/several_examples.feature +17 -0
- data/testdata/good/several_examples.feature.ast.ndjson +1 -0
- data/testdata/good/several_examples.feature.pickles.ndjson +2 -0
- data/testdata/good/several_examples.feature.source.ndjson +1 -0
- data/testdata/good/several_examples.feature.tokens +18 -0
- data/testdata/good/spaces_in_language.feature +2 -0
- data/testdata/good/spaces_in_language.feature.ast.ndjson +1 -0
- data/testdata/good/spaces_in_language.feature.pickles.ndjson +0 -0
- data/testdata/good/spaces_in_language.feature.source.ndjson +1 -0
- data/testdata/good/spaces_in_language.feature.tokens +3 -0
- data/testdata/good/tags.feature +25 -0
- data/testdata/good/tags.feature.ast.ndjson +1 -0
- data/testdata/good/tags.feature.pickles.ndjson +3 -0
- data/testdata/good/tags.feature.source.ndjson +1 -0
- data/testdata/good/tags.feature.tokens +26 -0
- metadata +176 -25
- data/bin/gherkin-generate-ast +0 -22
- data/bin/gherkin-generate-pickles +0 -26
data/bin/gherkin-generate-ast
DELETED
@@ -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']
|