Class: ParallelCucumber::Hooks
- Inherits:
-
Object
- Object
- ParallelCucumber::Hooks
- Defined in:
- lib/parallel_cucumber/hooks.rb
Class Method Summary collapse
- .fire_after_batch_hooks(*args) ⇒ Object
- .fire_after_workers(*args) ⇒ Object
- .fire_before_batch_hooks(*args) ⇒ Object
- .fire_before_workers(*args) ⇒ Object
- .fire_on_batch_error(*args) ⇒ Object
- .fire_on_dry_run_error(error) ⇒ Object
- .fire_worker_health_check(*args) ⇒ Object
- .register_after_batch(proc) ⇒ Object
- .register_after_workers(proc) ⇒ Object
- .register_before_batch(proc) ⇒ Object
- .register_before_workers(proc) ⇒ Object
- .register_on_batch_error(proc) ⇒ Object
- .register_on_dry_run_error(proc) ⇒ Object
- .register_worker_health_check(proc) ⇒ Object
Class Method Details
.fire_after_batch_hooks(*args) ⇒ Object
59 60 61 62 63 |
# File 'lib/parallel_cucumber/hooks.rb', line 59 def fire_after_batch_hooks(*args) @after_batch_hooks.each do |hook| hook.call(*args) end end |
.fire_after_workers(*args) ⇒ Object
71 72 73 74 75 |
# File 'lib/parallel_cucumber/hooks.rb', line 71 def fire_after_workers(*args) @after_workers.each do |hook| hook.call(*args) end end |
.fire_before_batch_hooks(*args) ⇒ Object
53 54 55 56 57 |
# File 'lib/parallel_cucumber/hooks.rb', line 53 def fire_before_batch_hooks(*args) @before_batch_hooks.each do |hook| hook.call(*args) end end |
.fire_before_workers(*args) ⇒ Object
65 66 67 68 69 |
# File 'lib/parallel_cucumber/hooks.rb', line 65 def fire_before_workers(*args) @before_workers.each do |hook| hook.call(*args) end end |
.fire_on_batch_error(*args) ⇒ Object
77 78 79 80 81 |
# File 'lib/parallel_cucumber/hooks.rb', line 77 def fire_on_batch_error(*args) @on_batch_error.each do |hook| hook.call(*args) end end |
.fire_on_dry_run_error(error) ⇒ Object
83 84 85 86 87 |
# File 'lib/parallel_cucumber/hooks.rb', line 83 def fire_on_dry_run_error(error) @on_dry_run_error.each do |hook| hook.call(error) end end |
.fire_worker_health_check(*args) ⇒ Object
47 48 49 50 51 |
# File 'lib/parallel_cucumber/hooks.rb', line 47 def fire_worker_health_check(*args) @worker_health_check.each do |hook| hook.call(*args) end end |
.register_after_batch(proc) ⇒ Object
22 23 24 25 |
# File 'lib/parallel_cucumber/hooks.rb', line 22 def register_after_batch(proc) raise(ArgumentError, 'Please provide a valid callback') unless proc.respond_to?(:call) @after_batch_hooks << proc end |
.register_after_workers(proc) ⇒ Object
32 33 34 35 |
# File 'lib/parallel_cucumber/hooks.rb', line 32 def register_after_workers(proc) raise(ArgumentError, 'Please provide a valid callback') unless proc.respond_to?(:call) @after_workers << proc end |
.register_before_batch(proc) ⇒ Object
17 18 19 20 |
# File 'lib/parallel_cucumber/hooks.rb', line 17 def register_before_batch(proc) raise(ArgumentError, 'Please provide a valid callback') unless proc.respond_to?(:call) @before_batch_hooks << proc end |
.register_before_workers(proc) ⇒ Object
27 28 29 30 |
# File 'lib/parallel_cucumber/hooks.rb', line 27 def register_before_workers(proc) raise(ArgumentError, 'Please provide a valid callback') unless proc.respond_to?(:call) @before_workers << proc end |
.register_on_batch_error(proc) ⇒ Object
37 38 39 40 |
# File 'lib/parallel_cucumber/hooks.rb', line 37 def register_on_batch_error(proc) raise(ArgumentError, 'Please provide a valid callback') unless proc.respond_to?(:call) @on_batch_error << proc end |
.register_on_dry_run_error(proc) ⇒ Object
42 43 44 45 |
# File 'lib/parallel_cucumber/hooks.rb', line 42 def register_on_dry_run_error(proc) raise(ArgumentError, 'Please provide a valid callback') unless proc.respond_to?(:call) @on_dry_run_error << proc end |
.register_worker_health_check(proc) ⇒ Object
12 13 14 15 |
# File 'lib/parallel_cucumber/hooks.rb', line 12 def register_worker_health_check(proc) raise(ArgumentError, 'Please provide a valid callback') unless proc.respond_to?(:call) @worker_health_check << proc end |