Class: Pod::Command::Binary::Fetch

Inherits:
Pod::Command::Binary show all
Defined in:
lib/command/fetch.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Pod::Command::Binary

#load_podfile, #prebuild_config, #update_cli_config

Constructor Details

#initialize(argv) ⇒ Fetch

Returns a new instance of Fetch.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/command/fetch.rb', line 15

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:"
     = IO::console.gets.strip
    Pod::UI.puts "Enter Artifactory password:"
    password = IO::console.getpass
    update_cli_config(
      :artifactory_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

Class Method Details

.optionsObject



9
10
11
12
13
# File 'lib/command/fetch.rb', line 9

def self.options
  [
    ["--repo-update", "Update pod repo before installing"]
  ].concat(super)
end

Instance Method Details

#runObject



41
42
43
# File 'lib/command/fetch.rb', line 41

def run
  @fetcher.run
end