Sha256: 8fd71efb6c5658a20f0598b13bc30172c8bafdca3482d8f7737ad7e9dda4f748

Contents?: true

Size: 1.3 KB

Versions: 17

Compression:

Stored size: 1.3 KB

Contents

require_relative "executor/fetcher"
require 'io/console'

module Pod
  class Command
    class Binary < Command
      class Fetch < Binary
        self.arguments = [CLAide::Argument.new("CACHE-BRANCH", false)]
        def self.options
          [
            ["--repo-update", "Update pod repo before installing"]
          ].concat(super)
        end

        def initialize(argv)
          super
          unless ENV['ARTIFACTORY_LOGIN'].nil? && ENV['ARTIFACTORY_PASSWORD'].nil?
            update_cli_config(
              :artifactory_login => ENV['ARTIFACTORY_LOGIN'],
              :artifactory_password => ENV['ARTIFACTORY_PASSWORD']
            )
          else
            Pod::UI.puts "Enter Artifactory login:"
            login = IO::console.gets.strip
            Pod::UI.puts "Enter Artifactory password:"
            password = IO::console.getpass
            update_cli_config(
              :artifactory_login => login,
              :artifactory_password => password
            )
          end
          update_cli_config(
            :fetch_job => true
          )
          @fetcher = PodPrebuild::CacheFetcher.new(
            config: prebuild_config,
            repo_update: argv.flag?("repo-update")
          )
        end

        def run
          @fetcher.run
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
cocoapods-binary-artifactory-cache-0.0.19 lib/command/fetch.rb
cocoapods-binary-artifactory-cache-0.0.18 lib/command/fetch.rb
cocoapods-binary-artifactory-cache-0.0.17 lib/command/fetch.rb
cocoapods-binary-artifactory-cache-0.0.16 lib/command/fetch.rb
cocoapods-binary-artifactory-cache-0.0.15 lib/command/fetch.rb
cocoapods-binary-artifactory-cache-0.0.14 lib/command/fetch.rb
cocoapods-binary-artifactory-cache-0.0.13 lib/command/fetch.rb
cocoapods-binary-artifactory-cache-0.0.12 lib/command/fetch.rb
cocoapods-binary-artifactory-cache-0.0.11 lib/command/fetch.rb
cocoapods-binary-artifactory-cache-0.0.10 lib/command/fetch.rb
cocoapods-binary-artifactory-cache-0.0.9 lib/command/fetch.rb
cocoapods-binary-artifactory-cache-0.0.8 lib/command/fetch.rb
cocoapods-binary-artifactory-cache-0.0.7 lib/command/fetch.rb
cocoapods-binary-artifactory-cache-0.0.6 lib/command/fetch.rb
cocoapods-binary-artifactory-cache-0.0.5 lib/command/fetch.rb
cocoapods-binary-artifactory-cache-0.0.4 lib/command/fetch.rb
cocoapods-binary-artifactory-cache-0.0.3 lib/command/fetch.rb