1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Use gsub for Ruby 1.8.7 compatibility.

This commit is contained in:
Chris Hasenpflug 2012-02-06 15:58:01 -06:00
parent a5810fdbe9
commit e0ac5d44a0

View file

@ -80,7 +80,7 @@ module Fog
def request(params) def request(params)
params[:headers] ||= {} params[:headers] ||= {}
key = "#{@dnsimple_email}:#{@dnsimple_password}" key = "#{@dnsimple_email}:#{@dnsimple_password}"
params[:headers].merge!({ "Authorization" => "Basic " + Base64.strict_encode64(key).chomp, params[:headers].merge!({ "Authorization" => "Basic " + Base64.encode64(data).gsub("\n",''),
"Accept" => "application/json", "Accept" => "application/json",
"Content-Type" => "application/json" }) "Content-Type" => "application/json" })