Sha256: 0fdaa26125d12484c61765d7939be16b45c8d5b7c8c7a369081a74aef616ccd0

Contents?: true

Size: 746 Bytes

Versions: 11

Compression:

Stored size: 746 Bytes

Contents

module Knapsack
  class Allocator
    def initialize(args={})
      @report_distributor = Knapsack::Distributors::ReportDistributor.new(args)
      @leftover_distributor = Knapsack::Distributors::LeftoverDistributor.new(args)
    end

    def report_node_tests
      @report_node_tests ||= @report_distributor.tests_for_current_node
    end

    def leftover_node_tests
      @leftover_node_tests ||= @leftover_distributor.tests_for_current_node
    end

    def node_tests
      @node_tests ||= report_node_tests + leftover_node_tests
    end

    def stringify_node_tests
      node_tests.join(' ')
    end

    def test_dir
      Knapsack::Config::Env.test_dir || @report_distributor.test_file_pattern.gsub(/^(.*?)\//).first
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
knapsack-1.13.1 lib/knapsack/allocator.rb
knapsack-1.13.0 lib/knapsack/allocator.rb
knapsack-1.12.2 lib/knapsack/allocator.rb
knapsack-1.12.1 lib/knapsack/allocator.rb
knapsack-1.12.0 lib/knapsack/allocator.rb
knapsack-1.11.1 lib/knapsack/allocator.rb
knapsack-1.11.0 lib/knapsack/allocator.rb
knapsack-1.10.0 lib/knapsack/allocator.rb
knapsack-1.9.0 lib/knapsack/allocator.rb
knapsack-1.8.0 lib/knapsack/allocator.rb
knapsack-1.7.0 lib/knapsack/allocator.rb