class OurEelHacks::HerokuClient

Attributes

api[R]
logger[R]

Public Class Methods

new(logger, api_key) click to toggle source
# File lib/our-eel-hacks/heroku-client.rb, line 5
def initialize(logger, api_key)
  @logger = logger
  @api = Heroku::API.new(:api_key => api_key)
end

Public Instance Methods

ps(app_name) click to toggle source
# File lib/our-eel-hacks/heroku-client.rb, line 13
def ps(app_name)
  logger.info{ "Scaling Heroku API call: get ps #{app_name.inspect}" }
  api.get_ps(app_name).body
end
ps_scale(app_name, ps_type, count) click to toggle source
# File lib/our-eel-hacks/heroku-client.rb, line 18
def ps_scale(app_name, ps_type, count)
  logger.info{ "Scaling Heroku API call: post ps_scale #{[app_name, ps_type, count].inspect}" }
  api.post_ps_scale(app_name, ps_type, count)
end