Class: Recipes::Heroku
- Inherits:
-
Rails::AppBuilder
- Object
- Rails::AppBuilder
- Recipes::Heroku
- Defined in:
- lib/potassium/recipes/heroku.rb
Constant Summary collapse
- NAME_PREFIX =
'pl'
Instance Attribute Summary collapse
-
#app_name_staging ⇒ Object
Returns the value of attribute app_name_staging.
Instance Method Summary collapse
- #ask ⇒ Object
- #create ⇒ Object
-
#initialize(args) ⇒ Heroku
constructor
A new instance of Heroku.
- #install ⇒ Object
- #installed? ⇒ Boolean
Constructor Details
#initialize(args) ⇒ Heroku
Returns a new instance of Heroku.
6 7 8 9 10 |
# File 'lib/potassium/recipes/heroku.rb', line 6 def initialize(args) super(args) set(:heroku_app_name_staging, app_name_for('staging')) set(:heroku_app_name_production, app_name_for('production')) end |
Instance Attribute Details
#app_name_staging ⇒ Object
Returns the value of attribute app_name_staging.
4 5 6 |
# File 'lib/potassium/recipes/heroku.rb', line 4 def app_name_staging @app_name_staging end |
Instance Method Details
#ask ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/potassium/recipes/heroku.rb', line 12 def ask heroku = answer(:heroku) do Ask.confirm("Are you going to deploy to heroku? (#{who_am_i})") end if heroku set(:heroku, heroku) end end |
#create ⇒ Object
22 23 24 |
# File 'lib/potassium/recipes/heroku.rb', line 22 def create add_heroku if get(:heroku) end |
#install ⇒ Object
26 27 28 |
# File 'lib/potassium/recipes/heroku.rb', line 26 def install add_heroku end |
#installed? ⇒ Boolean
30 31 32 |
# File 'lib/potassium/recipes/heroku.rb', line 30 def installed? gem_exists?(/rails_stdout_logging/) end |