Commit 12c904e8beb7fd6f9177a371cc5c5212fce832b5

Authored by Dan Croak
1 parent b84216e4

still finding the balance of how many commands to run, how much responsibility each command has

Showing 2 changed files with 17 additions and 16 deletions   Show diff stats
lib/tasks/heroku.rake
... ... @@ -25,7 +25,7 @@ namespace :heroku do
25 25 vars[:GOOGLE_ANALYTICS_TRACKER_ID] = ask_value('Google Analytics tracker id')
26 26 end
27 27  
28   - if ask_yn("Use Hoptoad to store production execptions?")
  28 + if ask_yn("Use Hoptoad for exception notifications?")
29 29 vars[:HOPTOAD_API_KEY] = ask_value('Hoptoad API key')
30 30 end
31 31  
... ... @@ -35,8 +35,20 @@ namespace :heroku do
35 35 end
36 36  
37 37 puts "Setting all config vars on Heroku app"
38   - vars_string = vars.map { |k,v| "#{k}='#{v}'" }.join(' ')
39   - `heroku config:add #{vars_string}`
  38 + if vars.any?
  39 + vars_string = vars.map { |k,v| "#{k}='#{v}'" }.join(' ')
  40 + `heroku config:add #{vars_string}`
  41 + end
  42 +
  43 + puts "Deploying..."
  44 + run "git push heroku master"
  45 + run "heroku rake db:migrate"
  46 +
  47 + puts "Opening app..."
  48 + run "heroku open"
  49 +
  50 + puts "Rename your app at any time with..."
  51 + puts "heroku rename newname"
40 52 end
41 53  
42 54 desc "Create a new app"
... ...
script/create_project
1 1 #!/usr/bin/env ruby
2 2 require File.dirname(__FILE__) + '/../config/boot'
3   -require File.join(File.dirname(__FILE__), "..", "lib", "tasks", "heroku.rake")
4 3 require 'rubygems'
5 4 require 'activesupport'
6 5 require 'pathname'
... ... @@ -55,20 +54,10 @@ end
55 54  
56 55 run("git commit -a -m 'New Heroku Suspenders app'")
57 56  
58   -run "rake heroku:setup"
59   -
60   -puts "Deploying..."
61   -run "git push heroku master"
62   -run "heroku rake db:migrate"
63   -
64   -puts "Opening app..."
65   -run "heroku open"
66   -
67 57 run("rake db:migrate RAILS_ENV=development")
68 58 run("rake db:migrate RAILS_ENV=test")
69 59 run("rake db:migrate RAILS_ENV=cucumber")
70   -run("rake")
71 60  
72   -puts "Rename your app at any time with:"
73   -puts "heroku rename newname"
  61 +puts "Next: run the tests, configure Heroku, deploy!"
  62 +puts "cd ../#{project_name} && rake && rake heroku:setup"
74 63  
... ...