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-1.0.2 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-1.0.1 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-1.0.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.57.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.56.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.55.2 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.55.1 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.55.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.54.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.53.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.52.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.51.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.50.1 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.50.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.49.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.48.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.47.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.46.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.45.0 lib/knapsack_pro/test_file_finder.rb
knapsack_pro-0.44.0 lib/knapsack_pro/test_file_finder.rb