Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
http instrumentor
Browse files Browse the repository at this point in the history
  • Loading branch information
dickeyxxx committed Dec 17, 2014
1 parent 7a0aa5d commit bb0ff9e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/heroku/auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def password # :nodoc:

def api_key(user=get_credentials[0], password=get_credentials[1])
@api ||= Heroku::API.new(default_params)
api_key = api.post_login(user, password).body["api_key"]
api_key = @api.post_login(user, password).body["api_key"]
@api = nil
api_key
rescue Heroku::API::Errors::Forbidden => e
Expand Down Expand Up @@ -216,10 +216,7 @@ def ask_for_credentials

def ask_for_second_factor
$stderr.print "Two-factor code: "
second_factor = ask
params = default_params
params[:headers].merge!("Heroku-Two-Factor-Code" => second_factor)
@api = Heroku::API.new(params)
@api.second_factor = ask
end

def preauth
Expand Down

0 comments on commit bb0ff9e

Please sign in to comment.