vault-tools 0.5.14 → 0.5.15

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.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vault-tools (0.6)
4
+ vault-tools (0.5.15)
5
5
  aws-sdk
6
6
  fernet (= 2.0.rc2)
7
7
  heroku-api
@@ -1,5 +1,5 @@
1
1
  module Vault
2
2
  module Tools
3
- VERSION = '0.5.14'
3
+ VERSION = '0.5.15'
4
4
  end
5
5
  end
@@ -19,7 +19,15 @@ module Vault
19
19
  define_method "#{meth}_unprotected".to_sym do |path, opts = {}, &block|
20
20
  pattern = compile!(meth.upcase, path, block, opts).first
21
21
  set :unprotected_paths, settings.unprotected_paths + [pattern]
22
- route meth.upcase, path, opts, &block
22
+ if meth.downcase == 'get'
23
+ conditions = @conditions.dup
24
+ route 'GET', path, opts, &block
25
+
26
+ @conditions = conditions
27
+ route 'HEAD', path, opts, &block
28
+ else
29
+ route meth.upcase, path, opts, &block
30
+ end
23
31
  end
24
32
  end
25
33
  end
@@ -97,6 +97,9 @@ class WebTest < Vault::TestCase
97
97
  get '/protected'
98
98
  assert_equal 401, last_response.status
99
99
 
100
+ head '/unprotected/Bob'
101
+ assert_equal 200, last_response.status
102
+
100
103
  get '/unprotected/Bob'
101
104
  assert_equal 200, last_response.status
102
105
  assert_equal 'You may pass Bob', last_response.body
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.5.14
4
+ version: 0.5.15
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-11-12 00:00:00.000000000 Z
13
+ date: 2014-11-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: scrolls