flatware 0.3.2 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +83 -39
- data/lib/flatware-cucumber.rb +1 -0
- data/lib/flatware-rspec.rb +1 -0
- data/lib/flatware.rb +2 -10
- data/lib/flatware/broadcaster.rb +15 -0
- data/lib/flatware/cli.rb +10 -34
- data/lib/flatware/cucumber.rb +37 -12
- data/lib/flatware/cucumber/checkpoint.rb +28 -0
- data/lib/flatware/cucumber/cli.rb +22 -0
- data/lib/flatware/cucumber/formatter.rb +36 -84
- data/lib/flatware/{formatters/cucumber → cucumber/formatters}/console.rb +5 -3
- data/lib/flatware/{formatters/cucumber → cucumber/formatters}/console/summary.rb +3 -3
- data/lib/flatware/cucumber/result.rb +27 -0
- data/lib/flatware/cucumber/scenario_result.rb +38 -0
- data/lib/flatware/cucumber/step_result.rb +30 -0
- data/lib/flatware/poller.rb +2 -2
- data/lib/flatware/rspec.rb +28 -0
- data/lib/flatware/rspec/checkpoint.rb +29 -0
- data/lib/flatware/rspec/cli.rb +16 -0
- data/lib/flatware/rspec/example_notification.rb +21 -0
- data/lib/flatware/rspec/examples_notification.rb +24 -0
- data/lib/flatware/rspec/formatter.rb +50 -0
- data/lib/flatware/rspec/formatters/console.rb +33 -0
- data/lib/flatware/rspec/summary.rb +40 -0
- data/lib/flatware/serialized_exception.rb +12 -8
- data/lib/flatware/sink.rb +43 -33
- data/lib/flatware/socket.rb +89 -25
- data/lib/flatware/version.rb +1 -1
- data/lib/flatware/worker.rb +16 -9
- metadata +27 -55
- data/lib/flatware/checkpoint.rb +0 -28
- data/lib/flatware/checkpoint_handler.rb +0 -45
- data/lib/flatware/dispatcher.rb +0 -31
- data/lib/flatware/fireable.rb +0 -34
- data/lib/flatware/formatters.rb +0 -27
- data/lib/flatware/formatters/cucumber/http.rb +0 -83
- data/lib/flatware/result.rb +0 -25
- data/lib/flatware/scenario_decorator.rb +0 -22
- data/lib/flatware/scenario_result.rb +0 -36
- data/lib/flatware/step_result.rb +0 -27
@@ -1,36 +0,0 @@
|
|
1
|
-
require 'flatware/serialized_exception'
|
2
|
-
module Flatware
|
3
|
-
class ScenarioResult
|
4
|
-
attr_reader :status, :file_colon_line, :name
|
5
|
-
def initialize(status, file_colon_line, name, e)
|
6
|
-
@status = status
|
7
|
-
@file_colon_line = file_colon_line
|
8
|
-
@name = name
|
9
|
-
@exception = SerializedException.new(e.class, e.message, e.backtrace) if e
|
10
|
-
@failed_outside_step = false
|
11
|
-
end
|
12
|
-
|
13
|
-
def passed?
|
14
|
-
status == :passed
|
15
|
-
end
|
16
|
-
|
17
|
-
def failed?
|
18
|
-
status == :failed
|
19
|
-
end
|
20
|
-
|
21
|
-
def failed_outside_step!(file_colon_line)
|
22
|
-
@failed_outside_step = file_colon_line
|
23
|
-
end
|
24
|
-
|
25
|
-
def failed_outside_step?
|
26
|
-
!!@failed_outside_step
|
27
|
-
end
|
28
|
-
|
29
|
-
def exception
|
30
|
-
@exception.tap do |e|
|
31
|
-
e.backtrace = e.backtrace.grep(Regexp.new(Dir.pwd)).map { |line| line[Dir.pwd.size..-1] }
|
32
|
-
e.backtrace = e.backtrace + [@failed_outside_step] if failed_outside_step?
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
data/lib/flatware/step_result.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
require 'flatware/serialized_exception'
|
2
|
-
module Flatware
|
3
|
-
class StepResult
|
4
|
-
attr_reader :status, :exception
|
5
|
-
|
6
|
-
def initialize(status, exception)
|
7
|
-
@status, @exception = status, serialized(exception)
|
8
|
-
end
|
9
|
-
|
10
|
-
def passed?
|
11
|
-
status == :passed
|
12
|
-
end
|
13
|
-
|
14
|
-
def failed?
|
15
|
-
status == :failed
|
16
|
-
end
|
17
|
-
|
18
|
-
def progress
|
19
|
-
Cucumber::ProgressString.format(status)
|
20
|
-
end
|
21
|
-
|
22
|
-
private
|
23
|
-
def serialized(e)
|
24
|
-
SerializedException.new(e.class, e.message, e.backtrace) if e
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|