Class: Travis::CLI::Setup::SauceConnect

Inherits:
Service
  • Object
show all
Defined in:
lib/travis/cli/setup/sauce_connect.rb

Instance Attribute Summary

Attributes inherited from Service

#command

Instance Method Summary collapse

Methods inherited from Service

description, #initialize, known_as?, #method_missing, normalized_name, service_name

Constructor Details

This class inherits a constructor from Travis::CLI::Setup::Service

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Travis::CLI::Setup::Service

Instance Method Details

#runObject



10
11
12
13
14
15
16
17
# File 'lib/travis/cli/setup/sauce_connect.rb', line 10

def run
  travis_config['addons'] ||= {}
  configure 'sauce_connect', {}, travis_config['addons'] do |config|
    config['username']   = ask("Sauce Labs user: ").to_s
    config['access_key'] = ask("Sauce Labs access key: ") { |q| q.echo = "*" }.to_s
    encrypt(config, 'access_key') if agree("Encrypt access key? ") { |q| q.default = 'yes' }
  end
end