Class: KnapsackPro::Runners::BaseRunner
- Inherits:
-
Object
- Object
- KnapsackPro::Runners::BaseRunner
show all
- Defined in:
- lib/knapsack_pro/runners/base_runner.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(adapter_class) ⇒ BaseRunner
Returns a new instance of BaseRunner.
10
11
12
13
|
# File 'lib/knapsack_pro/runners/base_runner.rb', line 10
def initialize(adapter_class)
@allocator_builder = KnapsackPro::RegularAllocatorBuilder.new(adapter_class)
@allocator = allocator_builder.allocator
end
|
Class Method Details
.run(args) ⇒ Object
6
7
8
|
# File 'lib/knapsack_pro/runners/base_runner.rb', line 6
def self.run(args)
raise NotImplementedError
end
|
Instance Method Details
#stringify_test_file_paths ⇒ Object
#test_dir ⇒ Object
23
24
25
|
# File 'lib/knapsack_pro/runners/base_runner.rb', line 23
def test_dir
allocator_builder.test_dir
end
|
#test_file_paths ⇒ Object
15
16
17
|
# File 'lib/knapsack_pro/runners/base_runner.rb', line 15
def test_file_paths
@test_file_paths ||= allocator.test_file_paths
end
|
#test_files_to_execute_exist? ⇒ Boolean
27
28
29
30
31
32
33
34
|
# File 'lib/knapsack_pro/runners/base_runner.rb', line 27
def test_files_to_execute_exist?
if test_file_paths.empty?
KnapsackPro.logger.info("Knapsack Pro API returned no test files to execute for the node this time. The reason might be that you changed recently a number of total nodes or you removed some test files. Please create a new commit to get a better test suite split next time.")
false
else
true
end
end
|