omniauth-jawbone 0.0.34 → 0.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NjUzYWE1YzRjYzA4MDUyMWE1NGE4NmJmZjc4ZGMyNjllYTRiZjFiZQ==
5
+ data.tar.gz: !binary |-
6
+ MTJjZWI3MDIyOGNjNGU1NWJiZWMwYzRkOWRlOWNjMjgxYzZmY2IyMQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ OTg5MzU4M2Q1NjdjYjZkODY4NDE4YjU2Y2YxNzg2ZWU0ODFlZTM1NTEzMWU2
10
+ NDhhODI2ZTZmMmM5NDQyZDQ4NmJlMjI1MzA0OWQyMGI2YzRhMTdhNjMxZDIy
11
+ ZGViMTI0YmQ0YmI4YmMyZjdjNmI5OWIyMWI4NjVmNTNiZTI5MmQ=
12
+ data.tar.gz: !binary |-
13
+ N2I1MjcwMWNiMWIwNDY2YzViNjg5ZGExZjVkYzdjNjkyZjBmZDM1ZjJjMGY1
14
+ MmIyMzA0M2E0YjE2MjIwZGQ0NDA5NzdmMzUwMjQ0NzBkYTA4MDI3OTJjMzM5
15
+ ODdiZDFhOTUyMzU1M2I0ZjBlYTA4NjBiNzFiOTQ5MTI0YWUxMDc=
data/LICENSE.txt CHANGED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Ruthie Nachmany
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -6,56 +6,34 @@ require 'timeout'
6
6
  require 'securerandom'
7
7
  require 'omniauth-oauth2'
8
8
 
9
- module OmniAuth
10
- module Strategies
11
- # Authentication strategy for connecting with APIs constructed using
12
- # the [OAuth 2.0 Specification](http://tools.ietf.org/html/draft-ietf-oauth-v2-10).
13
- # You must generally register your application with the provider and
14
- # utilize an application id and secret in order to authenticate using
15
- # OAuth 2.0.
16
- class Jawbone
17
- include OmniAuth::Strategy
9
+ module OmniAuth #here I'm inheriting behaviors from the OmniAuth module
10
+ module Strategies #here I'm inheriting behaviors from the Omniauth::Strategies module
11
+ class Jawbone < OmniAuth::Strategies::OAuth2 #declaring a class for my new OmniAuth strategy
12
+ #include OmniAuth::Strategy
18
13
 
19
14
  option :client_options, {
20
15
  :site => 'https://jawbone.com',
21
16
  :authorize_url => '/auth/oauth2/auth',
17
+ :response_type => 'code',
18
+ :scope => 'basic_read' 'sleep_read',
22
19
  :token_url => '/auth/oauth2/token'
23
20
  }
24
-
25
- def request_phase
26
- super
27
- end
28
-
29
-
30
- def authorize_params
31
- super.tap do |params|
32
- %w[scope client_options].each do |v|
33
- if request.params[v]
34
- params[v.to_sym] = request.params[v]
35
- end
36
- end
37
- end
38
- end
39
21
 
40
- uid { raw_info['id'].to_s }
22
+ uid { raw_info['xid'].to_s }
41
23
 
42
24
  info do
43
25
  {
44
- 'xid' => raw_info['xid'],
26
+ 'id' => raw_info['xid'],
45
27
  'photo' => raw_info['photo'],
46
28
  'first_name' => raw_info['first'],
47
29
  'last_name' => raw_info['last'],
48
30
  }
49
31
  end
50
32
 
51
- extra do
52
- {:raw_info => raw_info}
53
- end
54
-
55
- def raw_info
56
- access_token.options[:mode] = :query
57
- @raw_info ||= access_token.get('user').parsed
58
- end
33
+ # def raw_info
34
+ # access_token.options[:mode] = :query
35
+ # @raw_info ||= access_token.get('user').parsed
36
+ # end
59
37
 
60
38
 
61
39
  def user_data
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Jawbone
3
- VERSION = "0.0.34"
3
+ VERSION = "0.0.42"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-jawbone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.34
5
- prerelease:
4
+ version: 0.0.42
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ruthie Nachmany
@@ -11,12 +10,11 @@ authors:
11
10
  autorequire:
12
11
  bindir: bin
13
12
  cert_chain: []
14
- date: 2013-08-15 00:00:00.000000000 Z
13
+ date: 2013-08-21 00:00:00.000000000 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: omniauth
18
17
  requirement: !ruby/object:Gem::Requirement
19
- none: false
20
18
  requirements:
21
19
  - - ~>
22
20
  - !ruby/object:Gem::Version
