oauth2-server 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/oauth2/server/request.rb +5 -5
  2. metadata +5 -5
@@ -27,7 +27,7 @@ module OAuth2
27
27
 
28
28
  def initialize(attributes = {}, &block)
29
29
  self.attributes.merge!(attributes)
30
- yield self
30
+ yield self if block_given?
31
31
  end
32
32
 
33
33
  def errors
@@ -37,10 +37,10 @@ module OAuth2
37
37
  alias_method :original_request_header, :request_header
38
38
 
39
39
  # Overwrite attribute reader #request_header
40
- # See OAuth2::Server::Attributes
41
- def request_header
42
- value = original_request_header
43
-
40
+ # See OAuth2::Core::Attributes
41
+ def request_header(&block)
42
+ value = original_request_header(&block)
43
+
44
44
  if value.is_a?(String)
45
45
  value = Headers::Authorization.parse(value)
46
46
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 3
9
- version: 0.1.3
8
+ - 4
9
+ version: 0.1.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Alexander Flatter
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-08 00:00:00 +02:00
17
+ date: 2010-05-19 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -41,8 +41,8 @@ dependencies:
41
41
  segments:
42
42
  - 0
43
43
  - 1
44
- - 3
45
- version: 0.1.3
44
+ - 4
45
+ version: 0.1.4
46
46
  type: :runtime
47
47
  version_requirements: *id002
48
48
  - !ruby/object:Gem::Dependency