class KnapsackPro::RegularAllocator::Split
Attributes
Public Class Methods
Source
# File lib/knapsack_pro/regular_allocator.rb, line 6 def initialize(connection, response) @connection = connection @response = response raise ArgumentError.new(connection.response) if connection.errors? end
Public Instance Methods
Source
# File lib/knapsack_pro/regular_allocator.rb, line 20 def connection_failed? !connection.success? end
Source
# File lib/knapsack_pro/regular_allocator.rb, line 13 def exists? raise "Connection failed. Please report this as a bug: #{KnapsackPro::Urls::SUPPORT}" if connection_failed? return false if connection.api_code == KnapsackPro::Client::API::V1::BuildDistributions::TEST_SUITE_SPLIT_CACHE_MISS_CODE true end
Source
# File lib/knapsack_pro/regular_allocator.rb, line 24 def test_files response.fetch('test_files') end