flatware 0.0.1 → 0.0.2
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.
- data/README.rdoc +1 -1
- data/lib/flatware/cli.rb +19 -5
- data/lib/flatware/cucumber/formatter.rb +10 -2
- metadata +13 -7
data/README.rdoc
CHANGED
@@ -56,7 +56,7 @@ You can also pass most cucumber options to flatware. For example, to run only fe
|
|
56
56
|
|
57
57
|
== Tinkering
|
58
58
|
|
59
|
-
Flatware is tested with aruba. In order to get a demo cucumber project you can add the `@no-clobber` tag to `features/flatware.feature` and run the test with `cucumber features/flatware.feature`. Now you should have a `./tmp/aruba` directory. CD there and
|
59
|
+
Flatware is tested with aruba. In order to get a demo cucumber project you can add the `@no-clobber` tag to `features/flatware.feature` and run the test with `cucumber features/flatware.feature`. Now you should have a `./tmp/aruba` directory. CD there and `flatware` will be in your path so you can tinker away.
|
60
60
|
|
61
61
|
== Resources
|
62
62
|
|
data/lib/flatware/cli.rb
CHANGED
@@ -14,17 +14,19 @@ module Flatware
|
|
14
14
|
|
15
15
|
default_task :default
|
16
16
|
worker_option
|
17
|
-
desc "default", "parallelizes cucumber with default arguments"
|
17
|
+
desc "default [FLATWARE_OPTS]", "parallelizes cucumber with default arguments"
|
18
18
|
def default
|
19
|
-
cucumber
|
19
|
+
invoke :cucumber
|
20
20
|
end
|
21
21
|
|
22
22
|
worker_option
|
23
|
-
desc "cucumber [CUCUMBER_ARGS]", "parallelizes cucumber with custom arguments"
|
23
|
+
desc "[FLATWARE_OPTS] cucumber [CUCUMBER_ARGS]", "parallelizes cucumber with custom arguments"
|
24
24
|
def cucumber(*)
|
25
25
|
Flatware.verbose = options[:log]
|
26
26
|
Worker.spawn workers
|
27
|
-
|
27
|
+
log "flatware options:", options
|
28
|
+
log "cucumber options:", cucumber_args
|
29
|
+
jobs = Cucumber.extract_jobs_from_args cucumber_args
|
28
30
|
fork do
|
29
31
|
log "dispatch"
|
30
32
|
$0 = 'flatware dispatcher'
|
@@ -55,11 +57,23 @@ module Flatware
|
|
55
57
|
|
56
58
|
desc "clear", "kills all flatware processes"
|
57
59
|
def clear
|
58
|
-
`ps -c -opid,command
|
60
|
+
`ps -c -opid,command`.split("\n").map do |row|
|
61
|
+
row =~ /(\d+).*flatware/ and $1.to_i
|
62
|
+
end.compact.each do |pid|
|
63
|
+
Process.kill 6, pid
|
64
|
+
end
|
59
65
|
end
|
60
66
|
|
61
67
|
private
|
62
68
|
|
69
|
+
def cucumber_args
|
70
|
+
if index = ARGV.index('cucumber')
|
71
|
+
ARGV[index + 1..-1]
|
72
|
+
else
|
73
|
+
[]
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
63
77
|
def log(*args)
|
64
78
|
Flatware.log(*args)
|
65
79
|
end
|
@@ -27,7 +27,15 @@ module Flatware
|
|
27
27
|
end unless current_scenario
|
28
28
|
end
|
29
29
|
|
30
|
-
|
30
|
+
# keyword,
|
31
|
+
# step_match,
|
32
|
+
# multiline_arg,
|
33
|
+
# status,
|
34
|
+
# exception,
|
35
|
+
# source_indent,
|
36
|
+
# background,
|
37
|
+
# file_colon_line
|
38
|
+
def after_step_result(_, _, _, status, exception, _, background, _)
|
31
39
|
result = if status_only? background
|
32
40
|
background_steps << Result.background(status, exception)
|
33
41
|
Result.status status
|
@@ -80,7 +88,7 @@ module Flatware
|
|
80
88
|
end
|
81
89
|
|
82
90
|
def example_row?(table_row)
|
83
|
-
outline_table? and not table_header_row? table_row
|
91
|
+
table_row.respond_to? :failed? and outline_table? and not table_header_row? table_row
|
84
92
|
end
|
85
93
|
|
86
94
|
def example_cell?(status)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flatware
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -32,17 +32,23 @@ dependencies:
|
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
none: false
|
34
34
|
requirements:
|
35
|
-
- -
|
35
|
+
- - ! '>'
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0.13'
|
38
|
+
- - <
|
36
39
|
- !ruby/object:Gem::Version
|
37
|
-
version: 0.
|
40
|
+
version: '0.16'
|
38
41
|
type: :runtime
|
39
42
|
prerelease: false
|
40
43
|
version_requirements: !ruby/object:Gem::Requirement
|
41
44
|
none: false
|
42
45
|
requirements:
|
43
|
-
- -
|
46
|
+
- - ! '>'
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0.13'
|
49
|
+
- - <
|
44
50
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.
|
51
|
+
version: '0.16'
|
46
52
|
- !ruby/object:Gem::Dependency
|
47
53
|
name: cucumber
|
48
54
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,7 +56,7 @@ dependencies:
|
|
50
56
|
requirements:
|
51
57
|
- - ~>
|
52
58
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.
|
59
|
+
version: 1.2.0
|
54
60
|
type: :runtime
|
55
61
|
prerelease: false
|
56
62
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,7 +64,7 @@ dependencies:
|
|
58
64
|
requirements:
|
59
65
|
- - ~>
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
67
|
+
version: 1.2.0
|
62
68
|
- !ruby/object:Gem::Dependency
|
63
69
|
name: aruba
|
64
70
|
requirement: !ruby/object:Gem::Requirement
|