Sha256: b4f2f11bd828d8e18bdeae84b12ba1e27a1778b237985ba0c16b385d25d45086

Contents?: true

Size: 756 Bytes

Versions: 1

Compression:

Stored size: 756 Bytes

Contents

module PodPrebuild
  class CacheValidator
    def initialize(options)
      @validators = [
        PodPrebuild::PodfileChangesCacheValidator.new(options),
        PodPrebuild::NonDevPodsCacheValidator.new(options)
      ]
      @validators << PodPrebuild::DevPodsCacheValidator.new(options) if Pod::Podfile::DSL.dev_pods_enabled?
      @validators << PodPrebuild::DependenciesGraphCacheValidator.new(options)
      @validators << PodPrebuild::ExclusionCacheValidator.new(options)
    end

    def validate(*)
      @validators.reduce(PodPrebuild::CacheValidationResult.new) do |acc, validator|
        validation = validator.validate(acc)
        validator.is_a?(AccumulatedCacheValidator) ? validation : acc.merge(validation)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cocoapods-binary-cache-0.1.6 lib/cocoapods-binary-cache/cache/validator.rb