warden-github 0.12.1 → 0.13.0

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.
@@ -0,0 +1,5 @@
1
+ module Warden
2
+ module GitHub
3
+ VERSION = "0.13.0"
4
+ end
5
+ end
@@ -0,0 +1,42 @@
1
+ {
2
+ "public_repos": 14,
3
+ "company": "Foobar, Inc.",
4
+ "type": "User",
5
+ "url": "https:\/\/api.github.com\/users\/john",
6
+ "received_events_url": "https:\/\/api.github.com\/users\/john\/received_events",
7
+ "login": "john",
8
+ "updated_at": "2013-02-03T18:50:08Z",
9
+ "avatar_url": "https:\/\/secure.gravatar.com\/avatar\/38581cb351a52002548f40f8066cfecf?d=https:\/\/a248.e.akamai.net\/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
10
+ "collaborators": 0,
11
+ "public_gists": 8,
12
+ "hireable": false,
13
+ "events_url": "https:\/\/api.github.com\/users\/john\/events{\/privacy}",
14
+ "organizations_url": "https:\/\/api.github.com\/users\/john\/orgs",
15
+ "total_private_repos": 0,
16
+ "gists_url": "https:\/\/api.github.com\/users\/john\/gists{\/gist_id}",
17
+ "private_gists": 9,
18
+ "followers": 15,
19
+ "following": 35,
20
+ "created_at": "2009-09-17T14:12:20Z",
21
+ "bio": "Just a simple test user",
22
+ "owned_private_repos": 0,
23
+ "location": "Bay Area",
24
+ "starred_url": "https:\/\/api.github.com\/users\/john\/starred{\/owner}{\/repo}",
25
+ "gravatar_id": "38581cb351a52002548f40f8066cfecf",
26
+ "name": "John Doe",
27
+ "blog": "http:\/\/johndoe.com/",
28
+ "disk_usage": 10361,
29
+ "html_url": "https:\/\/github.com\/john",
30
+ "followers_url": "https:\/\/api.github.com\/users\/john\/followers",
31
+ "id": 1234,
32
+ "plan": {
33
+ "collaborators": 1,
34
+ "space": 614400,
35
+ "name": "micro",
36
+ "private_repos": 5
37
+ },
38
+ "email": "me@johndoe.com",
39
+ "repos_url": "https:\/\/api.github.com\/users\/john\/repos",
40
+ "subscriptions_url": "https:\/\/api.github.com\/users\/john\/subscriptions",
41
+ "following_url": "https:\/\/api.github.com\/users\/john\/following"
42
+ }
@@ -0,0 +1,131 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'OAuth' do
4
+ let(:code) { '1234' }
5
+
6
+ def stub_code_for_token_exchange(answer='access_token=the_token')
7
+ stub_request(:post, 'https://github.com/login/oauth/access_token').
8
+ with(:body => hash_including(:code => code)).
9
+ to_return(:status => 200, :body => answer)
10
+ end
11
+
12
+ def stub_user_retrieval
13
+ stub_request(:get, 'https://api.github.com/user').
14
+ with(:headers => { 'Authorization' => 'token the_token' }).
15
+ to_return(
16
+ :status => 200,
17
+ :body => File.read('spec/fixtures/user.json'),
18
+ :headers => { 'Content-Type' => 'application/json; charset=utf-8' })
19
+ end
20
+
21
+ def redirect_uri(response)
22
+ Addressable::URI.parse(response.headers['Location'])
23
+ end
24
+
25
+ context 'when accessing a protected url' do
26
+ it 'redirects to GitHub for authentication' do
27
+ unauthenticated_response = get '/profile'
28
+ github_uri = redirect_uri(unauthenticated_response)
29
+
30
+ github_uri.scheme.should eq 'https'
31
+ github_uri.host.should eq 'github.com'
32
+ github_uri.path.should eq '/login/oauth/authorize'
33
+ github_uri.query_values['client_id'].should =~ /\w+/
34
+ github_uri.query_values['state'].should =~ /\w+/
35
+ github_uri.query_values['redirect_uri'].should =~ /^http.*\/profile$/
36
+ end
37
+ end
38
+
39
+ context 'when redirected back from GitHub' do
40
+ it 'exchanges the code for an access token' do
41
+ stub_code_for_token_exchange
42
+ stub_user_retrieval
43
+
44
+ unauthenticated_response = get '/login'
45
+ github_uri = redirect_uri(unauthenticated_response)
46
+ state = github_uri.query_values['state']
47
+
48
+ get "/login?code=#{code}&state=#{state}"
49
+ end
50
+
51
+ context 'and the returned state does not match the initial state' do
52
+ it 'fails authentication' do
53
+ get '/login'
54
+ response = get "/login?code=#{code}&state=foobar"
55
+
56
+ response.should_not be_successful
57
+ response.body.should include 'State mismatch'
58
+ end
59
+ end
60
+
61
+ context 'and GitHub rejects the code while exchanging it for an access token' do
62
+ it 'fails authentication' do
63
+ stub_code_for_token_exchange('error=bad_verification_code')
64
+
65
+ unauthenticated_response = get '/login'
66
+ github_uri = redirect_uri(unauthenticated_response)
67
+ state = github_uri.query_values['state']
68
+ response = get "/login?code=#{code}&state=#{state}"
69
+
70
+ response.should_not be_successful
71
+ response.body.should include 'Bad verification code'
72
+ end
73
+ end
74
+
75
+ context 'and the user denied access' do
76
+ it 'fails authentication' do
77
+ unauthenticated_response = get '/login'
78
+ github_uri = redirect_uri(unauthenticated_response)
79
+ state = github_uri.query_values['state']
80
+ response = get "/login?error=access_denied&state=#{state}"
81
+
82
+ response.should_not be_successful
83
+ response.body.should include 'access denied'
84
+ end
85
+ end
86
+
87
+ context 'and code was exchanged for an access token' do
88
+ it 'redirects back to the original path' do
89
+ stub_code_for_token_exchange
90
+ stub_user_retrieval
91
+
92
+ unauthenticated_response = get '/profile?foo=bar'
93
+ github_uri = redirect_uri(unauthenticated_response)
94
+ state = github_uri.query_values['state']
95
+
96
+ callback_response = get "/profile?code=#{code}&state=#{state}"
97
+ authenticated_uri = redirect_uri(callback_response)
98
+
99
+ authenticated_uri.path.should eq '/profile'
100
+ authenticated_uri.query.should eq 'foo=bar'
101
+ end
102
+ end
103
+ end
104
+
105
+ context 'when not inside OAuth flow' do
106
+ it 'does not recognize a seeming callback url as an actual callback' do
107
+ response = get '/profile?state=foo&code=bar'
108
+
109
+ a_request(:post, 'https://github.com/login/oauth/access_token').
110
+ should have_not_been_made
111
+ end
112
+ end
113
+
114
+ context 'when already authenticated' do
115
+ it 'does not perform the OAuth flow again' do
116
+ stub_code_for_token_exchange
117
+ stub_user_retrieval
118
+
119
+ unauthenticated_response = get '/login'
120
+ github_uri = redirect_uri(unauthenticated_response)
121
+ state = github_uri.query_values['state']
122
+
123
+ callback_response = get "/login?code=#{code}&state=#{state}"
124
+ authenticated_uri = redirect_uri(callback_response)
125
+ get authenticated_uri.path
126
+ logged_in_response = get '/login'
127
+
128
+ redirect_uri(logged_in_response).path.should eq '/'
129
+ end
130
+ end
131
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,11 +1,16 @@
1
- Bundler.require(:default, :runtime, :test)
1
+ require 'simplecov'
2
+ SimpleCov.start do
3
+ add_filter '/spec'
4
+ add_filter '/example'
5
+ end
2
6
 
