class Pod::Command::Update_tal

Public Class Methods

new(argv) click to toggle source
Calls superclass method
# File lib/cocoapods-install_tal/command/update_tal.rb, line 17
def initialize(argv)
  @no_fix = argv.flag?('no-fix', false)
  super
end
options() click to toggle source

self.description = <<-DESC

替代 Cocoapods 原生 install,可以自动解决库中冲突 lib

DESC

Calls superclass method
# File lib/cocoapods-install_tal/command/update_tal.rb, line 11
def self.options
  [
    ['--no-fix', 'not fix conflict after install before generate project'],
  ].concat(super)
end

Public Instance Methods

installer_tal_for_config() click to toggle source
# File lib/cocoapods-install_tal/command/update_tal.rb, line 22
def installer_tal_for_config
  InstallerTal.new(config.sandbox, config.podfile, config.lockfile, !@no_fix)
end
run() click to toggle source
# File lib/cocoapods-install_tal/command/update_tal.rb, line 26
def run
    verify_podfile_exists!

    installer = installer_tal_for_config
    installer.repo_update = repo_update?(:default => true)
    if @pods
      verify_lockfile_exists!
      verify_pods_are_installed!
      installer.update = { :pods => @pods }
    else
      UI.puts 'Update all pods'.yellow
      installer.update = true
    end
    installer.install!
end