rack-oauth2 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.1
1
+ 0.9.2
@@ -64,6 +64,7 @@ module Rack
64
64
  _endpoint_.scheme ||= self.scheme || 'https'
65
65
  _endpoint_.host ||= self.host
66
66
  _endpoint_.port ||= self.port
67
+ raise 'No Host Info' unless _endpoint_.host
67
68
  _endpoint_.to_s
68
69
  end
69
70
 
@@ -188,4 +188,26 @@ describe Rack::OAuth2::Client do
188
188
  end
189
189
  end
190
190
  end
191
+
192
+ context 'when no host info' do
193
+ let :client do
194
+ Rack::OAuth2::Client.new(
195
+ :identifier => 'client_id',
196
+ :secret => 'client_secret',
197
+ :redirect_uri => 'https://client.example.com/callback'
198
+ )
199
+ end
200
+
201
+ describe '#authorization_uri' do
202
+ it do
203
+ expect { client.authorization_uri }.should raise_error 'No Host Info'
204
+ end
205
+ end
206
+
207
+ describe '#access_token!' do
208
+ it do
209
+ expect { client.access_token! }.should raise_error 'No Host Info'
210
+ end
211
+ end
212
+ end
191
213
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rack-oauth2
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.9.1
5
+ version: 0.9.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - nov matake
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-08-14 00:00:00 Z
13
+ date: 2011-08-15 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rack