omniauth-clio 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  require 'omniauth-oauth2'
2
- # require 'multi_json'
2
+ require 'multi_json'
3
3
 
4
4
  module OmniAuth
5
5
  module Strategies
@@ -12,6 +12,8 @@ module OmniAuth
12
12
  :token_url => '/oauth/access_token'
13
13
  }
14
14
 
15
+ uid { raw_info['id']}
16
+
15
17
  def authorize_params
16
18
  super.tap do |params|
17
19
  params[:response_type] = "code"
@@ -42,7 +44,7 @@ module OmniAuth
42
44
  def raw_info
43
45
  access_token.options[:mode] = :query
44
46
  access_token.options[:param_name] = :access_token
45
- @raw_info ||= access_token.get('https://app.goclio.com/api/v1/users/who_am_i').parsed
47
+ @raw_info ||= MultiJson.load(access_token.get('https://app.goclio.com/api/v1/users/who_am_i').body)
46
48
  end
47
49
  end
48
50
  end
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Clio
3
- VERSION = "0.0.14"
3
+ VERSION = "0.0.15"
4
4
  end
5
5
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
19
  s.require_paths = ["lib"]
20
20
 
21
- # s.add_dependency 'multi_json', '~> 1.3'
21
+ s.add_dependency 'multi_json', '~> 1.3'
22
22
  s.add_runtime_dependency 'omniauth-oauth2', '~> 1.0'
23
23
  s.add_development_dependency 'rspec', '~> 2.7'
24
24
  s.add_development_dependency 'rack-test'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-clio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,6 +11,22 @@ bindir: bin
11
11
  cert_chain: []
12
12
  date: 2012-09-09 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: multi_json
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '1.3'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '1.3'
14
30
  - !ruby/object:Gem::Dependency
15
31
  name: omniauth-oauth2
16
32
  requirement: !ruby/object:Gem::Requirement