vault-tools 0.6.1 → 0.6.2
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/vault-tools/version.rb +1 -1
- data/lib/vault-tools/web.rb +1 -5
- data/test/web_test.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adc8f6e6c5ee7e9b6541bf1c2b648da32c3f3a41
|
4
|
+
data.tar.gz: f7693d48d7884ef6a6c19e4c55363f5ace6a96be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49408781a862dc065024224e91dcbae3525cc523f411bfd544425665549f4879b68f78fb29fd06912e490c83e5cfc61f2cc7ea177e7160a16135d87589894530
|
7
|
+
data.tar.gz: 5a999f0230917d765be377582ccd72005e8675c7da04b2b269894a385ca4d52aaf5c364ce235f6a30bb3539ce2ca3da40cf0a70c30a2c207db26a2498cf21900
|
data/Gemfile.lock
CHANGED
data/lib/vault-tools/version.rb
CHANGED
data/lib/vault-tools/web.rb
CHANGED
@@ -88,11 +88,7 @@ module Vault
|
|
88
88
|
# password matches settings.basic_password
|
89
89
|
def authorized?(passwords)
|
90
90
|
if passwords.empty?
|
91
|
-
|
92
|
-
passwords << settings.basic_password
|
93
|
-
else
|
94
|
-
passwords = passwords + settings.basic_password
|
95
|
-
end
|
91
|
+
passwords = passwords + Array(settings.basic_password)
|
96
92
|
end
|
97
93
|
passwords << settings.basic_password if passwords.empty?
|
98
94
|
@auth ||= Rack::Auth::Basic::Request.new(request.env)
|
data/test/web_test.rb
CHANGED
@@ -70,6 +70,17 @@ class WebTest < Vault::TestCase
|
|
70
70
|
assert_equal 'You may pass', last_response.body
|
71
71
|
end
|
72
72
|
|
73
|
+
def test_http_basic_auth_nil
|
74
|
+
app.set :basic_password, nil
|
75
|
+
app.get '/protected' do
|
76
|
+
protected!
|
77
|
+
'You may pass'
|
78
|
+
end
|
79
|
+
|
80
|
+
get '/protected'
|
81
|
+
assert_equal 401, last_response.status
|
82
|
+
end
|
83
|
+
|
73
84
|
def test_http_basic_auth_with_alternate_password
|
74
85
|
app.set :basic_password, 'password'
|
75
86
|
app.get '/protected' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vault-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Continanza
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-03-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: scrolls
|