Sha256: 78ca2347dfc24acf1c789348126537b23e240b53e2587e3935a95e2e65f8bd6f

Contents?: true

Size: 656 Bytes

Versions: 68

Compression:

Stored size: 656 Bytes

Contents

module KnapsackPro
  class TestFileFinder
    def self.call(test_file_pattern)
      new(test_file_pattern).call
    end

    def initialize(test_file_pattern)
      @test_file_pattern = test_file_pattern
    end

    def call
      test_file_hashes = []
      test_files.each do |test_file_path|
        test_file_hashes << test_file_hash_for(test_file_path)
      end
      test_file_hashes
    end

    private

    attr_reader :test_file_pattern

    def test_files
      Dir.glob(test_file_pattern).uniq.sort
    end

    def test_file_hash_for(test_file_path)
      {
        'path' => TestFileCleaner.clean(test_file_path)
      }
    end
  end
end

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
knapsack_pro-0.43.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.42.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.41.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.40.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.39.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.38.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.37.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.36.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.35.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.34.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.33.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.32.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.31.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.30.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.29.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.28.1 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.28.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.27.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.26.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.25.0 lib/knapsack_pro/test_file_finder.rb