rack-oauth2 0.9.0.alpha → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rack-oauth2 (0.8.7)
4
+ rack-oauth2 (0.9.0.alpha)
5
5
  activesupport (>= 2.3)
6
6
  attr_required (>= 0.0.3)
7
7
  httpclient (>= 2.2.0.2)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.0.alpha
1
+ 0.9.0
@@ -28,8 +28,8 @@ module Rack
28
28
  end
29
29
 
30
30
  def extensions
31
- Extensions.constants.sort.collect do |key|
32
- Extensions.const_get key
31
+ Extension.constants.sort.collect do |key|
32
+ Extension.const_get key
33
33
  end
34
34
  end
35
35
 
@@ -104,5 +104,5 @@ end
104
104
 
105
105
  require 'rack/oauth2/server/authorize/code'
106
106
  require 'rack/oauth2/server/authorize/token'
107
- require 'rack/oauth2/server/authorize/extensions'
107
+ require 'rack/oauth2/server/authorize/extension'
108
108
  require 'rack/oauth2/server/authorize/error'
@@ -2,9 +2,9 @@ module Rack
2
2
  module OAuth2
3
3
  module Server
4
4
  class Authorize
5
- module Extensions
5
+ module Extension
6
6
  # Define your extension in this namespace and load it explicitly.
7
- # extensions/code_and_token.rb would be good example for you.
7
+ # extension/code_and_token.rb would be good example for you.
8
8
  end
9
9
  end
10
10
  end
@@ -2,7 +2,7 @@ module Rack
2
2
  module OAuth2
3
3
  module Server
4
4
  class Authorize
5
- module Extensions
5
+ module Extension
6
6
  class CodeAndToken < Abstract::Handler
7
7
  class << self
8
8
  def response_type_for?(response_type)
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper.rb'
2
- require 'rack/oauth2/server/authorize/extensions/code_and_token'
2
+ require 'rack/oauth2/server/authorize/extension/code_and_token'
3
3
 
4
- describe Rack::OAuth2::Server::Authorize::Extensions::CodeAndToken do
4
+ describe Rack::OAuth2::Server::Authorize::Extension::CodeAndToken do
5
5
  let(:request) { Rack::MockRequest.new app }
6
6
  let(:redirect_uri) { 'http://client.example.com/callback' }
7
7
  let(:access_token) { 'access_token' }
@@ -71,21 +71,21 @@ describe Rack::OAuth2::Server::Authorize do
71
71
 
72
72
  describe 'extensions' do
73
73
  before do
74
- require 'rack/oauth2/server/authorize/extensions/code_and_token'
74
+ require 'rack/oauth2/server/authorize/extension/code_and_token'
75
75
  end
76
76
 
77
77
  let(:env) do
78
78
  Rack::MockRequest.env_for("/authorize?response_type=#{response_type}&client_id=client")
79
79
  end
80
80
  let(:request) { Rack::OAuth2::Server::Authorize::Request.new env }
81
- its(:extensions) { should == [Rack::OAuth2::Server::Authorize::Extensions::CodeAndToken] }
81
+ its(:extensions) { should == [Rack::OAuth2::Server::Authorize::Extension::CodeAndToken] }
82
82
 
83
83
  describe 'code token' do
84
84
  let(:response_type) { 'code%20token' }
85
85
  it do
86
86
  app.send(
87
87
  :response_type_for, request
88
- ).should == Rack::OAuth2::Server::Authorize::Extensions::CodeAndToken
88
+ ).should == Rack::OAuth2::Server::Authorize::Extension::CodeAndToken
89
89
  end
90
90
  end
91
91
 
@@ -94,7 +94,7 @@ describe Rack::OAuth2::Server::Authorize do
94
94
  it do
95
95
  app.send(
96
96
  :response_type_for, request
97
- ).should == Rack::OAuth2::Server::Authorize::Extensions::CodeAndToken
97
+ ).should == Rack::OAuth2::Server::Authorize::Extension::CodeAndToken
98
98
  end
99
99
  end
100
100
 
@@ -109,7 +109,7 @@ describe Rack::OAuth2::Server::Authorize do
109
109
 
110
110
  describe 'id_token' do
111
111
  before do
112
- class Rack::OAuth2::Server::Authorize::Extensions::IdToken < Rack::OAuth2::Server::Abstract::Handler
112
+ class Rack::OAuth2::Server::Authorize::Extension::IdToken < Rack::OAuth2::Server::Abstract::Handler
113
113
  def self.response_type_for?(response_type)
114
114
  response_type == 'id_token'
115
115
  end
@@ -118,8 +118,8 @@ describe Rack::OAuth2::Server::Authorize do
118
118
 
119
119
  its(:extensions) do
120
120
  should == [
121
- Rack::OAuth2::Server::Authorize::Extensions::CodeAndToken,
122
- Rack::OAuth2::Server::Authorize::Extensions::IdToken
121
+ Rack::OAuth2::Server::Authorize::Extension::CodeAndToken,
122
+ Rack::OAuth2::Server::Authorize::Extension::IdToken
123
123
  ]
124
124
  end
125
125
 
@@ -127,7 +127,7 @@ describe Rack::OAuth2::Server::Authorize do
127
127
  it do
128
128
  app.send(
129
129
  :response_type_for, request
130
- ).should == Rack::OAuth2::Server::Authorize::Extensions::IdToken
130
+ ).should == Rack::OAuth2::Server::Authorize::Extension::IdToken
131
131
  end
132
132
  end
133
133
  end
