Class: Parallel::Sauce::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/parallel/sauce/runner.rb

Instance Method Summary collapse

Constructor Details

#initialize(pool_size, jar_runner_path, sauce_key, device = 'iPhone X.*', datacenter = 'EU') ⇒ Runner

Returns a new instance of Runner.



6
7
8
9
10
11
12
# File 'lib/parallel/sauce/runner.rb', line 6

def initialize(pool_size, jar_runner_path, sauce_key, device = 'iPhone X.*', datacenter = 'EU')
  @pool_size = pool_size
  @jar_runner_path = jar_runner_path
  @sauce_key = sauce_key
  @device = device
  @datacenter = datacenter
end

Instance Method Details

#run(main_app_path, target_paths, result_folder) ⇒ Object



14
15
16
17
18
# File 'lib/parallel/sauce/runner.rb', line 14

def run(main_app_path, target_paths, result_folder)
  Parallel.map(target_paths, in_threads: pool_size) do |target_path|
    Pair.new(target_path, execute(main_app_path, target_path, result_folder))
  end
end