From e0ac5d44a0520ebb31cd8cd274a95cff0fa7a357 Mon Sep 17 00:00:00 2001 From: Chris Hasenpflug Date: Mon, 6 Feb 2012 15:58:01 -0600 Subject: [PATCH] Use gsub for Ruby 1.8.7 compatibility. --- lib/fog/dnsimple/dns.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fog/dnsimple/dns.rb b/lib/fog/dnsimple/dns.rb index 6eb00cd2a..498753ef9 100644 --- a/lib/fog/dnsimple/dns.rb +++ b/lib/fog/dnsimple/dns.rb @@ -80,7 +80,7 @@ module Fog def request(params) params[:headers] ||= {} 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", "Content-Type" => "application/json" })