rack-oauth2 0.8.4 → 0.8.5

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,2 +1,7 @@
1
1
  source 'http://rubygems.org'
2
+
3
+ platforms :jruby do
4
+ gem 'jruby-openssl', '>= 0.7'
5
+ end
6
+
2
7
  gemspec
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rack-oauth2 (0.8.3)
4
+ rack-oauth2 (0.8.4)
5
5
  activesupport (>= 2.3)
6
6
  attr_required (>= 0.0.3)
7
7
  httpclient (>= 2.2.0.2)
@@ -15,14 +15,19 @@ GEM
15
15
  activesupport (3.0.9)
16
16
  addressable (2.2.6)
17
17
  attr_required (0.0.3)
18
+ bouncy-castle-java (1.5.0146.1)
18
19
  crack (0.1.8)
19
20
  diff-lcs (1.1.2)
20
21
  httpclient (2.2.1)
21
22
  i18n (0.6.0)
23
+ jruby-openssl (0.7.4)
24
+ bouncy-castle-java
22
25
  json (1.5.3)
23
- rack (1.3.0)
26
+ json (1.5.3-java)
27
+ rack (1.3.1)
24
28
  rake (0.9.2)
25
29
  rcov (0.9.9)
30
+ rcov (0.9.9-java)
26
31
  rspec (2.6.0)
27
32
  rspec-core (~> 2.6.0)
28
33
  rspec-expectations (~> 2.6.0)
@@ -36,9 +41,11 @@ GEM
36
41
  crack (>= 0.1.7)
37
42
 
38
43
  PLATFORMS
44
+ java
39
45
  ruby
40
46
 
41
47
  DEPENDENCIES
48
+ jruby-openssl (>= 0.7)
42
49
  rack-oauth2!
43
50
  rake (>= 0.8)
44
51
  rcov (>= 0.9)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.4
1
+ 0.8.5
@@ -12,7 +12,7 @@ module Rack
12
12
  end
13
13
 
14
14
  def authenticate(request)
15
- request.header["Authorization"] = "OAuth2 #{access_token}"
15
+ request.header["Authorization"] = "OAuth #{access_token}"
16
16
  end
17
17
  end
18
18
  end
@@ -14,14 +14,14 @@ module Rack
14
14
  end
15
15
  attr_missing!
16
16
  rescue AttrRequired::AttrMissing => e
17
- raise VerificationFailed.new("#{self.class.to_s.split('::').last} Invalid: #{e.message}")
17
+ raise VerificationFailed.new("#{self.class.name.demodulize} Invalid: #{e.message}")
18
18
  end
19
19
 
20
20
  def verify!(expected)
21
21
  if expected == self.calculate
22
22
  :verified
23
23
  else
24
- raise VerificationFailed.new("#{self.class.to_s.split('::').last} Invalid")
24
+ raise VerificationFailed.new("#{self.class.name.demodulize} Invalid")
25
25
  end
26
26
  end
27
27
 
@@ -10,7 +10,7 @@ module Rack
10
10
  (required_attributes + optional_attributes).each do |key|
11
11
  self.send :"#{key}=", attributes[key]
12
12
  end
13
- @token_type = self.class.to_s.split('::').last.underscore.to_sym
13
+ @token_type = self.class.name.demodulize.underscore.to_sym
14
14
  @httpclient = HTTPClient.new(
15
15
  :agent_name => "#{self.class} (#{VERSION})"
16
16
  )
@@ -13,7 +13,7 @@ module Rack
13
13
 
14
14
  def to_hash
15
15
  required_attributes.inject({
16
- :grant_type => self.class.name.split('::').last.underscore.to_sym
16
+ :grant_type => self.class.name.demodulize.underscore.to_sym
17
17
  }) do |hash, key|
18
18
  hash.merge! key => self.send(key)
19
19
  end
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-oauth2
3
3
  version: !ruby/object:Gem::Version
4
- hash: 55
5
4
  prerelease:
6
- segments:
7
- - 0
8
- - 8
9
- - 4
10
- version: 0.8.4
5
+ version: 0.8.5
11
6
  platform: ruby
12
7
  authors:
13
8
  - nov matake
@@ -15,7 +10,7 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2011-07-15 00:00:00 Z
13
+ date: 2011-07-26 00:00:00 Z
19
14
  dependencies:
20
15
  - !ruby/object:Gem::Dependency
21
16
  name: rack
@@ -25,10 +20,6 @@ dependencies:
25
20
  requirements:
26
21
  - - ">="
27
22
  - !ruby/object:Gem::Version
28
- hash: 13
29
- segments:
30
- - 1
31
- - 1
32
23
  version: "1.1"
33
24
  type: :runtime
34
25
  version_requirements: *id001
@@ -40,11 +31,6 @@ dependencies:
40
31
  requirements:
41
32
  - - ">="
42
33
  - !ruby/object:Gem::Version
43
- hash: 1
44
- segments:
45
- - 1
46
- - 4
47
- - 3
48
34
  version: 1.4.3
49
35
  type: :runtime
50
36
  version_requirements: *id002
@@ -56,12 +42,6 @@ dependencies:
56
42
  requirements:
57
43
  - - ">="
58
44
  - !ruby/object:Gem::Version
59
- hash: 123
60
- segments:
61
- - 2
62
- - 2
63
- - 0
64
- - 2
65
45
  version: 2.2.0.2
66
46
  type: :runtime
67
47
  version_requirements: *id003
@@ -73,10 +53,6 @@ dependencies:
73
53
  requirements:
74
54
  - - ">="
75
55
  - !ruby/object:Gem::Version
76
- hash: 5
77
- segments:
78
- - 2
79
- - 3
80
56
  version: "2.3"
81
57
  type: :runtime
82
58
  version_requirements: *id004
@@ -88,9 +64,6 @@ dependencies:
88
64
  requirements:
89
65
  - - ">="
90
66
  - !ruby/object:Gem::Version
91
- hash: 3
92
- segments:
93
- - 0
94
67
  version: "0"
95
68
  type: :runtime
96
69
  version_requirements: *id005
@@ -102,11 +75,6 @@ dependencies:
102
75
  requirements:
103
76
  - - ">="
104
77
  - !ruby/object:Gem::Version
105
- hash: 25
106
- segments:
107
- - 0
108
- - 0
109
- - 3
110
78
  version: 0.0.3
111
79
  type: :runtime
112
80
  version_requirements: *id006
@@ -118,10 +86,6 @@ dependencies:
118
86
  requirements:
119
87
  - - ">="
120
88
  - !ruby/object:Gem::Version
121
- hash: 27
122
- segments:
123
- - 0
124
- - 8
125
89
  version: "0.8"
126
90
  type: :development
127
91
  version_requirements: *id007
@@ -133,10 +97,6 @@ dependencies:
133
97
  requirements:
134
98
  - - ">="
135
99
  - !ruby/object:Gem::Version
136
- hash: 25
137
- segments:
138
- - 0
139
- - 9
140
100
  version: "0.9"
141
101
  type: :development
142
102
  version_requirements: *id008
@@ -148,9 +108,6 @@ dependencies:
148
108
  requirements:
149
109
  - - ">="
150
110
  - !ruby/object:Gem::Version
151
- hash: 7
152
- segments:
153
- - 2
154
111
  version: "2"
155
112
  type: :development
156
113
  version_requirements: *id009
@@ -162,11 +119,6 @@ dependencies:
162
119
  requirements:
163
120
  - - ">="
164
121
  - !ruby/object:Gem::Version
165
- hash: 11
166
- segments:
167
- - 1
168
- - 6
169
- - 2
170
122
  version: 1.6.2
171
123
  type: :development
172
124
  version_requirements: *id010
@@ -281,20 +233,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
281
233
  requirements:
282
234
  - - ">="
283
235
  - !ruby/object:Gem::Version
284
- hash: 3
285
- segments:
286
- - 0
287
236
  version: "0"
288
237
  required_rubygems_version: !ruby/object:Gem::Requirement
289
238
  none: false
290
239
  requirements:
291
240
  - - ">="
292
241
  - !ruby/object:Gem::Version
293
- hash: 23
294
- segments:
295
- - 1
296
- - 3
297
- - 6
298
242
  version: 1.3.6
299
243
  requirements: []
300
244