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.24.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.23.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.22.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.21.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.20.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.19.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.18.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.17.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.16.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.15.2 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.15.1 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.15.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.14.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.13.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.12.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.11.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.10.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.9.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.8.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.7.2 lib/knapsack_pro/test_file_finder.rb