Class: PodPrebuild::DevPodsCacheValidator

Inherits:
BaseCacheValidator show all
Defined in:
lib/cocoapods-binary-ht/cache/validator_dev_pods.rb

Instance Attribute Summary

Attributes inherited from BaseCacheValidator

#generated_framework_path, #pod_lockfile, #podfile, #prebuilt_lockfile, #validate_prebuilt_settings

Instance Method Summary collapse

Methods inherited from BaseCacheValidator

#changes_of_prebuilt_lockfile_vs_podfile, #incompatible_build_settings, #initialize, #load_metadata, #read_prebuilt_build_settings, #read_source_hash, #validate_pods, #validate_with_podfile

Constructor Details

This class inherits a constructor from PodPrebuild::BaseCacheValidator

Instance Method Details

#incompatible_pod(name) ⇒ Object



13
14
15
16
17
18
# File 'lib/cocoapods-binary-ht/cache/validator_dev_pods.rb', line 13

def incompatible_pod(name)
  diff = super(name)
  return diff unless diff.empty?

  incompatible_source(name)
end

#incompatible_source(name) ⇒ Object



20
21
22
23
24
25
26
27
28
# File 'lib/cocoapods-binary-ht/cache/validator_dev_pods.rb', line 20

def incompatible_source(name)
  diff = {}
  prebuilt_hash = read_source_hash(name)
  expected_hash = pod_lockfile.dev_pod_hash(name)
  unless prebuilt_hash == expected_hash
    diff[name] = { :prebuilt_hash => prebuilt_hash, :expected_hash => expected_hash}
  end
  diff
end

#validateObject



3
4
5
6
7
8
9
10
11
# File 'lib/cocoapods-binary-ht/cache/validator_dev_pods.rb', line 3

def validate(*)
  return PodPrebuild::CacheValidationResult.new if @pod_lockfile.nil?

  validate_pods(
    pods: @pod_lockfile.dev_pods,
    subspec_pods: [],
    prebuilt_pods: @prebuilt_lockfile.nil? ? {} : @prebuilt_lockfile.dev_pods
  )
end