3
- require File.join(File.dirname(__FILE__), '..', 'lib', 'warden-github')
4
- require File.join(File.dirname(__FILE__), 'app')
7
+ require 'warden/github'
8
+ require File.expand_path('../../example/app', __FILE__)
5
9
  require 'rack/test'
6
10
  require 'webrat'
7
11
  require 'addressable/uri'
8
12
  require 'pp'
13
+ require 'webmock/rspec'
9
14
 
10
15
  Webrat.configure do |config|
11
16
  config.mode = :rack
@@ -0,0 +1,68 @@
1
+ require 'spec_helper'
2
+
3
+ describe Warden::GitHub::OAuth do
4
+ let(:default_attrs) do
5
+ { :state => 'abc',
6
+ :client_id => 'foo',
7
+ :client_secret => 'bar',
8
+ :redirect_uri => 'http://example.com/callback' }
9
+ end
10
+
11
+ def oauth(attrs=default_attrs)
12
+ described_class.new(attrs)
13
+ end
14
+
15
+ describe '#authorize_uri' do
16
+ it 'contains the base uri' do
17
+ oauth.authorize_uri.to_s.should \
18
+ include Octokit::Configuration::DEFAULT_WEB_ENDPOINT
19
+ end
20
+
21
+ %w[ client_id state redirect_uri ].each do |name|
22
+ it "contains the correct #{name} param" do
23
+ uri = Addressable::URI.parse(oauth.authorize_uri)
24
+
25
+ uri.query_values[name].should eq default_attrs[name.to_sym]
26
+ end
27
+ end
28
+
29
+ { :nil => nil, :empty => '' }.each do |desc, value|
30
+ it "does not contain the scope param if #{desc}" do
31
+ uri = oauth(default_attrs.merge(:scope => value)).authorize_uri
32
+
33
+ uri.to_s.should_not include 'scope'
34
+ end
35
+ end
36
+ end
37
+
38
+ describe '#access_token' do
39
+ def expect_request(attrs={})
40
+ stub_request(:post, %r{\/login\/oauth\/access_token$}).
41
+ with(:body => hash_including(attrs.fetch(:params, {}))).
42
+ to_return(:status => 200,
43
+ :body => attrs.fetch(:answer, 'access_token=foobar'))
44
+ end
45
+
46
+ it 'exchanges the code for an access token' do
47
+ expect_request(:answer => 'access_token=the_token&token_type=bearer')
48
+
49
+ oauth.access_token.should eq 'the_token'
50
+ end
51
+
52
+ it 'raises BadVerificationCode if no access token is returned' do
53
+ expect_request(:answer => 'error=bad_verification_code')
54
+
55
+ expect { oauth.access_token }.
56
+ to raise_error(described_class::BadVerificationCode)
57
+ end
58
+
59
+ %w[ client_id client_secret code ].each do |name|
60
+ it "performs a request containing the correct #{name} param" do
61
+ oauth(default_attrs.merge(:code => 'the_code')).tap do |o|
62
+ expect_request(:params => { name => o.send(name) })
63
+ o.access_token
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,112 @@
1
+ require 'spec_helper'
2
+
3
+ describe Warden::GitHub::User do
4
+ let(:default_attrs) do
5
+ { 'login' => 'john',
6
+ 'name' => 'John Doe',
7
+ 'gravatar_id' => '38581cb351a52002548f40f8066cfecg',
8
+ 'email' => 'john@doe.com',
9
+ 'company' => 'Doe, Inc.' }
10
+ end
11
+ let(:token) { 'the_token' }
12
+
13
+ let(:user) do
14
+ described_class.new(default_attrs, token)
15
+ end
16
+
17
+ describe '#token' do
18
+ it 'returns the token' do
19
+ user.token.should eq token
20
+ end
21
+ end
22
+
23
+ %w[login name gravatar_id email company].each do |name|
24
+ describe "##{name}" do
25
+ it "returns the #{name}" do
26
+ user.send(name).should eq default_attrs[name]
27
+ end
28
+ end
29
+ end
30
+
31
+ describe '#api' do
32
+ it 'returns a preconfigured Octokit client for the user' do
33
+ api = user.api
34
+
35
+ api.should be_an Octokit::Client
36
+ api.login.should eq user.login
37
+ api.oauth_token.should eq user.token
38
+ end
39
+ end
40
+
41
+ def stub_api(user, method, args, ret)
42
+ api = double
43
+ user.stub(:api => api)
44
+ api.should_receive(method).with(*args).and_return(ret)
45
+ end
46
+
47
+ [:organization_public_member?, :organization_member?].each do |method|
48
+ describe "##{method}" do
49
+ it 'asks the api for the member status' do
50
+ status = double
51
+ stub_api(user, method, ['rails', user.login], status)
52
+
53
+ user.send(method, 'rails').should be status
54
+ end
55
+ end
56
+ end
57
+
58
+ describe '#team_member?' do
59
+ it 'asks the api for team members' do
60
+ status = double
61
+ stub_api(user, :team_members, [123], false)
62
+
63
+ user.team_member?(123)
64
+ end
65
+
66
+ context 'when user is not member' do
67
+ it 'returns false' do
68
+ api = double
69
+ user.stub(:api => api)
70
+
71
+ # api.stub(:team_member?, [123, user.login]).and_raise(Octokit::NotFound.new({}))
72
+ api.stub(:team_members, [123]).and_raise(Octokit::NotFound.new({}))
73
+
74
+ user.should_not be_team_member(123)
75
+ end
76
+ end
77
+
78
+ context 'when user is member' do
79
+ it 'returns true' do
80
+ api = double
81
+ user.stub(:api => api)
82
+ # api.stub(:team_member?, [123, user.login])
83
+ api.stub(:team_members, [123])
84
+
85
+ user.should be_team_member(123)
86
+ end
87
+ end
88
+ end
89
+
90
+ describe '.load' do
91
+ it 'loads the user data from GitHub and creates an instance' do
92
+ client = double
93
+ attrs = {}
94
+
95
+ Octokit::Client.
96
+ should_receive(:new).
97
+ with(:oauth_token => token).
98
+ and_return(client)
99
+ client.should_receive(:user).and_return(attrs)
100
+
101
+ user = described_class.load(token)
102
+
103
+ user.attribs.should eq attrs
104
+ user.token.should eq token
105
+ end
106
+ end
107
+
108
+ # NOTE: This always passes on MRI 1.9.3 because of ruby bug #7627.
109
+ it 'marshals correctly' do
110
+ Marshal.load(Marshal.dump(user)).should eq user
111
+ end
112
+ end
@@ -1,11 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
-
4
- require 'warden-github/version'
2
+ require File.expand_path('../lib/warden/github/version', __FILE__)
5
3
 
