Sha256: 624f620faff4b9f3c25deba4ada8253e45086cdd7bbf300731809704ef34c267

Contents?: true

Size: 663 Bytes

Versions: 38

Compression:

Stored size: 663 Bytes

Contents

module KnapsackPro
  class BaseAllocatorBuilder
    def initialize(adapter_class)
      @adapter_class = adapter_class
    end

    def allocator
      raise NotImplementedError
    end

    def test_dir
      KnapsackPro::Config::Env.test_dir || test_file_pattern.split('/').first.gsub(/({)/, '')
    end

    private

    attr_reader :adapter_class

    def env
      KnapsackPro::Config::Env
    end

    def repository_adapter
      KnapsackPro::RepositoryAdapterInitiator.call
    end

    def test_file_pattern
      TestFilePattern.call(adapter_class)
    end

    def test_files
      KnapsackPro::TestFileFinder.call(test_file_pattern)
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
knapsack_pro-1.15.0 lib/knapsack_pro/base_allocator_builder.rb
knapsack_pro-1.14.0 lib/knapsack_pro/base_allocator_builder.rb
knapsack_pro-1.13.0 lib/knapsack_pro/base_allocator_builder.rb
knapsack_pro-1.12.1 lib/knapsack_pro/base_allocator_builder.rb
knapsack_pro-1.12.0 lib/knapsack_pro/base_allocator_builder.rb
knapsack_pro-1.11.0 lib/knapsack_pro/base_allocator_builder.rb
knapsack_pro-1.10.1 lib/knapsack_pro/base_allocator_builder.rb
knapsack_pro-1.10.0 lib/knapsack_pro/base_allocator_builder.rb
knapsack_pro-1.9.0 lib/knapsack_pro/base_allocator_builder.rb
knapsack_pro-1.8.0 lib/knapsack_pro/base_allocator_builder.rb
knapsack_pro-1.7.0 lib/knapsack_pro/base_allocator_builder.rb
knapsack_pro-1.6.0 lib/knapsack_pro/base_allocator_builder.rb
knapsack_pro-1.5.0 lib/knapsack_pro/base_allocator_builder.rb
knapsack_pro-1.4.0 lib/knapsack_pro/base_allocator_builder.rb
knapsack_pro-1.3.0 lib/knapsack_pro/base_allocator_builder.rb
knapsack_pro-1.2.1 lib/knapsack_pro/base_allocator_builder.rb
knapsack_pro-1.2.0 lib/knapsack_pro/base_allocator_builder.rb
knapsack_pro-1.1.0 lib/knapsack_pro/base_allocator_builder.rb
knapsack_pro-1.0.2 lib/knapsack_pro/base_allocator_builder.rb
knapsack_pro-1.0.1 lib/knapsack_pro/base_allocator_builder.rb