omniauth-jawbone 0.0.44 → 1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Zjk1MjY2ZDE4MGU4Y2FmMGNhMjhiMmYzOTI5NTU5NWEwM2RiZWNkOQ==
4
+ ZDhiZjU1OGVjN2FhYmY5MjgwODhmNGZiNGU5YTFkMTQ3ZDEwYmRjNw==
5
5
  data.tar.gz: !binary |-
6
- YzQ2YTMyMGI3MDU3MGFlOGJhNDg2ZDZiZGVkMjU1NmUxOGQ1NzZlZg==
6
+ NDFkN2JhNGM1M2NkZjg4YjJlODU2OTExYWFmYjM3Y2YwNjExNzMzOQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MGRjMmQyOGQ5ZDdiYmVjMTE3MmVkOTc3NTUzNDdhMTIwZDFjNjM2OWU3M2E5
10
- ZGZkZDRmYjNjZTU2YTQyYzljOGE5ODg3ZWM5OTZlZDM2ZDNjZGM0ZTk0Yzk1
11
- Yjk3NGUyZDVkN2Q5N2UwZjUzZDdiYzhkMGMzYjU5ZmVlMjFhMDg=
9
+ MGU3N2FmYjQ2N2Q2OTZjNDg5MWVhNzVlMGZkMzE3NGVkOTA3NjUzZTEyMzNi
10
+ YzMyZTI5NjcyNDZkZjdkYjU2YTdiYjgxYjE4YjE1NTg2NmQ3ZmE3Y2ZlOWU2
11
+ Zjc3NDJhMWZmYzllYjVjYThkOGY3NmM3Y2YyNmRkYTk5NzY2YTA=
12
12
  data.tar.gz: !binary |-
13
- Y2U2ZWM4MDZhYmZmMjVlZWFkYzk3NzY5ODg1OTU3MmVlNmIyYjVkOTliNmVk
14
- ODZmZGMzZDdhZTY2NzU2M2M1MDk5ODdjMDE5MjhmNWZmNzZlZTg5ZDU3Nzc1
15
- NWE5ZjM3ZTcwYTU3MzRjZjU2MGJhOGQxMjlmYjQ2OTk2ZThiNDc=
13
+ N2IzMWRhNzUwZTAyZmFhNmY1OTg5ZDVjNWE2MzkwMzg4NmY2M2VmYmE3MDMx
14
+ ZjEzN2U1YmM1MGQ0NmU3N2FjODIxZWZmOTVlZjA3NjhlYWVkYjcwNzEzZDhm
15
+ MDI0ZTc5Y2QxNGEzMjQ0N2U3ZTFlN2MwZTJmMjEzOTE5OTU4NmE=
data/README.md CHANGED
@@ -1,26 +1,19 @@
1
1
  # OmniAuth Jawbone
2
2
 
3
- This is the unofficial OmniAuth strategy for authenticating to Jawbone. To
4
- use it, you'll need to sign up for an OAuth2 Application ID and Secret
5
- once Jawbone releases their public API.
3
+ Updated 2013.09.19 to work with the officially released Jawbone API.
4
+
5
+ This is an OmniAuth strategy for authenticating to Jawbone. To
6
+ use it, you'll need to [sign up](https://jawbone.com/up/developer) for an OAuth2 Application ID and Secret.
6
7
 
7
8
  ## Basic Usage
8
9
 
9
10
  use OmniAuth::Builder do
10
- provider :jawbone, ENV['JAWBONE_CLIENT_ID'], ENV['JAWBONE_CLIENT_SECRET']
11
+ provider :jawbone,
12
+ ENV['JAWBONE_CLIENT_ID'],
13
+ ENV['JAWBONE_CLIENT_SECRET'],
14
+ :scope => "basic_read mood_read"
11
15
  end
12
16
 
13
- ## License
14
-
15
- Copyright (c) 2011 Jacques Crocker
16
-
17
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
18
-
19
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
20
-
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
-
23
-
24
17
  ## Original License
25
18
 
26
19
  Copyright (c) 2011 Michael Bleigh and Intridea, Inc.
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Jawbone
3
- VERSION = "0.0.44"
3
+ VERSION = "1.0"
4
4
  end
5
5
  end
@@ -18,23 +18,28 @@ module OmniAuth
18
18
  :token_url => '/auth/oauth2/token'
19
19
  }
20
20
 
21
- uid { raw_info['xid'].to_s }
21
+ uid { raw_info['data']['xid'].to_s }
22
22
 
23
23
  info do
24
24
  {
25
- 'id' => raw_info['xid'],
26
- 'photo' => raw_info['photo'],
27
- 'first_name' => raw_info['first'],
28
- 'last_name' => raw_info['last'],
25
+ 'id' => raw_info['data']['xid'],
26
+ 'photo' => raw_info['data']['image'],
27
+ 'first_name' => raw_info['data']['first'],
28
+ 'last_name' => raw_info['data']['last'],
29
29
  }
30
30
  end
31
31
 
32
-
33
32
  def user_data
34
33
  access_token.options[:mode] = :query
35
34
  user_data ||= access_token.get('/nudge/api/users/@me').parsed
36
35
  end
37
36
 
37
+ def raw_info
38
+ @raw_info ||= MultiJson.load(access_token.get('/nudge/api/users/@me').body)
39
+ rescue ::Errno::ETIMEDOUT
40
+ raise ::Timeout::Error
41
+ end
42
+
38
43
  end
39
44
  end
40
45
  end
@@ -6,7 +6,6 @@ Gem::Specification.new do |gem|
6
6
  gem.email = ["ruthie.nachmany@flatironschool.com", "maxwell.jacobson@flatironschool.com", "sarah.duve@flatironschool.com"]
7
7
  gem.description = %q{OmniAuth strategy for Jawbone.}
8
8
  gem.summary = %q{OmniAuth strategy for Jawbone.}
9
- gem.license = "MIT"
10
9
  gem.homepage = "https://github.com/ruthienachmany/omniauth-jawbone"
11
10
 
12
11
  gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-jawbone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.44
4
+ version: '1.0'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruthie Nachmany
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-08-21 00:00:00.000000000 Z
13
+ date: 2013-09-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: omniauth
@@ -118,8 +118,7 @@ files:
118
118
  - spec/omniauth/strategies/jawbone_spec.rb
119
119
  - spec/spec_helper.rb
120
120
  homepage: https://github.com/ruthienachmany/omniauth-jawbone
121
- licenses:
122
- - MIT
121
+ licenses: []
123
122
  metadata: {}
124
123
  post_install_message:
125
124
  rdoc_options: []