Class: Suspenders::Adapters::Heroku
- Inherits:
-
Object
- Object
- Suspenders::Adapters::Heroku
- Defined in:
- lib/suspenders/adapters/heroku.rb
Instance Method Summary collapse
-
#initialize(app_builder) ⇒ Heroku
constructor
A new instance of Heroku.
- #set_heroku_rails_secrets ⇒ Object
- #set_heroku_remotes ⇒ Object
- #set_up_heroku_specific_gems ⇒ Object
Constructor Details
#initialize(app_builder) ⇒ Heroku
Returns a new instance of Heroku.
4 5 6 |
# File 'lib/suspenders/adapters/heroku.rb', line 4 def initialize(app_builder) @app_builder = app_builder end |
Instance Method Details
#set_heroku_rails_secrets ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/suspenders/adapters/heroku.rb', line 28 def set_heroku_rails_secrets %w(staging production).each do |environment| run_toolbelt_command( "config:add SECRET_KEY_BASE=#{generate_secret}", environment, ) end end |
#set_heroku_remotes ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/suspenders/adapters/heroku.rb', line 8 def set_heroku_remotes remotes = <<-SHELL.strip_heredoc # Set up the staging and production apps. #{command_to_join_heroku_app('staging')} #{command_to_join_heroku_app('production')} git config heroku.remote staging SHELL app_builder.append_file "bin/setup", remotes end |
#set_up_heroku_specific_gems ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/suspenders/adapters/heroku.rb', line 20 def set_up_heroku_specific_gems app_builder.inject_into_file( "Gemfile", %{\n\s\sgem "rails_stdout_logging"}, after: /group :staging, :production do/, ) end |