aslakhellesoy-cucumber 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- metadata +14 -2
- data/History.txt +0 -4
- data/License.txt +0 -20
- data/Manifest.txt +0 -98
- data/README.txt +0 -42
- data/Rakefile +0 -4
- data/TODO.txt +0 -30
- data/bin/cucumber +0 -3
- data/config/hoe.rb +0 -69
- data/config/requirements.rb +0 -15
- data/examples/calculator/Rakefile +0 -6
- data/examples/calculator/features/addition.feature +0 -16
- data/examples/calculator/features/division.feature +0 -11
- data/examples/calculator/features/steps/calculator_steps.rb +0 -30
- data/examples/calculator/lib/calculator.rb +0 -16
- data/examples/calculator_ruby_features/Rakefile +0 -6
- data/examples/calculator_ruby_features/features/addition.rb +0 -23
- data/examples/calculator_ruby_features/features/steps/calculator_steps.rb +0 -43
- data/examples/java/README.textile +0 -22
- data/examples/java/Rakefile +0 -12
- data/examples/java/features/hello.feature +0 -11
- data/examples/java/features/steps/hello_steps.rb +0 -25
- data/examples/java/features/steps/tree_steps.rb +0 -14
- data/examples/java/features/tree.feature +0 -9
- data/examples/java/src/cucumber/demo/Hello.java +0 -15
- data/examples/norwegian_calculator/Rakefile +0 -6
- data/examples/norwegian_calculator/features/kalkulator_steps.rb +0 -31
- data/examples/norwegian_calculator/features/summering.feature +0 -13
- data/examples/watir/Rakefile +0 -6
- data/examples/watir/features/search.feature +0 -9
- data/examples/watir/features/steps/stories_steps.rb +0 -51
- data/gem_tasks/deployment.rake +0 -34
- data/gem_tasks/environment.rake +0 -7
- data/gem_tasks/fix_cr_lf.rake +0 -10
- data/gem_tasks/gemspec.rake +0 -6
- data/gem_tasks/rspec.rake +0 -21
- data/gem_tasks/treetop.rake +0 -27
- data/gem_tasks/website.rake +0 -17
- data/generators/cucumber/cucumber_generator.rb +0 -20
- data/generators/cucumber/templates/common_webrat.rb +0 -30
- data/generators/cucumber/templates/cucumber.rake +0 -7
- data/generators/cucumber/templates/env.rb +0 -6
- data/generators/feature/feature_generator.rb +0 -17
- data/generators/feature/templates/feature.erb +0 -27
- data/generators/feature/templates/steps.erb +0 -22
- data/lib/cucumber/cli.rb +0 -133
- data/lib/cucumber/core_ext/proc.rb +0 -43
- data/lib/cucumber/core_ext/string.rb +0 -17
- data/lib/cucumber/executor.rb +0 -79
- data/lib/cucumber/formatters/ansicolor.rb +0 -89
- data/lib/cucumber/formatters/html_formatter.rb +0 -272
- data/lib/cucumber/formatters/pretty_formatter.rb +0 -129
- data/lib/cucumber/formatters/progress_formatter.rb +0 -41
- data/lib/cucumber/formatters.rb +0 -1
- data/lib/cucumber/languages.yml +0 -31
- data/lib/cucumber/rails/rspec.rb +0 -12
- data/lib/cucumber/rails/world.rb +0 -71
- data/lib/cucumber/rake/task.rb +0 -75
- data/lib/cucumber/step_methods.rb +0 -41
- data/lib/cucumber/step_mother.rb +0 -38
- data/lib/cucumber/tree/feature.rb +0 -45
- data/lib/cucumber/tree/features.rb +0 -21
- data/lib/cucumber/tree/scenario.rb +0 -85
- data/lib/cucumber/tree/step.rb +0 -141
- data/lib/cucumber/tree/table.rb +0 -26
- data/lib/cucumber/tree/top_down_visitor.rb +0 -23
- data/lib/cucumber/tree.rb +0 -18
- data/lib/cucumber/treetop_parser/feature.treetop.erb +0 -102
- data/lib/cucumber/treetop_parser/feature_en.rb +0 -974
- data/lib/cucumber/treetop_parser/feature_fr.rb +0 -974
- data/lib/cucumber/treetop_parser/feature_no.rb +0 -974
- data/lib/cucumber/treetop_parser/feature_parser.rb +0 -32
- data/lib/cucumber/treetop_parser/feature_pt.rb +0 -974
- data/lib/cucumber/version.rb +0 -9
- data/lib/cucumber.rb +0 -32
- data/script/console +0 -10
- data/script/console.cmd +0 -1
- data/script/destroy +0 -14
- data/script/destroy.cmd +0 -1
- data/script/generate +0 -14
- data/script/generate.cmd +0 -1
- data/script/txt2html +0 -74
- data/script/txt2html.cmd +0 -1
- data/setup.rb +0 -1585
- data/spec/cucumber/core_ext/string_spec.rb +0 -20
- data/spec/cucumber/executor_spec.rb +0 -55
- data/spec/cucumber/formatters/ansicolor_spec.rb +0 -18
- data/spec/cucumber/formatters/features.html +0 -274
- data/spec/cucumber/formatters/html_formatter_spec.rb +0 -59
- data/spec/cucumber/sell_cucumbers.feature +0 -9
- data/spec/cucumber/treetop_parser/feature_parser_spec.rb +0 -40
- data/spec/cucumber/treetop_parser/spaces.feature +0 -10
- data/spec/spec.opts +0 -2
- data/spec/spec_helper.rb +0 -14
- data/website/index.html +0 -11
- data/website/index.txt +0 -39
- data/website/javascripts/rounded_corners_lite.inc.js +0 -285
- data/website/stylesheets/screen.css +0 -138
- data/website/template.html.erb +0 -48
@@ -1,102 +0,0 @@
|
|
1
|
-
module Cucumber
|
2
|
-
module TreetopParser
|
3
|
-
|
4
|
-
grammar Feature
|
5
|
-
rule root
|
6
|
-
header whitespace* scenarios {
|
7
|
-
def feature
|
8
|
-
f = Tree::Feature.new(header.text_value.strip)
|
9
|
-
scenarios.populate(f)
|
10
|
-
f
|
11
|
-
end
|
12
|
-
}
|
13
|
-
end
|
14
|
-
|
15
|
-
rule header
|
16
|
-
(!step_scenario .)*
|
17
|
-
end
|
18
|
-
|
19
|
-
rule scenarios
|
20
|
-
step_scenario more:(table / step_scenario)* {
|
21
|
-
def populate(feature)
|
22
|
-
step_scenario.populate(feature)
|
23
|
-
more.elements.each { |m| m.populate(feature) }
|
24
|
-
end
|
25
|
-
}
|
26
|
-
end
|
27
|
-
|
28
|
-
rule step_scenario
|
29
|
-
scenario_keyword ":" whitespace* name:(!newline .)* newline* blanks steps:step+ {
|
30
|
-
def populate(feature)
|
31
|
-
sc = feature.add_scenario(name.text_value.strip)
|
32
|
-
steps.elements.each{|s| s.populate(sc)}
|
33
|
-
Feature.last_scenario = sc
|
34
|
-
end
|
35
|
-
}
|
36
|
-
end
|
37
|
-
|
38
|
-
rule step
|
39
|
-
whitespace* step_keyword whitespace* name:(!newline .)* newline* blanks {
|
40
|
-
def populate(scenario)
|
41
|
-
line = input.line_of(interval.first)
|
42
|
-
scenario.add_step(step_keyword.text_value, name.text_value.strip, line)
|
43
|
-
end
|
44
|
-
}
|
45
|
-
end
|
46
|
-
|
47
|
-
rule step_keyword
|
48
|
-
'<%= words['given'] %>' / '<%= words['when'] %>' / '<%= words['then'] %>' / '<%= words['and'] %>'
|
49
|
-
end
|
50
|
-
|
51
|
-
rule scenario_keyword
|
52
|
-
'<%= words['scenario'] %>'
|
53
|
-
end
|
54
|
-
|
55
|
-
rule table
|
56
|
-
table_line more:(newline table_line)+ newline*
|
57
|
-
{
|
58
|
-
def populate(feature)
|
59
|
-
Feature.last_scenario.table_header = table_line.values
|
60
|
-
more.elements.each do |e|
|
61
|
-
feature.add_row_scenario(Feature.last_scenario, e.table_line.values, e.table_line.line)
|
62
|
-
end
|
63
|
-
end
|
64
|
-
}
|
65
|
-
end
|
66
|
-
|
67
|
-
rule table_line
|
68
|
-
whitespace* separator cells:(whitespace* cell_value whitespace* separator)+
|
69
|
-
{
|
70
|
-
def values
|
71
|
-
cells.elements.map { |cell| cell.cell_value.text_value }
|
72
|
-
end
|
73
|
-
|
74
|
-
def line
|
75
|
-
input.line_of(interval.first)
|
76
|
-
end
|
77
|
-
}
|
78
|
-
end
|
79
|
-
|
80
|
-
rule cell_value
|
81
|
-
(!(separator / newline / whitespace) .)*
|
82
|
-
end
|
83
|
-
|
84
|
-
rule separator
|
85
|
-
'|'
|
86
|
-
end
|
87
|
-
|
88
|
-
rule blanks
|
89
|
-
(newline / whitespace)*
|
90
|
-
end
|
91
|
-
|
92
|
-
rule newline
|
93
|
-
"\r\n?" / "\n"
|
94
|
-
end
|
95
|
-
|
96
|
-
rule whitespace
|
97
|
-
[ \t]
|
98
|
-
end
|
99
|
-
end
|
100
|
-
|
101
|
-
end
|
102
|
-
end
|