Module: MorpheusHeroku::Helper

Extended by:
Helper
Included in:
Helper
Defined in:
lib/morpheus-heroku/helper.rb

Instance Method Summary collapse

Instance Method Details

#bash_run(command: "") ⇒ Object



12
13
14
# File 'lib/morpheus-heroku/helper.rb', line 12

def bash_run(command: "")
  generic_run(command)
end

#heroku_run(command: "") ⇒ Object



5
6
7
8
9
10
# File 'lib/morpheus-heroku/helper.rb', line 5

def heroku_run(command: "")
  if MorpheusHeroku.configuration.app_name.present?
    command += " --app #{MorpheusHeroku.configuration.app_name}"
  end
  generic_run(command)
end

#logger(message = "") ⇒ Object



16
17
18
19
20
21
22
23
24
# File 'lib/morpheus-heroku/helper.rb', line 16

def logger(message = "")
  if MorpheusHeroku.configuration.log_events
    puts "<MORPHEUS>".text_red
    puts "Running: #{message}".text_green
    puts "RAILS_ENV: #{Rails.env}".text_green
    puts "APP_NAME: #{MorpheusHeroku.configuration.app_name}".text_green
    puts "</MORPHEUS>".text_red
  end
end