Class: Recipes::Heroku
- Inherits:
-
Rails::AppBuilder
- Object
- Rails::AppBuilder
- Recipes::Heroku
- Defined in:
- lib/potassium/recipes/heroku.rb
Constant Summary collapse
- NAME_PREFIX =
'pl'
- ENVIRONMENTS =
['staging', 'production']
- HEROKU_NAMES_MAX_CHARS =
30
Instance Method Summary collapse
Instance Method Details
#ask ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/potassium/recipes/heroku.rb', line 6 def ask heroku = answer(:heroku) do Ask.confirm("Are you going to deploy to heroku? (#{who_am_i})") end if heroku set(:heroku, heroku) ENVIRONMENTS.each { |environment| set_app_name_for(environment) } end end |
#create ⇒ Object
18 19 20 |
# File 'lib/potassium/recipes/heroku.rb', line 18 def create add_heroku if get(:heroku) end |
#install ⇒ Object
22 23 24 |
# File 'lib/potassium/recipes/heroku.rb', line 22 def install add_heroku end |
#installed? ⇒ Boolean
26 27 28 |
# File 'lib/potassium/recipes/heroku.rb', line 26 def installed? gem_exists?(/heroku-stage/) end |