Class: PodPrebuild::IntegrationDiagnosis

Inherits:
BaseDiagnosis show all
Defined in:
lib/cocoapods-binary-cache/diagnosis/integration.rb

Instance Method Summary collapse

Methods inherited from BaseDiagnosis

#initialize, #spec

Constructor Details

This class inherits a constructor from PodPrebuild::BaseDiagnosis

Instance Method Details

#runObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/cocoapods-binary-cache/diagnosis/integration.rb', line 5

def run
  should_be_integrated = if PodPrebuild.config.prebuild_job? \
                         then @cache_validation.hit + @cache_validation.missed \
                         else @cache_validation.hit \
                         end
  should_be_integrated = should_be_integrated.map { |name| name.split("/")[0] }.to_set
  unintegrated = should_be_integrated.reject do |name|
    module_name = spec(name)&.module_name || name
    framework_path = \
      @standard_sandbox.pod_dir(name) + \
      PodPrebuild.config.prebuilt_path(path: "#{module_name}.framework")
    framework_path.exist?
  end
  return [] if unintegrated.empty?

  [[:error, "Unintegrated frameworks: #{unintegrated}"]]
end