lib/cocoapods/installer/analyzer.rb
def fetch_external_sources
        return unless allow_pre_downloads?
        deps_to_fetch = []
        deps_to_fetch_if_needed = []
        deps_with_external_source = podfile.dependencies.select { |dep| dep.external_source }
        if update_mode?
          deps_to_fetch = deps_with_external_source
        else
          pods_to_fetch = result.podfile_state.added + result.podfile_state.changed
          deps_to_fetch = deps_with_external_source.select { |dep| pods_to_fetch.include?(dep.root_name) }
          deps_to_fetch_if_needed = deps_with_external_source.select { |dep| result.podfile_state.unchanged.include?(dep.root_name) }
          deps_to_fetch += deps_to_fetch_if_needed.select { |dep| sandbox.specification(dep.root_name).nil? || !dep.external_source[:local].nil? }
        end

        unless deps_to_fetch.empty?
          UI.section "Fetching external sources" do
            deps_to_fetch.uniq.sort.each do |dependency|
              source = ExternalSources.from_dependency(dependency, podfile.defined_in_file)
              source.fetch(sandbox)
            end
          end
        end
      end
# Fetches the podspecs of external sources if modifications to the
# sandbox are allowed.
#
# @note   In update mode all the external sources are refreshed while in
#         normal mode they are refreshed only if added or changed in the
#         Podfile. Moreover, in normal specifications for unchanged Pods
#         which are missing or are generated from an local source are
#         fetched as well.
#
# @note   It is possible to perform this step before the resolution
#         process because external sources identify a single specific
#         version (checkout). If the other dependencies are not
#         compatible with the version reported by the podspec of the
#         external source the resolver will raise.
#
# @return [void]
#
# TODO    Specs
#
Fetches the podspecs of external sources if modifications to the
sandbox are allowed.
Fetches the podspecs of external sources if modifications to the sandbox are allowed .
def fetch_external_sources
        return unless allow_pre_downloads?
        deps_to_fetch = []
        deps_to_fetch_if_needed = []
        deps_with_external_source = podfile.dependencies.select { |dep| dep.external_source }
        if update_mode?
          deps_to_fetch = deps_with_external_source
        else
          pods_to_fetch = result.podfile_state.added + result.podfile_state.changed
          deps_to_fetch = deps_with_external_source.select { |dep| pods_to_fetch.include?(dep.root_name) }
          deps_to_fetch_if_needed = deps_with_external_source.select { |dep| result.podfile_state.unchanged.include?(dep.root_name) }
          deps_to_fetch += deps_to_fetch_if_needed.select { |dep| sandbox.specification(dep.root_name).nil? || !dep.external_source[:local].nil? }
        end
        unless deps_to_fetch.empty?
          UI.section "Fetching external sources" do
            deps_to_fetch.uniq.sort.each do |dependency|
              source = ExternalSources.from_dependency(dependency, podfile.defined_in_file)
              source.fetch(sandbox)
            end
          end
        end
      end
def fetch_external_sources return unless allow_pre_downloads? deps_to_fetch = [ ] deps_to_fetch_if_needed = [ ] deps_with_external_source = podfile . dependencies . select { | dep | dep . external_source } if update_mode? deps_to_fetch = deps_with_external_source else pods_to_fetch = result . podfile_state . added + result . podfile_state . changed deps_to_fetch = deps_with_external_source . select { | dep | pods_to_fetch . include? ( dep . root_name ) } deps_to_fetch_if_needed = deps_with_external_source . select { | dep | result . podfile_state . unchanged . include? ( dep . root_name ) } deps_to_fetch += deps_to_fetch_if_needed . select { | dep | sandbox . specification ( dep . root_name ) . nil? || ! dep . external_source [ :local ] . nil? } end unless deps_to_fetch . empty? UI . section "Fetching external sources" do deps_to_fetch . uniq . sort . each do | dependency | source = ExternalSources . from_dependency ( dependency , podfile . defined_in_file ) source . fetch ( sandbox ) end end end end
Fetches the podspecs of external sources if modifications to the
sandbox are allowed.
Fetches the podspecs of external sources if modifications to the sandbox are allowed .
None
void
note
In update mode all the external sources are refreshed while in normal mode they are refreshed only if added or changed in the Podfile. Moreover, in normal specifications for unchanged Pods which are missing or are generated from an local source are fetched as well.
In update mode all the external sources are refreshed while in normal mode they are refreshed only if added or changed in the Podfile . Moreover in normal specifications for unchanged Pods which are missing or are generated from an local source are fetched as well .
note
It is possible to perform this step before the resolution process because external sources identify a single specific version (checkout). If the other dependencies are not compatible with the version reported by the podspec of the external source the resolver will raise.
It is possible to perform this step before the resolution process because external sources identify a single specific version ( checkout ) . If the other dependencies are not compatible with the version reported by the podspec of the external source the resolver will raise .