Sha256: 3a2e434a91ee6217964017cf5f43e0b30230d7ef76dfcb0ffba6c5b9a5e4bdb6

Contents?: true

Size: 1015 Bytes

Versions: 159

Compression:

Stored size: 1015 Bytes

Contents

require 'parallel'

module Pod
  class Command
    class Bin < Command
      class Repo < Bin
        class Update < Repo
          self.summary = '更新私有源'

          self.arguments = [
            CLAide::Argument.new('NAME', false)
          ]

          def self.options
            [
              ['--all', '更新所有私有源,默认只更新二进制相关私有源']
            ].concat(super)
          end

          def initialize(argv)
            @all = argv.flag?('all')
            @name = argv.shift_argument
            super
          end

          def run
            show_output = !config.silent?
            if @name || @all
              config.sources_manager.update(@name, show_output)
            else
              Parallel.each(valid_sources, in_threads: 4) do |source|
                UI.puts "更新私有源仓库 #{source.to_s}".yellow
                source.update(show_output)
              end
            end
          end


        end
      end
    end
  end
end

Version data entries

159 entries across 159 versions & 7 rubygems

Version Path
cocoapods-bb-bin-0.2.9.0 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.2.8.1 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.2.8 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-fy-bin-0.3.1 lib/cocoapods-fy-bin/command/bin/repo/update.rb
cocoapods-tdf-bin-0.0.43 lib/cocoapods-tdf-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.2.7.13 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-imy-bin-0.3.1.21 lib/cocoapods-imy-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.2.7.12 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.2.7.11 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.2.7.10 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-tdf-bin-0.0.42 lib/cocoapods-tdf-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.2.7.9 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.2.7.8 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-tdf-bin-0.0.41 lib/cocoapods-tdf-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.2.7.7 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.2.7.6 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-fy-bin-0.3.0 lib/cocoapods-fy-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.2.7.5 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-tdf-bin-0.0.40 lib/cocoapods-tdf-bin/command/bin/repo/update.rb
cocoapods-tdf-bin-0.0.39 lib/cocoapods-tdf-bin/command/bin/repo/update.rb