Created
August 12, 2013 23:02
-
-
Save jacobo/6216165 to your computer and use it in GitHub Desktop.
for travis gem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def setup_engineyard | |
configure 'deploy', 'provider' => 'engineyard' do |config| | |
eyrc = File.expand_path(".eyrc", Dir.home) | |
if File.exists?(eyrc) | |
config['api_key'] = YAML.load_file(eyrc)["api_token"] | |
end | |
env = ask("Environment (optional): ").to_s | |
config['environment'] = env unless env.empty? | |
if agree("Run migrations on deploy? ") { |q| q.default = 'yes' } | |
config['migrate'] = ask("Migration command: ") { |q| q.default = "rake db:migrate" } | |
end | |
config['on'] = { 'repo' => repository.slug } if agree("Deploy only from #{repository.slug}? ") { |q| q.default = 'yes' } | |
encrypt(config, 'api_key') if agree("Encrypt API key? ") { |q| q.default = 'yes' } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment