mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[cloudstack] Fix warning in ruby 1.8.7
This commit is contained in:
parent
e0762ccaa8
commit
850bd6d0f2
1 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,7 @@ module Fog
|
||||||
|
|
||||||
service(:compute, 'cloudstack/compute','Compute')
|
service(:compute, 'cloudstack/compute','Compute')
|
||||||
|
|
||||||
DIGEST = OpenSSL::Digest::Digest.new('sha1')
|
@@digest = OpenSSL::Digest::Digest.new('sha1')
|
||||||
|
|
||||||
def self.escape(string)
|
def self.escape(string)
|
||||||
string = CGI::escape(string)
|
string = CGI::escape(string)
|
||||||
|
@ -19,7 +19,7 @@ module Fog
|
||||||
def self.signed_params(key,params)
|
def self.signed_params(key,params)
|
||||||
query = params.to_a.sort.collect{|c| "#{c[0]}=#{escape(c[1].to_s)}"}.join('&').downcase
|
query = params.to_a.sort.collect{|c| "#{c[0]}=#{escape(c[1].to_s)}"}.join('&').downcase
|
||||||
|
|
||||||
signed_string = Base64.encode64(OpenSSL::HMAC.digest(DIGEST,key,query)).strip
|
signed_string = Base64.encode64(OpenSSL::HMAC.digest(@@digest,key,query)).strip
|
||||||
|
|
||||||
signed_string
|
signed_string
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue