aslakhellesoy-cucumber 0.3.92 → 0.3.93
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +20 -1
- data/Manifest.txt +6 -0
- data/cucumber.yml +2 -2
- data/examples/i18n/pt/features/adicao.feature +4 -4
- data/features/profiles.feature +99 -0
- data/features/step_definitions/cucumber_steps.rb +20 -0
- data/features/work_in_progress.feature +1 -0
- data/lib/cucumber/cli/configuration.rb +23 -267
- data/lib/cucumber/cli/drb_client.rb +3 -1
- data/lib/cucumber/cli/main.rb +5 -7
- data/lib/cucumber/cli/options.rb +361 -0
- data/lib/cucumber/cli/profile_loader.rb +65 -0
- data/lib/cucumber/formatter/console.rb +1 -1
- data/lib/cucumber/formatter/html.rb +1 -0
- data/lib/cucumber/parser/feature.rb +67 -67
- data/lib/cucumber/parser/feature.tt +28 -1
- data/lib/cucumber/parser/i18n/language.rb +4 -0
- data/lib/cucumber/parser/table.rb +25 -25
- data/lib/cucumber/version.rb +1 -1
- data/lib/cucumber/webrat/table_locator.rb +1 -1
- data/rails_generators/cucumber/cucumber_generator.rb +5 -1
- data/rails_generators/cucumber/templates/cucumber +3 -2
- data/rails_generators/cucumber/templates/cucumber_environment.rb +7 -4
- data/rails_generators/cucumber/templates/webrat_steps.rb +4 -0
- data/spec/cucumber/cli/configuration_spec.rb +132 -102
- data/spec/cucumber/cli/main_spec.rb +14 -4
- data/spec/cucumber/cli/options_spec.rb +306 -0
- data/spec/cucumber/cli/profile_loader_spec.rb +10 -0
- data/spec/cucumber/formatter/html_spec.rb +18 -0
- data/spec/cucumber/parser/table_parser_spec.rb +1 -1
- data/spec/spec.opts +3 -1
- metadata +8 -2
@@ -77,7 +77,7 @@ module Cucumber
|
|
77
77
|
@io.print dump_count(step_mother.steps.length, "step")
|
78
78
|
print_status_counts{|status| step_mother.steps(status)}
|
79
79
|
|
80
|
-
@io.puts(format_duration(features.duration)) if features
|
80
|
+
@io.puts(format_duration(features.duration)) if features && features.duration
|
81
81
|
|
82
82
|
@io.flush
|
83
83
|
end
|
@@ -59,7 +59,7 @@ module Cucumber
|
|
59
59
|
def has_all_tags?(tag_names)
|
60
60
|
tags.has_all_tags?(tag_names)
|
61
61
|
end
|
62
|
-
|
62
|
+
|
63
63
|
def build(filter)
|
64
64
|
if(filter.nil? || feature_elements.accept?(filter) || (!bg.empty? && filter.accept?(bg)))
|
65
65
|
background = bg.respond_to?(:build) ? bg.build : nil
|
@@ -115,7 +115,7 @@ module Cucumber
|
|
115
115
|
if r12
|
116
116
|
r9 = r12
|
117
117
|
else
|
118
|
-
|
118
|
+
@index = i9
|
119
119
|
r9 = nil
|
120
120
|
end
|
121
121
|
end
|
@@ -123,7 +123,7 @@ module Cucumber
|
|
123
123
|
if r9
|
124
124
|
r8 = nil
|
125
125
|
else
|
126
|
-
|
126
|
+
@index = i8
|
127
127
|
r8 = instantiate_node(SyntaxNode,input, index...index)
|
128
128
|
end
|
129
129
|
s7 << r8
|
@@ -141,7 +141,7 @@ module Cucumber
|
|
141
141
|
r7 = instantiate_node(SyntaxNode,input, i7...index, s7)
|
142
142
|
r7.extend(FeatureSub0)
|
143
143
|
else
|
144
|
-
|
144
|
+
@index = i7
|
145
145
|
r7 = nil
|
146
146
|
end
|
147
147
|
if r7
|
@@ -184,13 +184,13 @@ module Cucumber
|
|
184
184
|
r0.extend(FeatureSub1)
|
185
185
|
r0.extend(FeatureSub2)
|
186
186
|
else
|
187
|
-
|
187
|
+
@index = i0
|
188
188
|
r0 = nil
|
189
189
|
end
|
190
190
|
|
191
191
|
node_cache[:feature_sub][start_index] = r0
|
192
192
|
|
193
|
-
|
193
|
+
r0
|
194
194
|
end
|
195
195
|
|
196
196
|
module Tags0
|
@@ -215,14 +215,14 @@ module Cucumber
|
|
215
215
|
ts.elements.detect{|e| e.tag.line == line}
|
216
216
|
end
|
217
217
|
|
218
|
-
def has_all_tags?(tags)
|
219
|
-
(tags & tag_names) == tags
|
220
|
-
end
|
221
|
-
|
222
218
|
def has_tags?(tags)
|
223
219
|
(tag_names & tags).any?
|
224
220
|
end
|
225
221
|
|
222
|
+
def has_all_tags?(tags)
|
223
|
+
(tags & tag_names) == tags
|
224
|
+
end
|
225
|
+
|
226
226
|
def build
|
227
227
|
Ast::Tags.new(ts.line, tag_names)
|
228
228
|
end
|
@@ -261,7 +261,7 @@ module Cucumber
|
|
261
261
|
if r8
|
262
262
|
r6 = r8
|
263
263
|
else
|
264
|
-
|
264
|
+
@index = i6
|
265
265
|
r6 = nil
|
266
266
|
end
|
267
267
|
end
|
@@ -272,7 +272,7 @@ module Cucumber
|
|
272
272
|
end
|
273
273
|
end
|
274
274
|
if s5.empty?
|
275
|
-
|
275
|
+
@index = i5
|
276
276
|
r5 = nil
|
277
277
|
else
|
278
278
|
r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
|
@@ -283,7 +283,7 @@ module Cucumber
|
|
283
283
|
r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
|
284
284
|
r3.extend(Tags0)
|
285
285
|
else
|
286
|
-
|
286
|
+
@index = i3
|
287
287
|
r3 = nil
|
288
288
|
end
|
289
289
|
if r3
|
@@ -300,13 +300,13 @@ module Cucumber
|
|
300
300
|
r0.extend(Tags1)
|
301
301
|
r0.extend(Tags2)
|
302
302
|
else
|
303
|
-
|
303
|
+
@index = i0
|
304
304
|
r0 = nil
|
305
305
|
end
|
306
306
|
|
307
307
|
node_cache[:tags][start_index] = r0
|
308
308
|
|
309
|
-
|
309
|
+
r0
|
310
310
|
end
|
311
311
|
|
312
312
|
module Tag0
|
@@ -324,7 +324,7 @@ module Cucumber
|
|
324
324
|
end
|
325
325
|
|
326
326
|
i0, s0 = index, []
|
327
|
-
if
|
327
|
+
if has_terminal?('@', false, index)
|
328
328
|
r1 = instantiate_node(SyntaxNode,input, index...(index + 1))
|
329
329
|
@index += 1
|
330
330
|
else
|
@@ -335,7 +335,7 @@ module Cucumber
|
|
335
335
|
if r1
|
336
336
|
s2, i2 = [], index
|
337
337
|
loop do
|
338
|
-
if
|
338
|
+
if has_terminal?('\G[^@\\r\\n\\t ]', true, index)
|
339
339
|
r3 = instantiate_node(SyntaxNode,input, index...(index + 1))
|
340
340
|
@index += 1
|
341
341
|
else
|
@@ -348,7 +348,7 @@ module Cucumber
|
|
348
348
|
end
|
349
349
|
end
|
350
350
|
if s2.empty?
|
351
|
-
|
351
|
+
@index = i2
|
352
352
|
r2 = nil
|
353
353
|
else
|
354
354
|
r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
|
@@ -359,13 +359,13 @@ module Cucumber
|
|
359
359
|
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
360
360
|
r0.extend(Tag0)
|
361
361
|
else
|
362
|
-
|
362
|
+
@index = i0
|
363
363
|
r0 = nil
|
364
364
|
end
|
365
365
|
|
366
366
|
node_cache[:tag][start_index] = r0
|
367
367
|
|
368
|
-
|
368
|
+
r0
|
369
369
|
end
|
370
370
|
|
371
371
|
module Comment0
|
@@ -405,7 +405,7 @@ module Cucumber
|
|
405
405
|
r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
|
406
406
|
r1.extend(Comment0)
|
407
407
|
else
|
408
|
-
|
408
|
+
@index = i1
|
409
409
|
r1 = nil
|
410
410
|
end
|
411
411
|
if r1
|
@@ -419,7 +419,7 @@ module Cucumber
|
|
419
419
|
|
420
420
|
node_cache[:comment][start_index] = r0
|
421
421
|
|
422
|
-
|
422
|
+
r0
|
423
423
|
end
|
424
424
|
|
425
425
|
module CommentLine0
|
@@ -437,7 +437,7 @@ module Cucumber
|
|
437
437
|
end
|
438
438
|
|
439
439
|
i0, s0 = index, []
|
440
|
-
if
|
440
|
+
if has_terminal?('#', false, index)
|
441
441
|
r1 = instantiate_node(SyntaxNode,input, index...(index + 1))
|
442
442
|
@index += 1
|
443
443
|
else
|
@@ -453,13 +453,13 @@ module Cucumber
|
|
453
453
|
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
454
454
|
r0.extend(CommentLine0)
|
455
455
|
else
|
456
|
-
|
456
|
+
@index = i0
|
457
457
|
r0 = nil
|
458
458
|
end
|
459
459
|
|
460
460
|
node_cache[:comment_line][start_index] = r0
|
461
461
|
|
462
|
-
|
462
|
+
r0
|
463
463
|
end
|
464
464
|
|
465
465
|
module Background0
|
@@ -564,7 +564,7 @@ module Cucumber
|
|
564
564
|
end
|
565
565
|
end
|
566
566
|
if s9.empty?
|
567
|
-
|
567
|
+
@index = i9
|
568
568
|
r9 = nil
|
569
569
|
else
|
570
570
|
r9 = instantiate_node(SyntaxNode,input, i9...index, s9)
|
@@ -576,7 +576,7 @@ module Cucumber
|
|
576
576
|
if r11
|
577
577
|
r8 = r11
|
578
578
|
else
|
579
|
-
|
579
|
+
@index = i8
|
580
580
|
r8 = nil
|
581
581
|
end
|
582
582
|
end
|
@@ -595,13 +595,13 @@ module Cucumber
|
|
595
595
|
r0.extend(Background0)
|
596
596
|
r0.extend(Background1)
|
597
597
|
else
|
598
|
-
|
598
|
+
@index = i0
|
599
599
|
r0 = nil
|
600
600
|
end
|
601
601
|
|
602
602
|
node_cache[:background][start_index] = r0
|
603
603
|
|
604
|
-
|
604
|
+
r0
|
605
605
|
end
|
606
606
|
|
607
607
|
module FeatureElements0
|
@@ -637,7 +637,7 @@ module Cucumber
|
|
637
637
|
if r3
|
638
638
|
r1 = r3
|
639
639
|
else
|
640
|
-
|
640
|
+
@index = i1
|
641
641
|
r1 = nil
|
642
642
|
end
|
643
643
|
end
|
@@ -652,7 +652,7 @@ module Cucumber
|
|
652
652
|
|
653
653
|
node_cache[:feature_elements][start_index] = r0
|
654
654
|
|
655
|
-
|
655
|
+
r0
|
656
656
|
end
|
657
657
|
|
658
658
|
module Scenario0
|
@@ -780,13 +780,13 @@ module Cucumber
|
|
780
780
|
r0.extend(Scenario0)
|
781
781
|
r0.extend(Scenario1)
|
782
782
|
else
|
783
|
-
|
783
|
+
@index = i0
|
784
784
|
r0 = nil
|
785
785
|
end
|
786
786
|
|
787
787
|
node_cache[:scenario][start_index] = r0
|
788
788
|
|
789
|
-
|
789
|
+
r0
|
790
790
|
end
|
791
791
|
|
792
792
|
module ScenarioOutline0
|
@@ -932,13 +932,13 @@ module Cucumber
|
|
932
932
|
r0.extend(ScenarioOutline0)
|
933
933
|
r0.extend(ScenarioOutline1)
|
934
934
|
else
|
935
|
-
|
935
|
+
@index = i0
|
936
936
|
r0 = nil
|
937
937
|
end
|
938
938
|
|
939
939
|
node_cache[:scenario_outline][start_index] = r0
|
940
940
|
|
941
|
-
|
941
|
+
r0
|
942
942
|
end
|
943
943
|
|
944
944
|
module Steps0
|
@@ -973,7 +973,7 @@ module Cucumber
|
|
973
973
|
|
974
974
|
node_cache[:steps][start_index] = r0
|
975
975
|
|
976
|
-
|
976
|
+
r0
|
977
977
|
end
|
978
978
|
|
979
979
|
module Step0
|
@@ -1061,7 +1061,7 @@ module Cucumber
|
|
1061
1061
|
end
|
1062
1062
|
end
|
1063
1063
|
if s8.empty?
|
1064
|
-
|
1064
|
+
@index = i8
|
1065
1065
|
r8 = nil
|
1066
1066
|
else
|
1067
1067
|
r8 = instantiate_node(SyntaxNode,input, i8...index, s8)
|
@@ -1073,7 +1073,7 @@ module Cucumber
|
|
1073
1073
|
if r10
|
1074
1074
|
r7 = r10
|
1075
1075
|
else
|
1076
|
-
|
1076
|
+
@index = i7
|
1077
1077
|
r7 = nil
|
1078
1078
|
end
|
1079
1079
|
end
|
@@ -1101,13 +1101,13 @@ module Cucumber
|
|
1101
1101
|
r0.extend(Step0)
|
1102
1102
|
r0.extend(Step1)
|
1103
1103
|
else
|
1104
|
-
|
1104
|
+
@index = i0
|
1105
1105
|
r0 = nil
|
1106
1106
|
end
|
1107
1107
|
|
1108
1108
|
node_cache[:step][start_index] = r0
|
1109
1109
|
|
1110
|
-
|
1110
|
+
r0
|
1111
1111
|
end
|
1112
1112
|
|
1113
1113
|
module ExamplesSections0
|
@@ -1150,7 +1150,7 @@ module Cucumber
|
|
1150
1150
|
|
1151
1151
|
node_cache[:examples_sections][start_index] = r0
|
1152
1152
|
|
1153
|
-
|
1153
|
+
r0
|
1154
1154
|
end
|
1155
1155
|
|
1156
1156
|
module Examples0
|
@@ -1265,13 +1265,13 @@ module Cucumber
|
|
1265
1265
|
r0.extend(Examples0)
|
1266
1266
|
r0.extend(Examples1)
|
1267
1267
|
else
|
1268
|
-
|
1268
|
+
@index = i0
|
1269
1269
|
r0 = nil
|
1270
1270
|
end
|
1271
1271
|
|
1272
1272
|
node_cache[:examples][start_index] = r0
|
1273
1273
|
|
1274
|
-
|
1274
|
+
r0
|
1275
1275
|
end
|
1276
1276
|
|
1277
1277
|
def _nt_multiline_arg
|
@@ -1291,14 +1291,14 @@ module Cucumber
|
|
1291
1291
|
if r2
|
1292
1292
|
r0 = r2
|
1293
1293
|
else
|
1294
|
-
|
1294
|
+
@index = i0
|
1295
1295
|
r0 = nil
|
1296
1296
|
end
|
1297
1297
|
end
|
1298
1298
|
|
1299
1299
|
node_cache[:multiline_arg][start_index] = r0
|
1300
1300
|
|
1301
|
-
|
1301
|
+
r0
|
1302
1302
|
end
|
1303
1303
|
|
1304
1304
|
module LineToEol0
|
@@ -1320,7 +1320,7 @@ module Cucumber
|
|
1320
1320
|
if r3
|
1321
1321
|
r2 = nil
|
1322
1322
|
else
|
1323
|
-
|
1323
|
+
@index = i2
|
1324
1324
|
r2 = instantiate_node(SyntaxNode,input, index...index)
|
1325
1325
|
end
|
1326
1326
|
s1 << r2
|
@@ -1338,7 +1338,7 @@ module Cucumber
|
|
1338
1338
|
r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
|
1339
1339
|
r1.extend(LineToEol0)
|
1340
1340
|
else
|
1341
|
-
|
1341
|
+
@index = i1
|
1342
1342
|
r1 = nil
|
1343
1343
|
end
|
1344
1344
|
if r1
|
@@ -1351,7 +1351,7 @@ module Cucumber
|
|
1351
1351
|
|
1352
1352
|
node_cache[:line_to_eol][start_index] = r0
|
1353
1353
|
|
1354
|
-
|
1354
|
+
r0
|
1355
1355
|
end
|
1356
1356
|
|
1357
1357
|
module LinesToKeyword0
|
@@ -1409,13 +1409,13 @@ module Cucumber
|
|
1409
1409
|
r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
|
1410
1410
|
r3.extend(LinesToKeyword0)
|
1411
1411
|
else
|
1412
|
-
|
1412
|
+
@index = i3
|
1413
1413
|
r3 = nil
|
1414
1414
|
end
|
1415
1415
|
if r3
|
1416
1416
|
r2 = nil
|
1417
1417
|
else
|
1418
|
-
|
1418
|
+
@index = i2
|
1419
1419
|
r2 = instantiate_node(SyntaxNode,input, index...index)
|
1420
1420
|
end
|
1421
1421
|
s1 << r2
|
@@ -1433,7 +1433,7 @@ module Cucumber
|
|
1433
1433
|
r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
|
1434
1434
|
r1.extend(LinesToKeyword1)
|
1435
1435
|
else
|
1436
|
-
|
1436
|
+
@index = i1
|
1437
1437
|
r1 = nil
|
1438
1438
|
end
|
1439
1439
|
if r1
|
@@ -1447,7 +1447,7 @@ module Cucumber
|
|
1447
1447
|
|
1448
1448
|
node_cache[:lines_to_keyword][start_index] = r0
|
1449
1449
|
|
1450
|
-
|
1450
|
+
r0
|
1451
1451
|
end
|
1452
1452
|
|
1453
1453
|
module ReservedWordsAndSymbols0
|
@@ -1480,7 +1480,7 @@ module Cucumber
|
|
1480
1480
|
r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
|
1481
1481
|
r1.extend(ReservedWordsAndSymbols0)
|
1482
1482
|
else
|
1483
|
-
|
1483
|
+
@index = i1
|
1484
1484
|
r1 = nil
|
1485
1485
|
end
|
1486
1486
|
if r1
|
@@ -1506,7 +1506,7 @@ module Cucumber
|
|
1506
1506
|
if r8
|
1507
1507
|
r0 = r8
|
1508
1508
|
else
|
1509
|
-
|
1509
|
+
@index = i0
|
1510
1510
|
r0 = nil
|
1511
1511
|
end
|
1512
1512
|
end
|
@@ -1517,7 +1517,7 @@ module Cucumber
|
|
1517
1517
|
|
1518
1518
|
node_cache[:reserved_words_and_symbols][start_index] = r0
|
1519
1519
|
|
1520
|
-
|
1520
|
+
r0
|
1521
1521
|
end
|
1522
1522
|
|
1523
1523
|
module PyString0
|
@@ -1567,7 +1567,7 @@ module Cucumber
|
|
1567
1567
|
if r5
|
1568
1568
|
r4 = nil
|
1569
1569
|
else
|
1570
|
-
|
1570
|
+
@index = i4
|
1571
1571
|
r4 = instantiate_node(SyntaxNode,input, index...index)
|
1572
1572
|
end
|
1573
1573
|
s3 << r4
|
@@ -1585,7 +1585,7 @@ module Cucumber
|
|
1585
1585
|
r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
|
1586
1586
|
r3.extend(PyString0)
|
1587
1587
|
else
|
1588
|
-
|
1588
|
+
@index = i3
|
1589
1589
|
r3 = nil
|
1590
1590
|
end
|
1591
1591
|
if r3
|
@@ -1606,13 +1606,13 @@ module Cucumber
|
|
1606
1606
|
r0.extend(PyString1)
|
1607
1607
|
r0.extend(PyString2)
|
1608
1608
|
else
|
1609
|
-
|
1609
|
+
@index = i0
|
1610
1610
|
r0 = nil
|
1611
1611
|
end
|
1612
1612
|
|
1613
1613
|
node_cache[:py_string][start_index] = r0
|
1614
1614
|
|
1615
|
-
|
1615
|
+
r0
|
1616
1616
|
end
|
1617
1617
|
|
1618
1618
|
module OpenPyString0
|
@@ -1656,7 +1656,7 @@ module Cucumber
|
|
1656
1656
|
r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
|
1657
1657
|
s0 << r1
|
1658
1658
|
if r1
|
1659
|
-
if
|
1659
|
+
if has_terminal?('"""', false, index)
|
1660
1660
|
r3 = instantiate_node(SyntaxNode,input, index...(index + 3))
|
1661
1661
|
@index += 3
|
1662
1662
|
else
|
@@ -1687,13 +1687,13 @@ module Cucumber
|
|
1687
1687
|
r0.extend(OpenPyString0)
|
1688
1688
|
r0.extend(OpenPyString1)
|
1689
1689
|
else
|
1690
|
-
|
1690
|
+
@index = i0
|
1691
1691
|
r0 = nil
|
1692
1692
|
end
|
1693
1693
|
|
1694
1694
|
node_cache[:open_py_string][start_index] = r0
|
1695
1695
|
|
1696
|
-
|
1696
|
+
r0
|
1697
1697
|
end
|
1698
1698
|
|
1699
1699
|
module ClosePyString0
|
@@ -1740,7 +1740,7 @@ module Cucumber
|
|
1740
1740
|
r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
|
1741
1741
|
s0 << r2
|
1742
1742
|
if r2
|
1743
|
-
if
|
1743
|
+
if has_terminal?('"""', false, index)
|
1744
1744
|
r4 = instantiate_node(SyntaxNode,input, index...(index + 3))
|
1745
1745
|
@index += 3
|
1746
1746
|
else
|
@@ -1759,13 +1759,13 @@ module Cucumber
|
|
1759
1759
|
r0.extend(ClosePyString0)
|
1760
1760
|
r0.extend(ClosePyString1)
|
1761
1761
|
else
|
1762
|
-
|
1762
|
+
@index = i0
|
1763
1763
|
r0 = nil
|
1764
1764
|
end
|
1765
1765
|
|
1766
1766
|
node_cache[:close_py_string][start_index] = r0
|
1767
1767
|
|
1768
|
-
|
1768
|
+
r0
|
1769
1769
|
end
|
1770
1770
|
|
1771
1771
|
def _nt_white
|
@@ -1787,7 +1787,7 @@ module Cucumber
|
|
1787
1787
|
if r3
|
1788
1788
|
r1 = r3
|
1789
1789
|
else
|
1790
|
-
|
1790
|
+
@index = i1
|
1791
1791
|
r1 = nil
|
1792
1792
|
end
|
1793
1793
|
end
|
@@ -1801,7 +1801,7 @@ module Cucumber
|
|
1801
1801
|
|
1802
1802
|
node_cache[:white][start_index] = r0
|
1803
1803
|
|
1804
|
-
|
1804
|
+
r0
|
1805
1805
|
end
|
1806
1806
|
|
1807
1807
|
end
|