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

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

Instance Method Summary collapse

Methods inherited from Pod::Command::Binary

#load_podfile, options, #prebuild_config, #update_cli_config

Constructor Details

#initialize(argv) ⇒ Fetch

Returns a new instance of Fetch.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/command/fetch.rb', line 9

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,
  )
end

Instance Method Details

#runObject



34
35
36
# File 'lib/command/fetch.rb', line 34

def run
  @fetcher.run
end