Sha256: 6da1fd15352f4a6fabd7bc017797f6b44f357bb9f0f9bb8c4f6a6da8c55c1580

Contents?: true

Size: 1.6 KB

Versions: 53

Compression:

Stored size: 1.6 KB

Contents

heroku_name = app_name.gsub('_','')

after_everything do
  if config['create']
    say_wizard "Creating Heroku app '#{heroku_name}.heroku.com'"  
    while !system("heroku create #{heroku_name}")
      heroku_name = ask_wizard("What do you want to call your app? ")
    end
  end

  if config['staging']
    staging_name = "#{heroku_name}-staging"
    say_wizard "Creating staging Heroku app '#{staging_name}.heroku.com'"
    while !system("heroku create #{staging_name}")
      staging_name = ask_wizard("What do you want to call your staging app?")
    end
    git :remote => "rm heroku"
    git :remote => "add production git@heroku.com:#{heroku_name}.git"
    git :remote => "add staging git@heroku.com:#{staging_name}.git"
    say_wizard "Created branches 'production' and 'staging' for Heroku deploy."
  end

  unless config['domain'].blank?
    run "heroku addons:add custom_domains"
    run "heroku domains:add #{config['domain']}"
  end

  git :push => "#{config['staging'] ? 'staging' : 'heroku'} master" if config['deploy']
end

__END__

name: Heroku
description: Create Heroku application and instantly deploy.
author: mbleigh

requires: [git]
run_after: [git]
exclusive: deployment
category: deployment
tags: [provider]

config:
  - create:
      prompt: "Automatically create appname.heroku.com?"
      type: boolean
  - staging:
      prompt: "Create staging app? (appname-staging.heroku.com)"
      type: boolean
      if: create
  - domain:
      prompt: "Specify custom domain (or leave blank):"
      type: string
      if: create
  - deploy:
      prompt: "Deploy immediately?"
      type: boolean 
      if: create

Version data entries

53 entries across 53 versions & 6 rubygems

Version Path
appscrolls-0.11.2 scrolls/untested/heroku.rb
appscrolls-0.11.1 scrolls/untested/heroku.rb
appscrolls-0.11.0 scrolls/untested/heroku.rb
appscrolls-0.10.1 scrolls/untested/heroku.rb
appscrolls-0.10.0 scrolls/untested/heroku.rb
appscrolls-0.9.0 scrolls/untested/heroku.rb
appscrolls-0.8.4 scrolls/zzz/heroku.rb
appscrolls-0.8.3 scrolls/zzz/heroku.rb
appscrolls-0.8.2 scrolls/zzz/heroku.rb
appscrolls-0.8.1 scrolls/zzz/heroku.rb
appscrolls-0.8.0 scrolls/zzz/heroku.rb
appscrolls-0.7.1 scrolls/zzz/heroku.rb
appscrolls-0.7.0 scrolls/zzz/heroku.rb
eldarscrolls-0.7.0 scrolls/zzz/heroku.rb
ey_rails_wizard-0.6.0 scrolls/zzz/heroku.rb
ey_rails_wizard-0.5.0 scrolls/heroku.rb
ey_rails_wizard-0.4.0 scrolls/heroku.rb
ey_rails_wizard-0.3.1 recipes/heroku.rb
rails_apps_composer-1.0.26 recipes/heroku.rb
rails_apps_composer-1.0.25 recipes/heroku.rb