Class: Travis::CLI::Setup::Heroku
- Defined in:
- lib/travis/cli/setup/heroku.rb
Instance Attribute Summary
Attributes inherited from Service
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
#run ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/travis/cli/setup/heroku.rb', line 9 def run deploy 'heroku' do |config| config['api_key'] = `heroku auth:token 2>/dev/null`.strip config['api_key'] = ask("Heroku API token: ") { |q| q.echo = "*" }.to_s if config['api_key'].empty? config['app'] = `heroku apps:info 2>/dev/null`.scan(/^=== (.+)$/).flatten.first config['app'] = ask("Heroku application name: ") { |q| q.default = repository.name }.to_s if config['app'].nil? end end |