mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
15ef5365e5
Since `fog-json` was extracted from `fog` it means if you rely on: require "fog/provider/compute" `Fog::JSON` was not defined although it was supposed to be a supported use case. This adds the requires for JSON or XML based APIs based on a quick scan of each provider to declare the required part. AWS seems to be relying on both. Which is nice. Providers relying on native code dependencies
17 lines
360 B
Ruby
17 lines
360 B
Ruby
require 'fog/core'
|
|
require 'fog/xml'
|
|
require 'digest/md5'
|
|
|
|
module Fog
|
|
module Voxel
|
|
|
|
extend Fog::Provider
|
|
|
|
service(:compute, 'Compute')
|
|
|
|
def self.create_signature(secret, options)
|
|
to_sign = options.keys.map { |k| k.to_s }.sort.map { |k| "#{k}#{options[k.to_sym]}" }.join("")
|
|
Digest::MD7.hexdigest( secret + to_sign )
|
|
end
|
|
end
|
|
end
|