easy_auth-github 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3dc5abcd4624361ae111a06a5c7af059d77178e3
4
+ data.tar.gz: 260ea01341fc1de8fa7591cc08cfb1ccbd89d85d
5
+ SHA512:
6
+ metadata.gz: 043611073587fe72861c4fa057992ee6b2fe8f9cb12f9f8c7ae0a432dcab06473b14e17cd725335044ae59e58346373af497bab7d48afda829a339cb4dab6f5e
7
+ data.tar.gz: a38af94f4d28bd1a9c14cf2e885f91e15aa03b1167bb5c9bfca5ed7bf26da7930177a7afb7e3b9ba6132425bd41487c1f828578415e0422479932c1c078728db
@@ -1,3 +1,3 @@
1
1
  class Identities::Oauth2::Github < Identities::Oauth2::Base
2
- extend EasyAuth::Models::Identities::Oauth2::Github
2
+ include EasyAuth::Models::Identities::Oauth2::Github
3
3
  end
@@ -1,5 +1,5 @@
1
1
  module EasyAuth
2
2
  module Github
3
- VERSION = '0.1.2'
3
+ VERSION = '0.1.3'
4
4
  end
5
5
  end
@@ -1,19 +1,39 @@
1
+ require 'octokit'
2
+
1
3
  module EasyAuth::Models::Identities::Oauth2::Github
2
- def authorize_url
3
- 'https://github.com/login/oauth/authorize'
4
+ extend ActiveSupport::Concern
5
+
6
+ def client
7
+ @client ||= Octokit::Client.new(access_token: self.token)
4
8
  end
5
9
 
6
- private
10
+ module ClassMethods
11
+ def account_attributes_map
12
+ { :email => 'email', :username => 'login', :full_name => 'name', :avatar_url => 'avatar_url', :location => 'location' }
13
+ end
7
14
 
8
- def user_info_url
9
- '/user'
10
- end
15
+ def authorize_url
16
+ 'https://github.com/login/oauth/authorize'
17
+ end
11
18
 
12
- def token_url
13
- 'https://github.com/login/oauth/access_token'
14
- end
19
+ def oauth2_scope
20
+ 'user'
21
+ end
22
+
23
+ def account_attributes_url
24
+ '/user'
25
+ end
26
+
27
+ def token_url
28
+ 'https://github.com/login/oauth/access_token'
29
+ end
30
+
31
+ def site_url
32
+ 'https://api.github.com'
33
+ end
15
34
 
16
- def site_url
17
- 'https://api.github.com'
35
+ def retrieve_uid(account_attributes)
36
+ account_attributes['email']
37
+ end
18
38
  end
19
39
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_auth-github
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
5
- prerelease:
4
+ version: 0.1.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Brian Cardarella
@@ -10,214 +9,132 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2012-11-23 00:00:00.000000000 Z
12
+ date: 2014-03-11 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: easy_auth-oauth2
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
18
  - - ~>
21
19
  - !ruby/object:Gem::Version
22
- version: 0.1.0
20
+ version: 0.2.0
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
25
  - - ~>
29
26
  - !ruby/object:Gem::Version
30
- version: 0.1.0
27
+ version: 0.2.0
31
28
  - !ruby/object:Gem::Dependency
32
- name: sqlite3
29
+ name: octokit
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
- - - ! '>='
32
+ - - '>='
37
33
  - !ruby/object:Gem::Version
38
34
  version: '0'
39
- type: :development
35
+ type: :runtime
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
- - - ! '>='
39
+ - - '>='
45
40
  - !ruby/object:Gem::Version
46
41
  version: '0'
47
42
  - !ruby/object:Gem::Dependency
48
- name: rspec-rails
43
+ name: sqlite3
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
- - - ! '>='
46
+ - - '>='
53
47
  - !ruby/object:Gem::Version
54
48
  version: '0'
55
49
  type: :development
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
- - - ! '>='
53
+ - - '>='
61
54
  - !ruby/object:Gem::Version
62
55
  version: '0'
63
56
  - !ruby/object:Gem::Dependency
64
- name: capybara
57
+ name: rspec-rails
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
- - - ! '>='
60
+ - - '>='
69
61
  - !ruby/object:Gem::Version
70
62
  version: '0'
71
63
  type: :development
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
- - - ! '>='
67
+ - - '>='
77
68
  - !ruby/object:Gem::Version
78
69
  version: '0'
79
70
  - !ruby/object:Gem::Dependency
80
- name: vcr
71
+ name: capybara
81
72
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
73
  requirements:
84
- - - ! '>='
74
+ - - '>='
85
75
  - !ruby/object:Gem::Version
86
76
  version: '0'
87
77
  type: :development
88
78
  prerelease: false
89
79
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
80
  requirements:
92
- - - ! '>='
81
+ - - '>='
93
82
  - !ruby/object:Gem::Version
94
83
  version: '0'
95
84
  - !ruby/object:Gem::Dependency
96
- name: fakeweb
85
+ name: vcr
97
86
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
87
  requirements:
100
- - - ! '>='
88
+ - - '>='
101
89
  - !ruby/object:Gem::Version
102
90
  version: '0'
103
91
  type: :development
104
92
  prerelease: false
105
93
  version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
94
  requirements:
108
- - - ! '>='
95
+ - - '>='
109
96
  - !ruby/object:Gem::Version
110
97
  version: '0'
111
98
  - !ruby/object:Gem::Dependency
112
99
  name: poltergeist
113
100
  requirement: !ruby/object:Gem::Requirement
114
- none: false
115
101
  requirements:
116
- - - ! '>='
102
+ - - '>='
117
103
  - !ruby/object:Gem::Version
118
104
  version: '0'
119
105
  type: :development
120
106
  prerelease: false
121
107
  version_requirements: !ruby/object:Gem::Requirement
122
- none: false
123
108
  requirements:
124
- - - ! '>='
125
- - !ruby/object:Gem::Version
126
- version: '0'
127
- - !ruby/object:Gem::Dependency
128
- name: capybara-email
129
- requirement: !ruby/object:Gem::Requirement
130
- none: false
131
- requirements:
132
- - - ! '>='
133
- - !ruby/object:Gem::Version
134
- version: '0'
135
- type: :development
136
- prerelease: false
137
- version_requirements: !ruby/object:Gem::Requirement
138
- none: false
139
- requirements:
140
- - - ! '>='
109
+ - - '>='
141
110
  - !ruby/object:Gem::Version
142
111
  version: '0'
143
112
  - !ruby/object:Gem::Dependency
144
113
  name: database_cleaner
145
114
  requirement: !ruby/object:Gem::Requirement
146
- none: false
147
- requirements:
148
- - - ! '>='
149
- - !ruby/object:Gem::Version
150
- version: '0'
151
- type: :development
152
- prerelease: false
153
- version_requirements: !ruby/object:Gem::Requirement
154
- none: false
155
- requirements:
156
- - - ! '>='
157
- - !ruby/object:Gem::Version
158
- version: '0'
159
- - !ruby/object:Gem::Dependency
160
- name: factory_girl_rails
161
- requirement: !ruby/object:Gem::Requirement
162
- none: false
163
- requirements:
164
- - - ~>
165
- - !ruby/object:Gem::Version
166
- version: 1.7.0
167
- type: :development
168
- prerelease: false
169
- version_requirements: !ruby/object:Gem::Requirement
170
- none: false
171
- requirements:
172
- - - ~>
173
- - !ruby/object:Gem::Version
174
- version: 1.7.0
175
- - !ruby/object:Gem::Dependency
176
- name: factory_girl
177
- requirement: !ruby/object:Gem::Requirement
178
- none: false
179
- requirements:
180
- - - ~>
181
- - !ruby/object:Gem::Version
182
- version: 2.6.0
183
- type: :development
184
- prerelease: false
185
- version_requirements: !ruby/object:Gem::Requirement
186
- none: false
187
- requirements:
188
- - - ~>
189
- - !ruby/object:Gem::Version
190
- version: 2.6.0
191
- - !ruby/object:Gem::Dependency
192
- name: bourne
193
- requirement: !ruby/object:Gem::Requirement
194
- none: false
195
115
  requirements:
196
- - - ! '>='
116
+ - - '>='
197
117
  - !ruby/object:Gem::Version
198
118
  version: '0'
199
119
  type: :development
200
120
  prerelease: false
201
121
  version_requirements: !ruby/object:Gem::Requirement
202
- none: false
203
122
  requirements:
204
- - - ! '>='
123
+ - - '>='
205
124
  - !ruby/object:Gem::Version
206
125
  version: '0'
207
126
  - !ruby/object:Gem::Dependency
208
127
  name: launchy
209
128
  requirement: !ruby/object:Gem::Requirement
210
- none: false
211
129
  requirements:
212
- - - ! '>='
130
+ - - '>='
213
131
  - !ruby/object:Gem::Version
214
132
  version: '0'
215
133
  type: :development
216
134
  prerelease: false
217
135
  version_requirements: !ruby/object:Gem::Requirement
218
- none: false
219
136
  requirements:
220
- - - ! '>='
137
+ - - '>='
221
138
  - !ruby/object:Gem::Version
222
139
  version: '0'
223
140
  description: EasyAuth-Github
@@ -239,32 +156,25 @@ files:
239
156
  - README.md
240
157
  homepage: https://github.com/dockyard/easy_auth-github
241
158
  licenses: []
159
+ metadata: {}
242
160
  post_install_message:
243
161
  rdoc_options: []
244
162
  require_paths:
245
163
  - lib
246
164
  required_ruby_version: !ruby/object:Gem::Requirement
247
- none: false
248
165
  requirements:
249
- - - ! '>='
166
+ - - '>='
250
167
  - !ruby/object:Gem::Version
251
168
  version: '0'
252
- segments:
253
- - 0
254
- hash: -772145443901761509
255
169
  required_rubygems_version: !ruby/object:Gem::Requirement
256
- none: false
257
170
  requirements:
258
- - - ! '>='
171
+ - - '>='
259
172
  - !ruby/object:Gem::Version
260
173
  version: '0'
261
- segments:
262
- - 0
263
- hash: -772145443901761509
264
174
  requirements: []
265
175
  rubyforge_project:
266
- rubygems_version: 1.8.23
176
+ rubygems_version: 2.0.3
267
177
  signing_key:
268
- specification_version: 3
178
+ specification_version: 4
269
179
  summary: EasyAuth-Github
270
180
  test_files: []