lockbox_middleware 1.3.1 → 1.4.1

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.
Files changed (2) hide show
  1. data/lib/lockbox_middleware.rb +4 -2
  2. metadata +19 -4
@@ -131,9 +131,11 @@ class LockBox
131
131
  headers['Referer'] = "#{env['rack.url_scheme']}://#{env['SERVER_NAME']}#{env['PATH_INFO']}"
132
132
  headers['Referer'] << "?#{env['QUERY_STRING']}" unless env['QUERY_STRING'].blank?
133
133
  headers['X-Referer-Content-MD5'] = Digest::MD5.hexdigest(Rack::Request.new(env).body.read) if env['CONTENT_TYPE']
134
- {'Content-Type' => 'CONTENT_TYPE', 'Date' => 'HTTP_DATE', 'Method' => 'REQUEST_METHOD', 'Authorization' => 'HTTP_AUTHORIZATION'}.each_pair do |h,e|
134
+ {'Content-Type' => 'CONTENT_TYPE', 'Date' => 'HTTP_DATE', 'Method' => 'REQUEST_METHOD',
135
+ 'Authorization' => 'HTTP_AUTHORIZATION'}.each_pair do |h,e|
135
136
  headers["X-Referer-#{h}"] = env[e] unless env[e].blank?
136
137
  end
138
+ headers["X-Referer-Date"] = env['HTTP_X_AUTHHMAC_REQUEST_DATE'] unless env['HTTP_X_AUTHHMAC_REQUEST_DATE'].blank?
137
139
  headers
138
140
  end
139
141
 
@@ -157,4 +159,4 @@ class LockBox
157
159
  @cache.write(cache_key(api_key),expiration.to_i)
158
160
  end
159
161
 
160
- end
162
+ end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lockbox_middleware
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 5
4
5
  prerelease: false
5
6
  segments:
6
7
  - 1
7
- - 3
8
+ - 4
8
9
  - 1
9
- version: 1.3.1
10
+ version: 1.4.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Chris Gill
@@ -17,16 +18,18 @@ autorequire:
17
18
  bindir: bin
18
19
  cert_chain: []
19
20
 
20
- date: 2010-08-11 00:00:00 -04:00
21
+ date: 2010-08-25 00:00:00 -04:00
21
22
  default_executable:
22
23
  dependencies:
23
24
  - !ruby/object:Gem::Dependency
24
25
  name: httparty
25
26
  prerelease: false
26
27
  requirement: &id001 !ruby/object:Gem::Requirement
28
+ none: false
27
29
  requirements:
28
30
  - - ">="
29
31
  - !ruby/object:Gem::Version
32
+ hash: 3
30
33
  segments:
31
34
  - 0
32
35
  version: "0"
@@ -36,9 +39,11 @@ dependencies:
36
39
  name: dnclabs-auth-hmac
37
40
  prerelease: false
38
41
  requirement: &id002 !ruby/object:Gem::Requirement
42
+ none: false
39
43
  requirements:
40
44
  - - ">="
41
45
  - !ruby/object:Gem::Version
46
+ hash: 3
42
47
  segments:
43
48
  - 0
44
49
  version: "0"
@@ -58,6 +63,12 @@ files:
58
63
  - lib/lockbox_middleware.rb
59
64
  - LICENSE
60
65
  - README.rdoc
66
+ - spec/lib/lockbox_cache_spec.rb
67
+ - spec/lib/lockbox_middleware_spec.rb
68
+ - spec/spec.opts
69
+ - spec/spec_helper.rb
70
+ - spec/support/helper_methods.rb
71
+ - spec/support/mocha.rb
61
72
  has_rdoc: true
62
73
  homepage: http://github.com/dnclabs/lockbox
63
74
  licenses: []
@@ -68,23 +79,27 @@ rdoc_options:
68
79
  require_paths:
69
80
  - lib
70
81
  required_ruby_version: !ruby/object:Gem::Requirement
82
+ none: false
71
83
  requirements:
72
84
  - - ">="
73
85
  - !ruby/object:Gem::Version
86
+ hash: 3
74
87
  segments:
75
88
  - 0
76
89
  version: "0"
77
90
  required_rubygems_version: !ruby/object:Gem::Requirement
91
+ none: false
78
92
  requirements:
79
93
  - - ">="
80
94
  - !ruby/object:Gem::Version
95
+ hash: 3
81
96
  segments:
82
97
  - 0
83
98
  version: "0"
84
99
  requirements: []
85
100
 
86
101
  rubyforge_project:
87
- rubygems_version: 1.3.6
102
+ rubygems_version: 1.3.7
88
103
  signing_key:
89
104
  specification_version: 3
90
105
  summary: Rack middleware for the LockBox centralized API authorization service.