Sha256: 90b4147f84b304c31112466188b54bb4ab4e8236af65376b65dd2f92353ab527

Contents?: true

Size: 1.06 KB

Versions: 3

Compression:

Stored size: 1.06 KB

Contents

module Pod
  class Installer
    # Override the download step to skip download and prepare file in target folder
    define_method(:install_source_of_pod) do |pod_name|
      pod_installer = create_pod_installer(pod_name)
      # Injected code
      # ------------------------------------------
      if should_integrate_prebuilt_pod?(pod_name)
        pod_installer.install_for_prebuild!(sandbox)
      else
        pod_installer.install!
      end
      # ------------------------------------------
      @installed_specs.concat(pod_installer.specs_by_platform.values.flatten.uniq)
    end

    def should_integrate_prebuilt_pod?(name)
      if Pod::Podfile::DSL.prebuild_job?
        # In a prebuild job, at the integration stage, all prebuilt frameworks should be
        # ready for integration regardless of whether there was any cache miss or not.
        # Those that are missed were prebuilt in the prebuild stage.
        PodPrebuild::StateStore.cache_validation.include?(name)
      else
        PodPrebuild::StateStore.cache_validation.hit?(name)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cocoapods-binary-cache-0.1.3 lib/cocoapods-binary-cache/pod-binary/integration/patch/source_installation.rb
cocoapods-binary-cache-0.1.2 lib/cocoapods-binary-cache/pod-binary/integration/patch/source_installation.rb
cocoapods-binary-cache-0.1.1 lib/cocoapods-binary-cache/pod-binary/integration/patch/source_installation.rb