6
4
  Gem::Specification.new do |s|
7
5
  s.name = "warden-github"
8
- s.version = Warden::Github::VERSION
6
+ s.version = Warden::GitHub::VERSION
9
7
  s.platform = Gem::Platform::RUBY
10
8
  s.authors = ["Corey Donohoe"]
11
9
  s.email = ["atmos@atmos.org"]
@@ -15,16 +13,15 @@ Gem::Specification.new do |s|
15
13
 
16
14
  s.rubyforge_project = "warden-github"
17
15
 
18
- s.add_dependency "json", "~>1.5"
19
- s.add_dependency "warden", "~>1.0"
20
- s.add_dependency "oauth2", "~>0.5.2"
21
- s.add_dependency "octokit", "~>1.19.0"
22
- s.add_dependency "rest-client", "~>1.6.1"
23
- s.add_dependency "yajl-ruby", "~>1.1"
16
+ s.add_dependency "warden", ">1.0"
17
+ s.add_dependency "octokit", ">=1.22.0"
18
+ s.add_dependency "yajl-ruby", ">=1.1.0"
24
19
 
25
20
  s.add_development_dependency "rack", "~>1.4.1"
26
21
  s.add_development_dependency "rake"
27
- s.add_development_dependency "rspec", "~>2.8.0"
22
+ s.add_development_dependency "rspec", "~>2.8"
23
+ s.add_development_dependency "simplecov"
24
+ s.add_development_dependency "webmock", "~>1.9"
28
25
  s.add_development_dependency "webrat"
