diff --git a/lib/fog/core/json.rb b/lib/fog/core/json.rb index 9c9162803..4399a06d5 100644 --- a/lib/fog/core/json.rb +++ b/lib/fog/core/json.rb @@ -43,4 +43,4 @@ module Fog end -end \ No newline at end of file +end diff --git a/lib/fog/openstack.rb b/lib/fog/openstack.rb index decc40c30..88814eea6 100644 --- a/lib/fog/openstack.rb +++ b/lib/fog/openstack.rb @@ -115,7 +115,7 @@ module Fog :method => 'GET' }) - body = MultiJson.decode(response.body) + body = Fog::JSON.decode(response.body) req_body['auth']['tenantName'] = body['tenants'].first['name'] end @@ -147,7 +147,7 @@ module Fog response = connection.request({ :expects => [200, 204], :headers => {'Content-Type' => 'application/json'}, - :body => Fog::JSON.encode(req_body), + :body => Fog::JSON.encode(request_body), :host => uri.host, :method => 'POST', :path => (uri.path and not uri.path.empty?) ? uri.path : 'v2.0' diff --git a/lib/fog/openstack/identity.rb b/lib/fog/openstack/identity.rb index c643008ac..a0cd6b951 100644 --- a/lib/fog/openstack/identity.rb +++ b/lib/fog/openstack/identity.rb @@ -69,7 +69,6 @@ module Fog end def initialize(options={}) - require 'multi_json' @openstack_username = options[:openstack_username] @data ||= { :users => {}} @@ -107,8 +106,6 @@ module Fog attr_reader :current_tenant def initialize(options={}) - require 'multi_json' - @openstack_auth_token = options[:openstack_auth_token] unless @openstack_auth_token