secret_data 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/README.md +5 -0
- data/changelog.md +3 -0
- data/lib/secret_data/silencer.rb +7 -5
- data/lib/secret_data/version.rb +1 -1
- data/spec/lib/secret_data/version_spec.rb +1 -1
- metadata +5 -4
data/.gitignore
CHANGED
data/README.md
CHANGED
data/changelog.md
ADDED
data/lib/secret_data/silencer.rb
CHANGED
@@ -55,11 +55,13 @@ class SecretData
|
|
55
55
|
|
56
56
|
def recursive_load(nested_hash, context='')
|
57
57
|
nested_hash.each_pair do |key, val|
|
58
|
-
case
|
59
|
-
when
|
60
|
-
|
61
|
-
when
|
62
|
-
|
58
|
+
case true
|
59
|
+
when val.respond_to?(:to_hash)
|
60
|
+
recursive_load(val.to_hash, "#{context}#{key}_")
|
61
|
+
when val.respond_to?(:to_s)
|
62
|
+
@secrets[val.to_s] = message_for("#{context}#{key}")
|
63
|
+
else
|
64
|
+
$stderr.puts 'WARN SecretData : Encountered a value that could not be converted to string.'
|
63
65
|
end
|
64
66
|
end
|
65
67
|
end
|
data/lib/secret_data/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: secret_data
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-07 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A helper class for silencing secret data.
|
15
15
|
email:
|
@@ -26,6 +26,7 @@ files:
|
|
26
26
|
- LICENSE
|
27
27
|
- README.md
|
28
28
|
- Rakefile
|
29
|
+
- changelog.md
|
29
30
|
- config.yml
|
30
31
|
- lib/secret_data.rb
|
31
32
|
- lib/secret_data/silencer.rb
|
@@ -49,7 +50,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
49
50
|
version: '0'
|
50
51
|
segments:
|
51
52
|
- 0
|
52
|
-
hash: -
|
53
|
+
hash: -1817811712912478693
|
53
54
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
55
|
none: false
|
55
56
|
requirements:
|
@@ -58,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
58
59
|
version: '0'
|
59
60
|
segments:
|
60
61
|
- 0
|
61
|
-
hash: -
|
62
|
+
hash: -1817811712912478693
|
62
63
|
requirements: []
|
63
64
|
rubyforge_project:
|
64
65
|
rubygems_version: 1.8.24
|