29
26
  s.add_development_dependency "sinatra"
30
27
  s.add_development_dependency "shotgun"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: warden-github
3
3
  version: !ruby/object:Gem::Version
4
- hash: 45
4
+ hash: 43
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 12
9
- - 1
10
- version: 0.12.1
8
+ - 13
9
+ - 0
10
+ version: 0.13.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Corey Donohoe
@@ -15,122 +15,105 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-01-28 00:00:00 -08:00
18
+ date: 2013-02-05 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- name: json
22
+ name: warden
23
23
  prerelease: false
24
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
- - - ~>
27
+ - - ">"
28
28
  - !ruby/object:Gem::Version
29
- hash: 5
29
+ hash: 15
30
30
  segments:
31
31
  - 1
32
- - 5
33
- version: "1.5"
32
+ - 0
33
+ version: "1.0"
34
34
  type: :runtime
35
35
  version_requirements: *id001
36
36
  - !ruby/object:Gem::Dependency
37
- name: warden
37
+ name: octokit
38
38
  prerelease: false
39
39
  requirement: &id002 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
- - - ~>
42
+ - - ">="
43
43
  - !ruby/object:Gem::Version
44
- hash: 15
44
+ hash: 79
45
45
  segments:
46
46
  - 1
47
+ - 22
47
48
  - 0
48
- version: "1.0"
49
+ version: 1.22.0
49
50
  type: :runtime
50
51
  version_requirements: *id002
51
52
  - !ruby/object:Gem::Dependency
52
- name: oauth2
53
+ name: yajl-ruby
53
54
  prerelease: false
54
55
  requirement: &id003 !ruby/object:Gem::Requirement
55
56
  none: false
56
57
  requirements:
57
- - - ~>
58
+ - - ">="
58
59
  - !ruby/object:Gem::Version
59
- hash: 15
60
+ hash: 19
60
61
  segments:
62
+ - 1
63
+ - 1
61
64
  - 0
62
- - 5
63
- - 2
64
- version: 0.5.2
65
+ version: 1.1.0
65
66
  type: :runtime
66
67
  version_requirements: *id003
67
68
  - !ruby/object:Gem::Dependency
68
- name: octokit
69
+ name: rack
69
70
  prerelease: false
70
71
  requirement: &id004 !ruby/object:Gem::Requirement
71
72
  none: false
72
73
  requirements:
73
74
  - - ~>
74
75
  - !ruby/object:Gem::Version
75
- hash: 91
76
+ hash: 5
76
77
  segments:
77
78
  - 1
78
- - 19
79
- - 0
80
- version: 1.19.0
81
- type: :runtime
79
+ - 4
80
+ - 1
81
+ version: 1.4.1
82
+ type: :development
82
83
  version_requirements: *id004
83
84
  - !ruby/object:Gem::Dependency
84
- name: rest-client
85
+ name: rake
85
86
  prerelease: false
86
87
  requirement: &id005 !ruby/object:Gem::Requirement
87
88
  none: false
88
89
  requirements:
89
- - - ~>
90
+ - - ">="
90
91
  - !ruby/object:Gem::Version
91
- hash: 13
92
+ hash: 3
92
93
  segments:
93
- - 1
94
- - 6
95
- - 1
96
- version: 1.6.1
97
- type: :runtime
94
+ - 0
95
+ version: "0"
96
+ type: :development
98
97
  version_requirements: *id005
99
98
  - !ruby/object:Gem::Dependency
100
- name: yajl-ruby
99
+ name: rspec
101
100
  prerelease: false
102
101
  requirement: &id006 !ruby/object:Gem::Requirement
103
102
  none: false
104
103
  requirements:
105
104
  - - ~>
106
105
  - !ruby/object:Gem::Version
107
- hash: 13
106
+ hash: 19
108
107
  segments:
109
- - 1
110
- - 1
111
- version: "1.1"
112
- type: :runtime
108
+ - 2
109
+ - 8
110
+ version: "2.8"
111
+ type: :development
113
112
  version_requirements: *id006
114
113
  - !ruby/object:Gem::Dependency
115
- name: rack
114
+ name: simplecov
116
115
  prerelease: false
117
116
  requirement: &id007 !ruby/object:Gem::Requirement
118
- none: false
119
- requirements:
120
- - - ~>
121
- - !ruby/object:Gem::Version
122
- hash: 5
123
- segments:
124
- - 1
125
- - 4
126
- - 1
127
- version: 1.4.1
128
- type: :development
129
- version_requirements: *id007
130
- - !ruby/object:Gem::Dependency
131
- name: rake
132
- prerelease: false
133
- requirement: &id008 !ruby/object:Gem::Requirement
134
117
  none: false
135
118
  requirements:
136
119
  - - ">="
@@ -140,27 +123,26 @@ dependencies:
140
123
  - 0
141
124
  version: "0"
142
125
  type: :development
143
- version_requirements: *id008
126
+ version_requirements: *id007
144
127
  - !ruby/object:Gem::Dependency
145
- name: rspec
128
+ name: webmock
146
129
  prerelease: false
147
- requirement: &id009 !ruby/object:Gem::Requirement
130
+ requirement: &id008 !ruby/object:Gem::Requirement
148
131
  none: false
149
132
  requirements:
150
133
  - - ~>
151
134
  - !ruby/object:Gem::Version
152
- hash: 47
135
+ hash: 29
153
136
  segments:
154
- - 2
155
- - 8
156
- - 0
157
- version: 2.8.0
137
+ - 1
138
+ - 9
139
+ version: "1.9"
158
140
  type: :development
159
- version_requirements: *id009
141
+ version_requirements: *id008
160
142
  - !ruby/object:Gem::Dependency
161
143
  name: webrat
162
144
  prerelease: false
