Module: Gauge::Executor Private
- Defined in:
- lib/executor.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
- .execute_hooks(hooks, currentExecutionInfo, should_filter) ⇒ Object private
- .execute_step(step, args) ⇒ Object private
- .get_scenario_tags(info) ⇒ Object private
- .load_steps(dir) ⇒ Object private
- .start_debugger ⇒ Object private
Class Method Details
.execute_hooks(hooks, currentExecutionInfo, should_filter) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/executor.rb', line 52 def self.execute_hooks(hooks, currentExecutionInfo, should_filter) hooks.each do |hook| if !should_filter || hook[:options][:tags].empty? next hook[:block].call(currentExecutionInfo) end = currentExecutionInfo.currentSpec. + (currentExecutionInfo) intersection = ( & hook[:options][:tags]) if (hook[:options][:operator] == 'OR' && !intersection.empty?) || (hook[:options][:operator] == 'AND' && intersection.length == hook[:options][:tags].length) hook[:block].call(currentExecutionInfo) end end nil rescue Exception => e e end |
.execute_step(step, args) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
43 44 45 46 47 48 49 50 |
# File 'lib/executor.rb', line 43 def self.execute_step(step, args) si = MethodCache.get_step_info step if args.size == 1 si[:block].call(args[0]) else si[:block].call(args) end end |
.get_scenario_tags(info) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
69 70 71 |
# File 'lib/executor.rb', line 69 def self.(info) !info.currentScenario.nil? ? info.currentScenario. : [] end |
.load_steps(dir) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/executor.rb', line 18 def self.load_steps(dir) start_debugger Dir["#{dir}/**/*.rb"].each do |x| begin GaugeLog.debug "Loading step implemetations from #{x} dirs" ENV['GAUGE_STEP_FILE'] = x require x rescue Exception => e GaugeLog.error "Cannot import #{x}. Reason: #{e.message}" end end end |
.start_debugger ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/executor.rb', line 31 def self.start_debugger if ENV['DEBUGGING'] = DebugOptions.new .host = '127.0.0.1' .port = ENV['DEBUG_PORT'].to_i .notify_dispatcher = false .skip_wait_for_start = false GaugeLog.info ATTACH_DEBUGGER_EVENT Debugger.prepare_debugger() end end |