rack-wwwhisper 1.1.7 → 1.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c9d75b24d239b1c5114609cbdc1f63397221ee91
4
+ data.tar.gz: f9e6df15ee2ecfbd026ac14bfdcfe5ccc67da519
5
+ SHA512:
6
+ metadata.gz: 50c81c6f2073f934ea4e556409b0e0cda2d3e5cbc23fa798a78c7317d7a9f80b01c406aade10424fcce99b3cb0f681ef65a39a4c0c313d33278f1b3179449ffa
7
+ data.tar.gz: cefef6120439ce5e81a665837c3c6665e10f26698dca95fbbf3a943e20c8b93e2192797e135a8fee9b2782867f6d4c4b3bdd49442c5aeae06ca05cc85926f639
checksums.yaml.gz.sig ADDED
Binary file
data.tar.gz.sig ADDED
@@ -0,0 +1,4 @@
1
+ kA�g�
2
+ �A0s�� ���3�u��ѲH��"�M�y�84t��AT��@©֧�J�ЂK<��K�r��睭\�~S%��5��݂3wc'
3
+ A�߮|Z�r�e�$�B8r4t�nO���t7�(5�`⩕7;Y�s��:f�s�����@EӒ��- ����p�S�KQt�h��+�E7�U�0v��y�[)���C��M:�P�/
4
+ �G�䧈ewKݏ
@@ -129,7 +129,7 @@ class WWWhisper
129
129
 
130
130
  private
131
131
  def debug(req, message)
132
- req.logger.debug "wwwhisper #{message}" if req.logger
132
+ req.logger.debug "wwwhisper #{message}" if (req.respond_to?(:logger) && req.logger)
133
133
  end
134
134
 
135
135
  def parse_uri(uri)
@@ -189,6 +189,7 @@ class WWWhisper
189
189
  sub_req.body_stream = rack_req.body
190
190
  sub_req.content_length =
191
191
  rack_req.content_length if rack_req.content_length
192
+ # Pass Content-Type header with requests that have body.
192
193
  sub_req.content_type = rack_req.content_type if rack_req.content_type
193
194
  end
194
195
  end
@@ -1,3 +1,3 @@
1
1
  module Rack
2
- WWWHISPER_VERSION = '1.1.7'
2
+ WWWHISPER_VERSION = '1.1.8'
3
3
  end
@@ -232,6 +232,18 @@ class TestWWWhisper < Test::Unit::TestCase
232
232
  assert_requested :get, full_url(@wwwhisper.auth_query(path))
233
233
  end
234
234
 
235
+ def test_wwwhisper_cookies_missing_other_present
236
+ path = '/foo/bar'
237
+ stub_request(:get, full_url(@wwwhisper.auth_query(path))).
238
+ to_return(granted())
239
+
240
+ get(path, {},
241
+ {'HTTP_COOKIE' => 'session=123;'})
242
+ assert last_response.ok?
243
+ assert_equal 'Hello World', last_response.body
244
+ assert_requested :get, full_url(@wwwhisper.auth_query(path))
245
+ end
246
+
235
247
  def test_library_version_passed_to_wwwhisper
236
248
  path = '/foo/bar'
237
249
  stub_request(:get, full_url(@wwwhisper.auth_query(path))).
@@ -258,6 +270,7 @@ class TestWWWhisper < Test::Unit::TestCase
258
270
  assert_path_normalized '/', '/'
259
271
  assert_path_normalized '/foo/bar', '/foo/bar'
260
272
  assert_path_normalized '/foo/bar/', '/foo/bar/'
273
+ assert_path_normalized '/foo/', '/foo/'
261
274
 
262
275
  assert_path_normalized '/foo/', '/auth/api/login/../../../foo/'
263
276
  assert_path_normalized '/', '//'
@@ -266,7 +279,6 @@ class TestWWWhisper < Test::Unit::TestCase
266
279
  assert_path_normalized '/', '/./././'
267
280
  assert_path_normalized '/bar', '/foo/./bar/../../bar'
268
281
  assert_path_normalized '/foo/', '/foo/bar/..'
269
- assert_path_normalized '/foo/', '/foo/'
270
282
  assert_path_normalized '/', '/./././/'
271
283
  end
272
284
 
@@ -309,7 +321,7 @@ class TestWWWhisper < Test::Unit::TestCase
309
321
  def test_site_url
310
322
  path = '/wwwhisper/admin/index.html'
311
323
 
312
- # X-Forwarded headers must be sent to wwwhisper backend.
324
+ # Site-Url header must be sent to the wwwhisper backend.
313
325
  stub_request(:get, full_url(@wwwhisper.auth_query(path))).
314
326
  with(:headers => {
315
327
  'Site-Url' => "#{SITE_PROTO}://#{SITE_HOST}"
@@ -352,6 +364,7 @@ class TestWWWhisper < Test::Unit::TestCase
352
364
  end
353
365
 
354
366
  def test_public_caching_disabled
367
+ # TODO: this should be done only for plain HTTP requests.
355
368
  path = '/foo/bar'
356
369
  stub_request(:get, full_url(@wwwhisper.auth_query(path))).
357
370
  to_return(granted())
metadata CHANGED
@@ -1,110 +1,118 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-wwwhisper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.7
5
- prerelease:
4
+ version: 1.1.8
6
5
  platform: ruby
7
6
  authors:
8
7
  - Jan Wrobel
9
8
  autorequire:
10
9
  bindir: bin
11
- cert_chain: []
12
- date: 2013-04-23 00:00:00.000000000 Z
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDLjCCAhagAwIBAgIBATANBgkqhkiG9w0BAQUFADA9MQwwCgYDVQQDDAN3cnIx
14
+ GDAWBgoJkiaJk/IsZAEZFghtaXhlZGJpdDETMBEGCgmSJomT8ixkARkWA29yZzAe
15
+ Fw0xNDAyMTgxMTM5MDBaFw0xNTAyMTgxMTM5MDBaMD0xDDAKBgNVBAMMA3dycjEY
16
+ MBYGCgmSJomT8ixkARkWCG1peGVkYml0MRMwEQYKCZImiZPyLGQBGRYDb3JnMIIB
17
+ IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArXFzkn3szb+tBvJN4TZxGttz
18
+ F8HzWiKY7enGD0EmuK96Y08Jr3WoHHRwTNTkq73nUT37jkiQunhWoZNVBfOHqm4B
19
+ joLPiFoWW7R11UFgPSR+ftOAR+s9uo1MYkwOiWxkrhAlFBACw5r8c3DrUGn9xL4T
20
+ X8/DnNprxRt7vyGMAGq5daO442DJoQWTOCfF5Kn/wKQYfjSvQ+n+XSSfbhE7FXHP
21
+ wKMOmxg1YpiyjTsJi5TCs//8KKGfrOskbl3n3bntRIhWuOVa+H4FBson1rDzeQnq
22
+ 844YfBz8TPpYIyr/XMR0BMGrrs2HDeTzd3X1o6LANn4DJJFbJSLia+oK1e4/TQID
23
+ AQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUSowN/Sa1
24
+ 7TAl8Er/GiM/vO1CceEwDQYJKoZIhvcNAQEFBQADggEBAA3OmgDvtqFcwLWpnE+v
25
+ M1DASP2v8Fxzv8VG7iRxBdXZocw12Boxw10RVzPC7mMA6dxnTtDJNKTArJ+cNbqy
26
+ 61X7nikG2g6uKOB3RqTRvwEQfq/j4Ed5L4+zAa6lMOTnC1RHuicq1Sn1duvNhf5S
27
+ qPClxRNN4OIs0Rk8rXLWZOLoVusHGBZjlehHBTqlEifKtUH5MfELUhw57hh0MdrF
28
+ nWwnE7RhzlmaOZkODQZL9b9DCD87qNPXnydGK5tjhY9geIiLy75y45AYk2Ai93Au
29
+ JBNlpBBX3p7+pX8z/1RuP5HQIqBGspecdX6cjwxnAtj3TACtIaJfUtsSmLKp+wz3
30
+ PQs=
31
+ -----END CERTIFICATE-----
32
+ date: 2014-06-01 00:00:00.000000000 Z
13
33
  dependencies:
14
34
  - !ruby/object:Gem::Dependency
15
35
  name: rack
16
36
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
37
  requirements:
19
- - - ~>
38
+ - - "~>"
20
39
  - !ruby/object:Gem::Version
21
40
  version: '1.0'
22
41
  type: :runtime
23
42
  prerelease: false
24
43
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
44
  requirements:
27
- - - ~>
45
+ - - "~>"
28
46
  - !ruby/object:Gem::Version
29
47
  version: '1.0'
30
48
  - !ruby/object:Gem::Dependency
31
49
  name: addressable
32
50
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
51
  requirements:
35
- - - ~>
52
+ - - "~>"
36
53
  - !ruby/object:Gem::Version
37
54
  version: '2.0'
38
55
  type: :runtime
39
56
  prerelease: false
40
57
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
58
  requirements:
43
- - - ~>
59
+ - - "~>"
44
60
  - !ruby/object:Gem::Version
45
61
  version: '2.0'
46
62
  - !ruby/object:Gem::Dependency
47
63
  name: net-http-persistent
48
64
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
65
  requirements:
51
- - - ! '>='
66
+ - - ">="
52
67
  - !ruby/object:Gem::Version
53
68
  version: '0'
54
69
  type: :runtime
55
70
  prerelease: false
56
71
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
72
  requirements:
59
- - - ! '>='
73
+ - - ">="
60
74
  - !ruby/object:Gem::Version
61
75
  version: '0'
62
76
  - !ruby/object:Gem::Dependency
63
77
  name: rack-test
64
78
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
79
  requirements:
67
- - - ! '>='
80
+ - - ">="
68
81
  - !ruby/object:Gem::Version
69
82
  version: '0'
70
83
  type: :development
71
84
  prerelease: false
72
85
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
86
  requirements:
75
- - - ! '>='
87
+ - - ">="
76
88
  - !ruby/object:Gem::Version
77
89
  version: '0'
78
90
  - !ruby/object:Gem::Dependency
79
91
  name: webmock
80
92
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
93
  requirements:
83
- - - ! '>='
94
+ - - ">="
84
95
  - !ruby/object:Gem::Version
85
96
  version: '0'
86
97
  type: :development
87
98
  prerelease: false
88
99
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
100
  requirements:
91
- - - ! '>='
101
+ - - ">="
92
102
  - !ruby/object:Gem::Version
93
103
  version: '0'
94
104
  - !ruby/object:Gem::Dependency
95
105
  name: rake
96
106
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
107
  requirements:
99
- - - ! '>='
108
+ - - ">="
100
109
  - !ruby/object:Gem::Version
101
110
  version: '0'
102
111
  type: :development
103
112
  prerelease: false
104
113
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
114
  requirements:
107
- - - ! '>='
115
+ - - ">="
108
116
  - !ruby/object:Gem::Version
109
117
  version: '0'
110
118
  description: Middleware uses wwwhisper service to authorize requests.
@@ -113,40 +121,33 @@ executables: []
113
121
  extensions: []
114
122
  extra_rdoc_files: []
115
123
  files:
124
+ - Rakefile
116
125
  - lib/rack/wwwhisper.rb
117
126
  - lib/rack/wwwhisper_version.rb
118
127
  - test/test_wwwhisper.rb
119
- - Rakefile
120
128
  homepage: https://github.com/wrr/rack-wwwhisper
121
129
  licenses:
122
130
  - BSD
131
+ metadata: {}
123
132
  post_install_message:
124
133
  rdoc_options: []
125
134
  require_paths:
126
135
  - lib
127
136
  required_ruby_version: !ruby/object:Gem::Requirement
128
- none: false
129
137
  requirements:
130
- - - ! '>='
138
+ - - ">="
131
139
  - !ruby/object:Gem::Version
132
140
  version: '0'
133
- segments:
134
- - 0
135
- hash: 3214471811457318214
136
141
  required_rubygems_version: !ruby/object:Gem::Requirement
137
- none: false
138
142
  requirements:
139
- - - ! '>='
143
+ - - ">="
140
144
  - !ruby/object:Gem::Version
141
145
  version: '0'
142
- segments:
143
- - 0
144
- hash: 3214471811457318214
145
146
  requirements: []
146
147
  rubyforge_project:
147
- rubygems_version: 1.8.24
148
+ rubygems_version: 2.2.2
148
149
  signing_key:
149
- specification_version: 3
150
+ specification_version: 4
150
151
  summary: Persona based authorization layer for Rack applications.
151
152
  test_files:
152
153
  - test/test_wwwhisper.rb
metadata.gz.sig ADDED
@@ -0,0 +1,2 @@
1
+ #��6/c�x9<c[�G�����?X��{`p2�\�(�8X�⦚�*D.#'7 �+f)f�oC����� ���w5�h�v(�f��/:� T��-����d��X
2
+ {�13�l�SL�� �.b�M�Ϫ��O)N.��2,;ҕ"��tܖWL��łe�X�Qi~�D7j�;� ?��_�&�f��R��Ģ&+�bX>� x����u���� �`���<�̴}����U)=