class Knapsack::Allocator
Public Class Methods
new(args={})
click to toggle source
# File lib/knapsack/allocator.rb, line 3 def initialize(args={}) @report_distributor = Knapsack::Distributors::ReportDistributor.new(args) @leftover_distributor = Knapsack::Distributors::LeftoverDistributor.new(args) end
Public Instance Methods
leftover_node_tests()
click to toggle source
# File lib/knapsack/allocator.rb, line 12 def leftover_node_tests @leftover_node_tests ||= @leftover_distributor.tests_for_current_node end
node_tests()
click to toggle source
# File lib/knapsack/allocator.rb, line 16 def node_tests @node_tests ||= report_node_tests + leftover_node_tests end
report_node_tests()
click to toggle source
# File lib/knapsack/allocator.rb, line 8 def report_node_tests @report_node_tests ||= @report_distributor.tests_for_current_node end
stringify_node_tests()
click to toggle source
# File lib/knapsack/allocator.rb, line 20 def stringify_node_tests node_tests .map do |test_file| %{"#{test_file}"} end.join(' ') end
test_dir()
click to toggle source
# File lib/knapsack/allocator.rb, line 27 def test_dir Knapsack::Config::Env.test_dir || @report_distributor.test_file_pattern.split('/').first end