vault-tools 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -43,5 +43,9 @@ module Vault
43
43
  def enable_ssl?
44
44
  !env('VAULT_TOOLS_DISABLE_SSL')
45
45
  end
46
+
47
+ def int(key)
48
+ env(key) ? env(key).to_i : nil
49
+ end
46
50
  end
47
51
  end
@@ -1,5 +1,5 @@
1
1
  module Vault
2
2
  module Tools
3
- VERSION = '0.3.2'
3
+ VERSION = '0.3.3'
4
4
  end
5
5
  end
data/test/config_test.rb CHANGED
@@ -55,6 +55,13 @@ class ConfigTest < Vault::TestCase
55
55
  Vault::Config.port.must_equal 3000
56
56
  end
57
57
 
58
+ # Config.int(VAR) returns nil or VAR as integer
59
+ def test_int
60
+ assert_equal(nil, Vault::Config.int('FOO'))
61
+ set_env 'FOO', "3000"
62
+ assert_equal(3000, Vault::Config.int('FOO'))
63
+ end
64
+
58
65
  # Config.enable_ssl? is true unless VAULT_TOOLS_DISABLE_SSL
59
66
  # is set
60
67
  def test_enable_ssl
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.3.2
4
+ version: 0.3.3
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: 2013-03-06 00:00:00.000000000 Z
13
+ date: 2013-03-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: scrolls
@@ -145,7 +145,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
145
  version: '0'
146
146
  segments:
147
147
  - 0
148
- hash: -4204391023637480040
148
+ hash: 3761789110019069070
149
149
  required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  none: false
151
151
  requirements:
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  version: '0'
155
155
  segments:
156
156
  - 0
157
- hash: -4204391023637480040
157
+ hash: 3761789110019069070
158
158
  requirements: []
159
159
  rubyforge_project:
160
160
  rubygems_version: 1.8.23