@@ -24,7 +22,6 @@ dependencies:
24
22
  type: :runtime
25
23
  prerelease: false
26
24
  version_requirements: !ruby/object:Gem::Requirement
27
- none: false
28
25
  requirements:
29
26
  - - ~>
30
27
  - !ruby/object:Gem::Version
@@ -32,7 +29,6 @@ dependencies:
32
29
  - !ruby/object:Gem::Dependency
33
30
  name: omniauth-oauth2
34
31
  requirement: !ruby/object:Gem::Requirement
35
- none: false
36
32
  requirements:
37
33
  - - ~>
38
34
  - !ruby/object:Gem::Version
@@ -40,7 +36,6 @@ dependencies:
40
36
  type: :runtime
41
37
  prerelease: false
42
38
  version_requirements: !ruby/object:Gem::Requirement
43
- none: false
44
39
  requirements:
45
40
  - - ~>
46
41
  - !ruby/object:Gem::Version
@@ -48,7 +43,6 @@ dependencies:
48
43
  - !ruby/object:Gem::Dependency
49
44
  name: rspec
50
45
  requirement: !ruby/object:Gem::Requirement
51
- none: false
52
46
  requirements:
53
47
  - - ~>
54
48
  - !ruby/object:Gem::Version
@@ -56,7 +50,6 @@ dependencies:
56
50
  type: :development
57
51
  prerelease: false
58
52
  version_requirements: !ruby/object:Gem::Requirement
59
- none: false
60
53
  requirements:
61
54
  - - ~>
62
55
  - !ruby/object:Gem::Version
@@ -64,7 +57,6 @@ dependencies:
64
57
  - !ruby/object:Gem::Dependency
65
58
  name: rack-test
66
59
  requirement: !ruby/object:Gem::Requirement
67
- none: false
68
60
  requirements:
69
61
  - - ! '>='
70
62
  - !ruby/object:Gem::Version
@@ -72,7 +64,6 @@ dependencies:
72
64
  type: :development
73
65
  prerelease: false
74
66
  version_requirements: !ruby/object:Gem::Requirement
75
- none: false
76
67
  requirements:
77
68
  - - ! '>='
78
69
  - !ruby/object:Gem::Version
@@ -80,7 +71,6 @@ dependencies:
80
71
  - !ruby/object:Gem::Dependency
81
72
  name: simplecov
82
73
  requirement: !ruby/object:Gem::Requirement
83
- none: false
84
74
  requirements:
85
75
  - - ! '>='
86
76
  - !ruby/object:Gem::Version
@@ -88,7 +78,6 @@ dependencies:
88
78
  type: :development
89
79
  prerelease: false
90
80
  version_requirements: !ruby/object:Gem::Requirement
91
- none: false
92
81
  requirements:
93
82
  - - ! '>='
94
83
  - !ruby/object:Gem::Version
@@ -96,7 +85,6 @@ dependencies:
96
85
  - !ruby/object:Gem::Dependency
97
86
  name: webmock
98
87
  requirement: !ruby/object:Gem::Requirement
99
- none: false
100
88
  requirements:
101
89
  - - ! '>='
102
90
  - !ruby/object:Gem::Version
@@ -104,7 +92,6 @@ dependencies:
104
92
  type: :development
105
93
  prerelease: false
106
94
  version_requirements: !ruby/object:Gem::Requirement
107
- none: false
108
95
  requirements:
109
96
  - - ! '>='
110
97
  - !ruby/object:Gem::Version
@@ -133,27 +120,26 @@ files:
133
120
  - spec/spec_helper.rb
134
121
  homepage: https://github.com/ruthienachmany/omniauth-jawbone
135
122
  licenses: []
123
+ metadata: {}
136
124
  post_install_message:
137
125
  rdoc_options: []
138
126
  require_paths:
139
127
  - lib
140
128
  required_ruby_version: !ruby/object:Gem::Requirement
141
- none: false
142
129
  requirements:
143
130
  - - ! '>='
144
131
  - !ruby/object:Gem::Version
145
132
  version: '0'
146
133
  required_rubygems_version: !ruby/object:Gem::Requirement
147
- none: false
148
134
  requirements:
149
135
  - - ! '>='
150
136
  - !ruby/object:Gem::Version
151
137
  version: '0'
152
138
  requirements: []
153
139
  rubyforge_project:
154
- rubygems_version: 1.8.25
140
+ rubygems_version: 2.0.7
155
141
  signing_key:
156
- specification_version: 3
142
+ specification_version: 4
157
143
  summary: OmniAuth strategy for Jawbone.
158
144
  test_files:
159
145
  - spec/omniauth/strategies/jawbone_spec.rb