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-fy-bin-0.0.5 lib/cocoapods-fy-bin/command/bin/repo/update.rb
cocoapods-fy-bin-0.0.4 lib/cocoapods-fy-bin/command/bin/repo/update.rb
cocoapods-fy-bin-0.0.3 lib/cocoapods-fy-bin/command/bin/repo/update.rb
cocoapods-fy-bin-0.0.2 lib/cocoapods-fy-bin/command/bin/repo/update.rb
cocoapods-fy-bin-0.0.1 lib/cocoapods-fy-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.2.2.2 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-tdf-bin-0.0.30 lib/cocoapods-tdf-bin/command/bin/repo/update.rb
cocoapods-tdf-bin-0.0.29 lib/cocoapods-tdf-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.2.2.1 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.2.2 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.2.1 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-tdf-bin-0.0.28 lib/cocoapods-tdf-bin/command/bin/repo/update.rb
cocoapods-tdf-bin-0.0.26 lib/cocoapods-tdf-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.2.0 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-tdf-bin-0.0.25 lib/cocoapods-tdf-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.1.9.2 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.1.9.1 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-tdf-bin-0.0.24 lib/cocoapods-tdf-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.1.9 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-tdf-bin-0.0.23 lib/cocoapods-tdf-bin/command/bin/repo/update.rb