Class: KnapsackPro::AllocatorBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/knapsack_pro/allocator_builder.rb

Instance Method Summary collapse

Constructor Details

#initialize(adapter_class) ⇒ AllocatorBuilder

Returns a new instance of AllocatorBuilder.



3
4
5
# File 'lib/knapsack_pro/allocator_builder.rb', line 3

def initialize(adapter_class)
  @adapter_class = adapter_class
end

Instance Method Details

#allocatorObject



7
8
9
10
11
12
13
14
# File 'lib/knapsack_pro/allocator_builder.rb', line 7

def allocator
  KnapsackPro::Allocator.new(
    test_files: test_files,
    ci_node_total: env.ci_node_total,
    ci_node_index: env.ci_node_index,
    repository_adapter: repository_adapter,
  )
end

#test_dirObject



16
17
18
# File 'lib/knapsack_pro/allocator_builder.rb', line 16

def test_dir
  test_file_pattern.split('/').first
end