[slicehost] fix password encoding

This commit is contained in:
geemus (Wesley Beary) 2010-03-27 18:31:46 -07:00
parent 1761fc53f8
commit 7746761043
2 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ module Fog
def request(params)
@connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}")
headers = {
'Authorization' => "Basic #{Base64.encode64(@slicehost_password).chomp!}"
'Authorization' => "Basic #{Base64.encode64(@slicehost_password).delete("\r\n")}"
}
case params[:method]
when 'DELETE', 'GET', 'HEAD'

View File

@ -11,7 +11,7 @@ describe 'Slicehost.create_slice' do
it "should return proper attributes" do
# flavor_id 1: 256 ram, image_id 3: Gentoo 2008.0
actual = Slicehost[:slices].create_slice(1, 3, 'fog_create_slice').body
actual = Slicehost[:slices].create_slice(1, 3, 'fog_create_slice').body
actual['addresses'].should be_a(Array)
# actual['backup-id'].should be_an(Integer)
actual['bw-in'].should be_an(Float)