Class: Bently::HerokuRails

Inherits:
RailsRecipe show all
Defined in:
lib/bently/recipe/heroku-rails.rb

Constant Summary

Constants inherited from RubyRecipe

RubyRecipe::GEMFILE

Instance Method Summary collapse

Methods inherited from RailsRecipe

#generate, #migrate

Methods inherited from RubyRecipe

#bundle, #gem, #gem_group

Methods inherited from Recipe

#append, breakdown, category, #code, #create, description, homepage, #insert, #modify, #operate, #operations, #prepend, #remove, #requirement, #run, #say, title, #todo, #usage, version, #warn

Constructor Details

#initializeHerokuRails

Returns a new instance of HerokuRails.



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/bently/recipe/heroku-rails.rb', line 7

def initialize
  warn 'heroku commands may incur charges to your account'.upcase
  modify 'Gemfile', /gem 'sqlite3'/, ""
  gem 'pg'
  bundle

  run 'git add Gemfile Gemfile.lock'
  run 'git commit -m "postgres gem"'

  run 'heroku create'
  run 'git push heroku master'
  run 'heroku run rake db:migrate'
end