lib/cocoapods/sources_manager.rb
# Updates the local clone of the spec-repo with the given name or of all
# the git repos if the name is omitted.
#
# @param  [String] name
#
# @return [void]
#
Updates the local clone of the spec-repo with the given name or of all
the git repos if the name is omitted.
Updates the local clone of the spec - repo with the given name or of all the git repos if the name is omitted .
def update(source_name = nil, show_output = false)
        if source_name
          source = aggregate.all.find { |s| s.name == source_name }
          raise Informative, "Unable to find the `#{source_name}` repo."    unless source
          raise Informative, "The `#{source_name}` repo is not a git repo." unless git_repo?(source.repo)
          sources = [source]
        else
          sources = aggregate.all.select { |source| git_repo?(source.repo) }
        end
        sources.each do |source|
          UI.section "Updating spec repo `#{source.name}`" do
            Dir.chdir(source.repo) do
              output = git!("pull")
              UI.puts output if show_output && !config.verbose?
            end
            check_version_information(source.repo)
          end
        end
      end
def update ( source_name = nil , show_output = false ) if source_name source = aggregate . all . find { | s | s . name == source_name } raise Informative , "Unable to find the `#{source_name}` repo." unless source raise Informative , "The `#{source_name}` repo is not a git repo." unless git_repo? ( source . repo ) sources = [ source ] else sources = aggregate . all . select { | source | git_repo? ( source . repo ) } end sources . each do | source | UI . section "Updating spec repo `#{source.name}`" do Dir . chdir ( source . repo ) do output = git! ( "pull" ) UI . puts output if show_output && ! config . verbose? end check_version_information ( source . repo ) end end end
Updates the local clone of the spec-repo with the given name or of all
the git repos if the name is omitted.
Updates the local clone of the spec - repo with the given name or of all the git repos if the name is omitted .
None
void
source_name
show_output
None