Sha256: 96ed0d0d006179791d23dc8b5fe8310b945d2d5a39b2009013bddbe35ede83ce

Contents?: true

Size: 945 Bytes

Versions: 8

Compression:

Stored size: 945 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|
                source.update(show_output)
              end
            end
          end


        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
cocoapods-tj-1.0.7 lib/cocoapods-tj/command/bin/repo/update.rb
cocoapods-tj-1.0.6 lib/cocoapods-tj/command/bin/repo/update.rb
cocoapods-tj-1.0.5 lib/cocoapods-tj/command/bin/repo/update.rb
cocoapods-tj-1.0.4 lib/cocoapods-tj/command/bin/repo/update.rb
cocoapods-tj-1.0.3 lib/cocoapods-tj/command/bin/repo/update.rb
cocoapods-tj-1.0.2 lib/cocoapods-tj/command/bin/repo/update.rb
cocoapods-tj-1.0.1 lib/cocoapods-tj/command/bin/repo/update.rb
cocoapods-tj-1.0.0 lib/cocoapods-tj/command/bin/repo/update.rb