Permalink
Browse files

Client now uses the Heroku API key for Auth

The new way to auto the heroic client is this way.
  • Loading branch information...
davidakachaos committed Sep 24, 2012
1 parent 9c649c4 commit 0e6f56c92b3c3097084e8214146d7fc8b3034917
Showing with 3 additions and 9 deletions.
  1. +2 −8 lib/workless/scaler.rb
  2. +1 −1 lib/workless/scalers/base.rb
View
@@ -19,14 +19,8 @@ def self.included(base)
module ClassMethods
def scaler
- @scaler ||= if ENV.include?("HEROKU_USER")
- client = ::Heroku::Client.new(ENV['HEROKU_USER'], ENV['HEROKU_PASSWORD'])
- case client.info(ENV["APP_NAME"])[:stack]
- when "cedar"
- Scaler::HerokuCedar
- else
- Scaler::Heroku
- end
+ @scaler ||= if ENV.include?("HEROKU_APIKEY")
+ Scaler::HerokuCedar
else
Scaler::Local
end
@@ -13,7 +13,7 @@ def self.jobs
module HerokuClient
def client
- @client ||= ::Heroku::Client.new(ENV['HEROKU_USER'], ENV['HEROKU_PASSWORD'])
+ @client ||= ::Heroku::API.new(:api_key => ENV['HEROKU_APIKEY'])
end
end

0 comments on commit 0e6f56c

Please sign in to comment.