163
- requirement: &id010 !ruby/object:Gem::Requirement
145
+ requirement: &id009 !ruby/object:Gem::Requirement
164
146
  none: false
165
147
  requirements:
166
148
  - - ">="
@@ -170,11 +152,11 @@ dependencies:
170
152
  - 0
171
153
  version: "0"
172
154
  type: :development
173
- version_requirements: *id010
155
+ version_requirements: *id009
174
156
  - !ruby/object:Gem::Dependency
175
157
  name: sinatra
176
158
  prerelease: false
177
- requirement: &id011 !ruby/object:Gem::Requirement
159
+ requirement: &id010 !ruby/object:Gem::Requirement
178
160
  none: false
179
161
  requirements:
180
162
  - - ">="
@@ -184,11 +166,11 @@ dependencies:
184
166
  - 0
185
167
  version: "0"
186
168
  type: :development
187
- version_requirements: *id011
169
+ version_requirements: *id010
188
170
  - !ruby/object:Gem::Dependency
189
171
  name: shotgun
190
172
  prerelease: false
191
- requirement: &id012 !ruby/object:Gem::Requirement
173
+ requirement: &id011 !ruby/object:Gem::Requirement
192
174
  none: false
193
175
  requirements:
194
176
  - - ">="
@@ -198,11 +180,11 @@ dependencies:
198
180
  - 0
199
181
  version: "0"
200
182
  type: :development
201
- version_requirements: *id012
183
+ version_requirements: *id011
202
184
  - !ruby/object:Gem::Dependency
203
185
  name: addressable
204
186
  prerelease: false
205
- requirement: &id013 !ruby/object:Gem::Requirement
187
+ requirement: &id012 !ruby/object:Gem::Requirement
206
188
  none: false
207
189
  requirements:
208
190
  - - ~>
@@ -214,11 +196,11 @@ dependencies:
214
196
  - 0
215
197
  version: 2.2.0
216
198
  type: :development
217
- version_requirements: *id013
199
+ version_requirements: *id012
218
200
  - !ruby/object:Gem::Dependency
219
201
  name: rack-test
220
202
  prerelease: false
221
- requirement: &id014 !ruby/object:Gem::Requirement
203
+ requirement: &id013 !ruby/object:Gem::Requirement
222
204
  none: false
223
205
  requirements:
224
206
  - - ~>
@@ -230,7 +212,7 @@ dependencies:
230
212
  - 3
231
213
  version: 0.5.3
232
214
  type: :development
233
- version_requirements: *id014
215
+ version_requirements: *id013
234
216
  description: A warden strategy for easy oauth integration with github
235
217
  email:
236
218
  - atmos@atmos.org
@@ -249,16 +231,18 @@ files:
249
231
  - README.md
250
232
  - Rakefile
251
233
  - config.ru
252
- - lib/warden-github.rb
253
- - lib/warden-github/proxy.rb
254
- - lib/warden-github/strategy.rb
255
- - lib/warden-github/user.rb
256
- - lib/warden-github/version.rb
257
- - spec/app.rb
258
- - spec/oauth_spec.rb
259
- - spec/proxy_spec.rb
234
+ - example/app.rb
235
+ - lib/warden/github.rb
236
+ - lib/warden/github/hook.rb
237
+ - lib/warden/github/oauth.rb
238
+ - lib/warden/github/strategy.rb
239
+ - lib/warden/github/user.rb
240
+ - lib/warden/github/version.rb
241
+ - spec/fixtures/user.json
242
+ - spec/integration/oauth_spec.rb
260
243
  - spec/spec_helper.rb
261
- - spec/user_spec.rb
244
+ - spec/unit/oauth_spec.rb
245
+ - spec/unit/user_spec.rb
262
246
  - warden-github.gemspec
263
247
  has_rdoc: true
264
248
  homepage: http://github.com/atmos/warden-github
@@ -295,8 +279,8 @@ signing_key:
295
279
  specification_version: 3
296
280
  summary: A warden strategy for easy oauth integration with github
297
281
  test_files:
298
- - spec/app.rb
299
- - spec/oauth_spec.rb
300
- - spec/proxy_spec.rb
282
+ - spec/fixtures/user.json
283
+ - spec/integration/oauth_spec.rb
301
284
  - spec/spec_helper.rb
302
- - spec/user_spec.rb
285
+ - spec/unit/oauth_spec.rb
286
+ - spec/unit/user_spec.rb