mirror of
https://github.com/omniauth/omniauth.git
synced 2022-11-09 12:31:49 -05:00
changed from 'json' to 'multi_json' dependency so clients of Omniauth can use any JSON library they want
This commit is contained in:
parent
dd78895823
commit
b980b88ffc
6 changed files with 15 additions and 15 deletions
|
@ -1,10 +1,10 @@
|
|||
require 'omniauth/basic'
|
||||
require 'multi_json'
|
||||
|
||||
module OmniAuth
|
||||
module Strategies
|
||||
class Campfire < HttpBasic
|
||||
def initialize(app)
|
||||
require 'json'
|
||||
super(app, :campfire, nil)
|
||||
end
|
||||
|
||||
|
@ -17,7 +17,7 @@ module OmniAuth
|
|||
end
|
||||
|
||||
def auth_hash
|
||||
user_hash = JSON.parse(@response.body)['user']
|
||||
user_hash = MultiJson.decode(@response.body)['user']
|
||||
OmniAuth::Utils.deep_merge(super, {
|
||||
'uid' => user_hash['id'],
|
||||
'user_info' => user_info(user_hash),
|
||||
|
|
|
@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
|
|||
|
||||
gem.add_dependency 'oa-core', version
|
||||
gem.add_dependency 'rest-client', '~> 1.5.1'
|
||||
gem.add_dependency 'json', '~> 1.4.3'
|
||||
gem.add_dependency 'multi_json', '~> 0.0.2'
|
||||
gem.add_dependency 'nokogiri', '~> 1.4.2'
|
||||
|
||||
eval File.read(File.join(File.dirname(__FILE__), '../development_dependencies.rb'))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require 'json'
|
||||
require 'omniauth/oauth'
|
||||
require 'multi_json'
|
||||
|
||||
module OmniAuth
|
||||
module Strategies
|
||||
|
@ -21,7 +21,7 @@ module OmniAuth
|
|||
end
|
||||
|
||||
def user_data
|
||||
@data ||= JSON.parse(@access_token.get('/me'))
|
||||
@data ||= MultiJson.decode(@access_token.get('/me'))
|
||||
end
|
||||
|
||||
def request_phase(options = {})
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require 'json'
|
||||
require 'omniauth/oauth'
|
||||
require 'multi_json'
|
||||
|
||||
module OmniAuth
|
||||
module Strategies
|
||||
|
@ -12,7 +12,7 @@ module OmniAuth
|
|||
end
|
||||
|
||||
def user_data
|
||||
@data ||= JSON.parse(@access_token.get('/api/v2/json/user/show'))['user']
|
||||
@data ||= MultiJson.decode(@access_token.get('/api/v2/json/user/show'))['user']
|
||||
end
|
||||
|
||||
def user_info
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require 'json'
|
||||
require 'omniauth/oauth'
|
||||
require 'multi_json'
|
||||
|
||||
module OmniAuth
|
||||
module Strategies
|
||||
|
@ -40,7 +40,7 @@ module OmniAuth
|
|||
end
|
||||
|
||||
def user_hash
|
||||
@user_hash ||= JSON.parse(@access_token.get('/1/account/verify_credentials.json').body)
|
||||
@user_hash ||= MultiJson.decode(@access_token.get('/1/account/verify_credentials.json').body)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -13,12 +13,12 @@ Gem::Specification.new do |gem|
|
|||
|
||||
gem.files = Dir.glob("{lib}/**/*") + %w(README.rdoc LICENSE.rdoc CHANGELOG.rdoc)
|
||||
|
||||
gem.add_dependency 'oa-core', version
|
||||
gem.add_dependency 'rack', '~> 1.1.0'
|
||||
gem.add_dependency 'json', '~> 1.4.3'
|
||||
gem.add_dependency 'nokogiri', '~> 1.4.2'
|
||||
gem.add_dependency 'oauth', '~> 0.4.0'
|
||||
gem.add_dependency 'oauth2', '~> 0.0.8'
|
||||
gem.add_dependency 'oa-core', version
|
||||
gem.add_dependency 'rack', '~> 1.1.0'
|
||||
gem.add_dependency 'multi_json', '~> 0.0.2'
|
||||
gem.add_dependency 'nokogiri', '~> 1.4.2'
|
||||
gem.add_dependency 'oauth', '~> 0.4.0'
|
||||
gem.add_dependency 'oauth2', '~> 0.0.8'
|
||||
|
||||
eval File.read(File.join(File.dirname(__FILE__), '../development_dependencies.rb'))
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue