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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14d01726f3aa9567d329f1212fa72de1d7dd3d76
4
- data.tar.gz: 31767fd0cd8f0aafe0095f9b2aeeefb9b65143ec
3
+ metadata.gz: adc8f6e6c5ee7e9b6541bf1c2b648da32c3f3a41
4
+ data.tar.gz: f7693d48d7884ef6a6c19e4c55363f5ace6a96be
5
5
  SHA512:
6
- metadata.gz: 7dd47669719e1d49212e1aa97bbaec84fa9dff893c1e43406d054cb9dde8496ad9d6b134ac1406fafec5548ab136b5029eadac9b86784a13a7fac88e1c4db75e
7
- data.tar.gz: c9cb65406c8947c3088b5b8bae005f8eaa2f986ef6bf682490b80e74dcf9d344ba61b49bab844e20945faa6ae91549eb2e8bd1feb0f12ad08be9995e22eabb9d
6
+ metadata.gz: 49408781a862dc065024224e91dcbae3525cc523f411bfd544425665549f4879b68f78fb29fd06912e490c83e5cfc61f2cc7ea177e7160a16135d87589894530
7
+ data.tar.gz: 5a999f0230917d765be377582ccd72005e8675c7da04b2b269894a385ca4d52aaf5c364ce235f6a30bb3539ce2ca3da40cf0a70c30a2c207db26a2498cf21900
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vault-tools (0.6.1)
4
+ vault-tools (0.6.2)
5
5
  aws-sdk (~> 1.0)
6
6
  coderay
7
7
  excon
@@ -1,5 +1,5 @@
1
1
  module Vault
2
2
  module Tools
3
- VERSION = '0.6.1'
3
+ VERSION = '0.6.2'
4
4
  end
5
5
  end
@@ -88,11 +88,7 @@ module Vault
88
88
  # password matches settings.basic_password
89
89
  def authorized?(passwords)
90
90
  if passwords.empty?
91
- if settings.basic_password.is_a?(String)
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.1
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-02-27 00:00:00.000000000 Z
12
+ date: 2018-03-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: scrolls