flatware 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +83 -39
  3. data/lib/flatware-cucumber.rb +1 -0
  4. data/lib/flatware-rspec.rb +1 -0
  5. data/lib/flatware.rb +2 -10
  6. data/lib/flatware/broadcaster.rb +15 -0
  7. data/lib/flatware/cli.rb +10 -34
  8. data/lib/flatware/cucumber.rb +37 -12
  9. data/lib/flatware/cucumber/checkpoint.rb +28 -0
  10. data/lib/flatware/cucumber/cli.rb +22 -0
  11. data/lib/flatware/cucumber/formatter.rb +36 -84
  12. data/lib/flatware/{formatters/cucumber → cucumber/formatters}/console.rb +5 -3
  13. data/lib/flatware/{formatters/cucumber → cucumber/formatters}/console/summary.rb +3 -3
  14. data/lib/flatware/cucumber/result.rb +27 -0
  15. data/lib/flatware/cucumber/scenario_result.rb +38 -0
  16. data/lib/flatware/cucumber/step_result.rb +30 -0
  17. data/lib/flatware/poller.rb +2 -2
  18. data/lib/flatware/rspec.rb +28 -0
  19. data/lib/flatware/rspec/checkpoint.rb +29 -0
  20. data/lib/flatware/rspec/cli.rb +16 -0
  21. data/lib/flatware/rspec/example_notification.rb +21 -0
  22. data/lib/flatware/rspec/examples_notification.rb +24 -0
  23. data/lib/flatware/rspec/formatter.rb +50 -0
  24. data/lib/flatware/rspec/formatters/console.rb +33 -0
  25. data/lib/flatware/rspec/summary.rb +40 -0
  26. data/lib/flatware/serialized_exception.rb +12 -8
  27. data/lib/flatware/sink.rb +43 -33
  28. data/lib/flatware/socket.rb +89 -25
  29. data/lib/flatware/version.rb +1 -1
  30. data/lib/flatware/worker.rb +16 -9
  31. metadata +27 -55
  32. data/lib/flatware/checkpoint.rb +0 -28
  33. data/lib/flatware/checkpoint_handler.rb +0 -45
  34. data/lib/flatware/dispatcher.rb +0 -31
  35. data/lib/flatware/fireable.rb +0 -34
  36. data/lib/flatware/formatters.rb +0 -27
  37. data/lib/flatware/formatters/cucumber/http.rb +0 -83
  38. data/lib/flatware/result.rb +0 -25
  39. data/lib/flatware/scenario_decorator.rb +0 -22
  40. data/lib/flatware/scenario_result.rb +0 -36
  41. 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
@@ -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