Skip to content
Browse files

~ fix configurable

  • Loading branch information...
1 parent 109214f commit 9f97730bbc30da49b236a944c3b1df5963fe8783 Andrew Zinenko committed Aug 23, 2012
Showing with 5 additions and 5 deletions.
  1. +4 −4 lib/vk-ruby/secure.rb
  2. +1 −1 tests/helpers.rb
View
8 lib/vk-ruby/secure.rb
@@ -23,17 +23,17 @@ def initialize(params)
def authorize(auto_save = true)
params = {host: 'https://oauth.vk.com',
- client_id: self.app_id,
- client_secret: self.app_secret,
+ client_id: self.app_id,
+ client_secret: self.app_secret,
grant_type: :client_credentials,
verb: :get}
response = request("/access_token", params)
raise VK::AuthorizeException.new(response) if response.body['error']
- response.body['response'].each{|k,v| instance_variable_set(:"@#{k}", v) } if auto_save
+ response.body.each{|k,v| instance_variable_set(:"@#{k}", v) } if auto_save
- response.body['response']
+ response.body
end
end
View
2 tests/helpers.rb
@@ -35,7 +35,7 @@ def create_stubs!
stub_request(:get, /https:\/\/oauth.vk.com\/access_token/).to_return(lambda { |request|
{
- body: MultiJson.dump('response' => URI.parse(request.uri).query.to_params),
+ body: MultiJson.dump(URI.parse(request.uri).query.to_params),
headers: {"Content-Type" => 'application/json'}
}
})

0 comments on commit 9f97730

Please sign in to comment.
Something went wrong with that request. Please try again.