Class: Pod::Command::Outdated
- Inherits:
-
Pod::Command
- Object
- CLAide::Command
- Pod::Command
- Pod::Command::Outdated
- Defined in:
- lib/cocoapods/command/outdated.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Outdated
constructor
A new instance of Outdated.
- #run ⇒ Object
Methods inherited from Pod::Command
parse, report_error, run, verify_git_version!
Methods included from Pod::Config::Mixin
Constructor Details
#initialize(argv) ⇒ Outdated
Returns a new instance of Outdated.
15 16 17 18 |
# File 'lib/cocoapods/command/outdated.rb', line 15 def initialize(argv) config.skip_repo_update = argv.flag?('repo-update', config.skip_repo_update) super end |
Class Method Details
.options ⇒ Object
11 12 13 |
# File 'lib/cocoapods/command/outdated.rb', line 11 def self. [['--no-repo-update', 'Skip running `pod repo update` before install']].concat(super) end |
Instance Method Details
#run ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/cocoapods/command/outdated.rb', line 25 def run if updates.empty? UI.puts 'No updates are available.'.yellow else UI.section 'The following updates are available:' do updates.each do |(name, from_version, matching_version, to_version)| UI.puts "- #{name} #{from_version} -> #{matching_version} " \ "(latest version #{to_version})" end end end if deprecated_pods.any? UI.section 'The following pods are deprecated:' do deprecated_pods.each do |spec| if spec.deprecated_in_favor_of UI.puts "- #{spec.name}" \ " (in favor of #{spec.deprecated_in_favor_of})" else UI.puts "- #{spec.name}" end end end end end |