cuke_modeler 3.27.0 → 3.28.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +579 -572
- data/LICENSE.txt +22 -22
- data/README.md +135 -135
- data/cuke_modeler.gemspec +59 -59
- data/lib/cuke_modeler/adapters/gherkin_10_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_11_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_12_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_13_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_14_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_15_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_16_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_17_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_18_adapter.rb +27 -27
- data/lib/cuke_modeler/adapters/gherkin_19_adapter.rb +64 -64
- data/lib/cuke_modeler/adapters/gherkin_20_adapter.rb +359 -359
- data/lib/cuke_modeler/adapters/gherkin_21_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_22_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_23_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_24_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_25_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_26_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_27_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_28_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_29_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_30_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_31_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_32_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_33_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_34_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_35_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_36_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_37_adapter.rb +13 -13
- data/lib/cuke_modeler/adapters/gherkin_38_adapter.rb +13 -0
- data/lib/cuke_modeler/adapters/gherkin_9_adapter.rb +375 -375
- data/lib/cuke_modeler/adapters/gherkin_base_adapter.rb +17 -17
- data/lib/cuke_modeler/containing.rb +105 -105
- data/lib/cuke_modeler/described.rb +71 -71
- data/lib/cuke_modeler/models/background.rb +122 -122
- data/lib/cuke_modeler/models/cell.rb +88 -88
- data/lib/cuke_modeler/models/comment.rb +82 -82
- data/lib/cuke_modeler/models/directory.rb +143 -143
- data/lib/cuke_modeler/models/doc_string.rb +104 -104
- data/lib/cuke_modeler/models/example.rb +274 -274
- data/lib/cuke_modeler/models/feature.rb +200 -200
- data/lib/cuke_modeler/models/feature_file.rb +116 -116
- data/lib/cuke_modeler/models/model.rb +87 -87
- data/lib/cuke_modeler/models/outline.rb +145 -145
- data/lib/cuke_modeler/models/row.rb +104 -104
- data/lib/cuke_modeler/models/rule.rb +162 -162
- data/lib/cuke_modeler/models/scenario.rb +128 -128
- data/lib/cuke_modeler/models/step.rb +178 -178
- data/lib/cuke_modeler/models/table.rb +117 -117
- data/lib/cuke_modeler/models/tag.rb +75 -75
- data/lib/cuke_modeler/named.rb +26 -26
- data/lib/cuke_modeler/nested.rb +61 -61
- data/lib/cuke_modeler/parsed.rb +24 -24
- data/lib/cuke_modeler/parsing.rb +208 -208
- data/lib/cuke_modeler/sourceable.rb +29 -29
- data/lib/cuke_modeler/stepped.rb +34 -34
- data/lib/cuke_modeler/taggable.rb +57 -57
- data/lib/cuke_modeler/version.rb +4 -4
- data/lib/cuke_modeler.rb +32 -32
- data/testing/cucumber/features/analysis/step_comparison.feature +25 -25
- data/testing/cucumber/features/analysis/test_comparison.feature +35 -35
- data/testing/cucumber/features/modeling/background_modeling.feature +105 -105
- data/testing/cucumber/features/modeling/background_output.feature +60 -60
- data/testing/cucumber/features/modeling/cell_modeling.feature +68 -68
- data/testing/cucumber/features/modeling/cell_output.feature +36 -36
- data/testing/cucumber/features/modeling/comment_modeling.feature +62 -62
- data/testing/cucumber/features/modeling/comment_output.feature +40 -40
- data/testing/cucumber/features/modeling/directory_modeling.feature +62 -62
- data/testing/cucumber/features/modeling/directory_output.feature +33 -33
- data/testing/cucumber/features/modeling/doc_string_modeling.feature +85 -85
- data/testing/cucumber/features/modeling/doc_string_output.feature +50 -50
- data/testing/cucumber/features/modeling/example_modeling.feature +155 -155
- data/testing/cucumber/features/modeling/example_output.feature +57 -57
- data/testing/cucumber/features/modeling/feature_file_modeling.feature +49 -49
- data/testing/cucumber/features/modeling/feature_file_output.feature +33 -33
- data/testing/cucumber/features/modeling/feature_modeling.feature +149 -149
- data/testing/cucumber/features/modeling/feature_output.feature +144 -144
- data/testing/cucumber/features/modeling/model_output.feature +61 -61
- data/testing/cucumber/features/modeling/model_structure.feature +42 -42
- data/testing/cucumber/features/modeling/outline_modeling.feature +175 -175
- data/testing/cucumber/features/modeling/outline_output.feature +87 -87
- data/testing/cucumber/features/modeling/row_modeling.feature +70 -70
- data/testing/cucumber/features/modeling/row_output.feature +40 -40
- data/testing/cucumber/features/modeling/rule_modeling.feature +171 -171
- data/testing/cucumber/features/modeling/rule_output.feature +136 -136
- data/testing/cucumber/features/modeling/scenario_modeling.feature +146 -146
- data/testing/cucumber/features/modeling/scenario_output.feature +63 -63
- data/testing/cucumber/features/modeling/step_modeling.feature +105 -105
- data/testing/cucumber/features/modeling/step_output.feature +47 -47
- data/testing/cucumber/features/modeling/table_modeling.feature +73 -73
- data/testing/cucumber/features/modeling/table_output.feature +42 -42
- data/testing/cucumber/features/modeling/tag_modeling.feature +62 -62
- data/testing/cucumber/features/modeling/tag_output.feature +40 -40
- metadata +6 -8
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
require_relative 'gherkin_9_adapter'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
module CukeModeler
|
|
5
|
-
|
|
6
|
-
# @api private
|
|
7
|
-
#
|
|
8
|
-
# An adapter that can convert the output of version 17.x of the *cucumber-gherkin* gem into input that is consumable
|
|
9
|
-
# by this gem. Internal helper class.
|
|
10
|
-
class Gherkin17Adapter < Gherkin9Adapter; end
|
|
11
|
-
|
|
12
|
-
private_constant :Gherkin17Adapter
|
|
13
|
-
end
|
|
1
|
+
require_relative 'gherkin_9_adapter'
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
module CukeModeler
|
|
5
|
+
|
|
6
|
+
# @api private
|
|
7
|
+
#
|
|
8
|
+
# An adapter that can convert the output of version 17.x of the *cucumber-gherkin* gem into input that is consumable
|
|
9
|
+
# by this gem. Internal helper class.
|
|
10
|
+
class Gherkin17Adapter < Gherkin9Adapter; end
|
|
11
|
+
|
|
12
|
+
private_constant :Gherkin17Adapter
|
|
13
|
+
end
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
require_relative 'gherkin_9_adapter'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
module CukeModeler
|
|
5
|
-
|
|
6
|
-
# @api private
|
|
7
|
-
#
|
|
8
|
-
# An adapter that can convert the output of version 18.x of the *cucumber-gherkin* gem into input that is consumable
|
|
9
|
-
# by this gem. Internal helper class.
|
|
10
|
-
class Gherkin18Adapter < Gherkin9Adapter
|
|
11
|
-
|
|
12
|
-
# Adapts the AST sub-tree that is rooted at the given rule node.
|
|
13
|
-
def adapt_rule(rule_ast)
|
|
14
|
-
adapted_rule = super
|
|
15
|
-
|
|
16
|
-
clear_child_elements(adapted_rule, [[:rule, :tags]])
|
|
17
|
-
|
|
18
|
-
# Tagging of Rules was added in Gherkin 18
|
|
19
|
-
adapted_rule['tags'] = adapt_tags(rule_ast[:rule])
|
|
20
|
-
|
|
21
|
-
adapted_rule
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
private_constant :Gherkin18Adapter
|
|
27
|
-
end
|
|
1
|
+
require_relative 'gherkin_9_adapter'
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
module CukeModeler
|
|
5
|
+
|
|
6
|
+
# @api private
|
|
7
|
+
#
|
|
8
|
+
# An adapter that can convert the output of version 18.x of the *cucumber-gherkin* gem into input that is consumable
|
|
9
|
+
# by this gem. Internal helper class.
|
|
10
|
+
class Gherkin18Adapter < Gherkin9Adapter
|
|
11
|
+
|
|
12
|
+
# Adapts the AST sub-tree that is rooted at the given rule node.
|
|
13
|
+
def adapt_rule(rule_ast)
|
|
14
|
+
adapted_rule = super
|
|
15
|
+
|
|
16
|
+
clear_child_elements(adapted_rule, [[:rule, :tags]])
|
|
17
|
+
|
|
18
|
+
# Tagging of Rules was added in Gherkin 18
|
|
19
|
+
adapted_rule['tags'] = adapt_tags(rule_ast[:rule])
|
|
20
|
+
|
|
21
|
+
adapted_rule
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
private_constant :Gherkin18Adapter
|
|
27
|
+
end
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
require_relative 'gherkin_18_adapter'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
module CukeModeler
|
|
5
|
-
|
|
6
|
-
# @api private
|
|
7
|
-
#
|
|
8
|
-
# An adapter that can convert the output of version 19.x of the *cucumber-gherkin* gem into input that is consumable
|
|
9
|
-
# by this gem. Internal helper class.
|
|
10
|
-
class Gherkin19Adapter < Gherkin18Adapter
|
|
11
|
-
|
|
12
|
-
# Adapts the AST sub-tree that is rooted at the given step node.
|
|
13
|
-
def adapt_step(step_ast)
|
|
14
|
-
adapted_step = super
|
|
15
|
-
|
|
16
|
-
clear_child_elements(adapted_step, [[:dataTable],
|
|
17
|
-
[:docString]])
|
|
18
|
-
|
|
19
|
-
if step_ast[:docString]
|
|
20
|
-
adapted_step['doc_string'] = adapt_doc_string(step_ast[:docString])
|
|
21
|
-
elsif step_ast[:dataTable]
|
|
22
|
-
adapted_step['table'] = adapt_step_table(step_ast[:dataTable])
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
adapted_step
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
# Adapts the AST sub-tree that is rooted at the given doc string node.
|
|
29
|
-
def adapt_doc_string(doc_string_ast)
|
|
30
|
-
adapted_doc_string = super
|
|
31
|
-
|
|
32
|
-
adapted_doc_string['content_type'] = doc_string_ast[:mediaType]
|
|
33
|
-
|
|
34
|
-
adapted_doc_string
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
# Adapts the AST sub-tree that is rooted at the given example node.
|
|
38
|
-
def adapt_example(example_ast)
|
|
39
|
-
adapted_example = super
|
|
40
|
-
|
|
41
|
-
clear_child_elements(adapted_example, [[:tableHeader],
|
|
42
|
-
[:tableBody]])
|
|
43
|
-
|
|
44
|
-
adapted_example['rows'] << adapt_table_row(example_ast[:tableHeader]) if example_ast[:tableHeader]
|
|
45
|
-
|
|
46
|
-
example_ast[:tableBody].each do |row|
|
|
47
|
-
adapted_example['rows'] << adapt_table_row(row)
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
adapted_example
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
private
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
def test_has_examples?(ast_node)
|
|
58
|
-
ast_node[:scenario][:examples].any?
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
private_constant :Gherkin19Adapter
|
|
64
|
-
end
|
|
1
|
+
require_relative 'gherkin_18_adapter'
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
module CukeModeler
|
|
5
|
+
|
|
6
|
+
# @api private
|
|
7
|
+
#
|
|
8
|
+
# An adapter that can convert the output of version 19.x of the *cucumber-gherkin* gem into input that is consumable
|
|
9
|
+
# by this gem. Internal helper class.
|
|
10
|
+
class Gherkin19Adapter < Gherkin18Adapter
|
|
11
|
+
|
|
12
|
+
# Adapts the AST sub-tree that is rooted at the given step node.
|
|
13
|
+
def adapt_step(step_ast)
|
|
14
|
+
adapted_step = super
|
|
15
|
+
|
|
16
|
+
clear_child_elements(adapted_step, [[:dataTable],
|
|
17
|
+
[:docString]])
|
|
18
|
+
|
|
19
|
+
if step_ast[:docString]
|
|
20
|
+
adapted_step['doc_string'] = adapt_doc_string(step_ast[:docString])
|
|
21
|
+
elsif step_ast[:dataTable]
|
|
22
|
+
adapted_step['table'] = adapt_step_table(step_ast[:dataTable])
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
adapted_step
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Adapts the AST sub-tree that is rooted at the given doc string node.
|
|
29
|
+
def adapt_doc_string(doc_string_ast)
|
|
30
|
+
adapted_doc_string = super
|
|
31
|
+
|
|
32
|
+
adapted_doc_string['content_type'] = doc_string_ast[:mediaType]
|
|
33
|
+
|
|
34
|
+
adapted_doc_string
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Adapts the AST sub-tree that is rooted at the given example node.
|
|
38
|
+
def adapt_example(example_ast)
|
|
39
|
+
adapted_example = super
|
|
40
|
+
|
|
41
|
+
clear_child_elements(adapted_example, [[:tableHeader],
|
|
42
|
+
[:tableBody]])
|
|
43
|
+
|
|
44
|
+
adapted_example['rows'] << adapt_table_row(example_ast[:tableHeader]) if example_ast[:tableHeader]
|
|
45
|
+
|
|
46
|
+
example_ast[:tableBody].each do |row|
|
|
47
|
+
adapted_example['rows'] << adapt_table_row(row)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
adapted_example
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
private
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def test_has_examples?(ast_node)
|
|
58
|
+
ast_node[:scenario][:examples].any?
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
private_constant :Gherkin19Adapter
|
|
64
|
+
end
|