metadata CHANGED
@@ -1,14 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-oauth2
3
3
  version: !ruby/object:Gem::Version
4
- hash: -1851332106
5
- prerelease: 6
6
- segments:
7
- - 0
8
- - 9
9
- - 0
10
- - alpha
11
- version: 0.9.0.alpha
4
+ prerelease:
5
+ version: 0.9.0
12
6
  platform: ruby
13
7
  authors:
14
8
  - nov matake
@@ -16,7 +10,7 @@ autorequire:
16
10
  bindir: bin
17
11
  cert_chain: []
18
12
 
19
- date: 2011-08-11 00:00:00 Z
13
+ date: 2011-08-12 00:00:00 Z
20
14
  dependencies:
21
15
  - !ruby/object:Gem::Dependency
22
16
  name: rack
@@ -26,10 +20,6 @@ dependencies:
26
20
  requirements:
27
21
  - - ">="
28
22
  - !ruby/object:Gem::Version
29
- hash: 13
30
- segments:
31
- - 1
32
- - 1
33
23
  version: "1.1"
34
24
  type: :runtime
35
25
  version_requirements: *id001
@@ -41,11 +31,6 @@ dependencies:
41
31
  requirements:
42
32
  - - ">="
43
33
  - !ruby/object:Gem::Version
44
- hash: 1
45
- segments:
46
- - 1
47
- - 4
48
- - 3
49
34
  version: 1.4.3
50
35
  type: :runtime
51
36
  version_requirements: *id002
@@ -57,12 +42,6 @@ dependencies:
57
42
  requirements:
58
43
  - - ">="
59
44
  - !ruby/object:Gem::Version
60
- hash: 123
61
- segments:
62
- - 2
63
- - 2
64
- - 0
65
- - 2
66
45
  version: 2.2.0.2
67
46
  type: :runtime
68
47
  version_requirements: *id003
@@ -74,10 +53,6 @@ dependencies:
74
53
  requirements:
75
54
  - - ">="
76
55
  - !ruby/object:Gem::Version
77
- hash: 5
78
- segments:
79
- - 2
80
- - 3
81
56
  version: "2.3"
82
57
  type: :runtime
83
58
  version_requirements: *id004
@@ -89,9 +64,6 @@ dependencies:
89
64
  requirements:
90
65
  - - ">="
91
66
  - !ruby/object:Gem::Version
92
- hash: 3
93
- segments:
94
- - 0
95
67
  version: "0"
96
68
  type: :runtime
97
69
  version_requirements: *id005
@@ -103,11 +75,6 @@ dependencies:
103
75
  requirements:
104
76
  - - ">="
105
77
  - !ruby/object:Gem::Version
106
- hash: 25
107
- segments:
108
- - 0
109
- - 0
110
- - 3
111
78
  version: 0.0.3
112
79
  type: :runtime
113
80
  version_requirements: *id006
@@ -119,10 +86,6 @@ dependencies:
119
86
  requirements:
120
87
  - - ">="
121
88
  - !ruby/object:Gem::Version
122
- hash: 27
123
- segments:
124
- - 0
125
- - 8
126
89
  version: "0.8"
127
90
  type: :development
128
91
  version_requirements: *id007
@@ -134,10 +97,6 @@ dependencies:
134
97
  requirements:
135
98
  - - ">="
136
99
  - !ruby/object:Gem::Version
137
- hash: 25
138
- segments:
139
- - 0
140
- - 9
141
100
  version: "0.9"
142
101
  type: :development
143
102
  version_requirements: *id008
@@ -149,9 +108,6 @@ dependencies:
149
108
  requirements:
150
109
  - - ">="
151
110
  - !ruby/object:Gem::Version
152
- hash: 7
153
- segments:
154
- - 2
155
111
  version: "2"
156
112
  type: :development
157
113
  version_requirements: *id009
@@ -163,11 +119,6 @@ dependencies:
163
119
  requirements:
164
120
  - - ">="
165
121
  - !ruby/object:Gem::Version
166
- hash: 11
167
- segments:
168
- - 1
169
- - 6
170
- - 2
171
122
  version: 1.6.2
172
123
  type: :development
173
124
  version_requirements: *id010
@@ -215,8 +166,8 @@ files:
215
166
  - lib/rack/oauth2/server/authorize.rb
216
167
  - lib/rack/oauth2/server/authorize/code.rb
217
168
  - lib/rack/oauth2/server/authorize/error.rb
218
- - lib/rack/oauth2/server/authorize/extensions.rb
219
- - lib/rack/oauth2/server/authorize/extensions/code_and_token.rb
169
+ - lib/rack/oauth2/server/authorize/extension.rb
170
+ - lib/rack/oauth2/server/authorize/extension/code_and_token.rb
220
171
  - lib/rack/oauth2/server/authorize/token.rb
221
172
  - lib/rack/oauth2/server/resource.rb
222
173
  - lib/rack/oauth2/server/resource/bearer.rb
@@ -289,20 +240,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
289
240
  requirements:
290
241
  - - ">="
291
242
  - !ruby/object:Gem::Version
292
- hash: 3
293
- segments:
294
- - 0
295
243
  version: "0"
296
244
  required_rubygems_version: !ruby/object:Gem::Requirement
297
245
  none: false
298
246
  requirements:
299
247
  - - ">="
300
248
  - !ruby/object:Gem::Version
301
- hash: 23
302
- segments:
303
- - 1
304
- - 3
305
- - 6
306
249
  version: 1.3.6
307
250
  requirements: []
308
251