Class: Pod::Command::Kwai::Repo::Update
- Inherits:
-
Pod::Command::Kwai::Repo
- Object
- Pod::Command
- Pod::Command::Kwai
- Pod::Command::Kwai::Repo
- Pod::Command::Kwai::Repo::Update
- Defined in:
- lib/cocoapods-kwai/command/repo/update.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Update
constructor
A new instance of Update.
- #run ⇒ Object
Constructor Details
#initialize(argv) ⇒ Update
Returns a new instance of Update.
21 22 23 24 25 |
# File 'lib/cocoapods-kwai/command/repo/update.rb', line 21 def initialize(argv) @all = argv.flag?('all') @name = argv.shift_argument super end |
Class Method Details
.options ⇒ Object
15 16 17 18 19 |
# File 'lib/cocoapods-kwai/command/repo/update.rb', line 15 def self. [ ['--all', '更新所有私有源,默认只更新快手内部私有源'], ].concat(super) end |
Instance Method Details
#run ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/cocoapods-kwai/command/repo/update.rb', line 27 def run show_output = !config.silent? if @name || @all config.sources_manager.update(@name, show_output) else Parallel.each(config.sources_manager.kwai_sources, in_threads: 4) do |source| # begin source.update(show_output) # rescue => e # UI.warn("更新私有源失败 #{source.url}") # end end end end |