Class: CarthageCache::ConfiguratorWizard

Inherits:
Object
  • Object
show all
Defined in:
lib/carthage_cache/configurator_wizard.rb

Instance Method Summary collapse

Constructor Details

#initialize(ask_proc, password_proc) ⇒ ConfiguratorWizard

Returns a new instance of ConfiguratorWizard.



5
6
7
8
# File 'lib/carthage_cache/configurator_wizard.rb', line 5

def initialize(ask_proc, password_proc)
  @ask_proc = ask_proc
  @password_proc = password_proc
end

Instance Method Details

#startObject



10
11
12
13
14
15
16
17
# File 'lib/carthage_cache/configurator_wizard.rb', line 10

def start
  config = Configuration.new
  config.bucket_name = ask("What is the Amazon S3 bucket name?", ENV["CARTHAGE_CACHE_DEFAULT_BUCKET_NAME"])
  config.aws_region = ask("What is the Amazon S3 region?")
  config.aws_access_key_id = password("What is the AWS access key?")
  config.aws_secret_access_key = password(" What is the AWS secret access key?")
  config
end