secret_data 0.0.2 → 0.0.3
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.
- data/README.md +4 -3
- data/lib/secret_data/version.rb +1 -1
- data/spec/lib/secret_data/version_spec.rb +1 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -31,18 +31,19 @@ Example usage with VCR gem to silence api credentials.
|
|
31
31
|
require 'vcr'
|
32
32
|
|
33
33
|
secret_data = SecretData.new(:yml_path => 'your_config.yml')
|
34
|
+
|
34
35
|
VCR.configure do |c|
|
35
|
-
secret_data.silence
|
36
|
+
secret_data.silence do |find, replace|
|
36
37
|
c.filter_sensitive_data(replace) { find }
|
37
38
|
end
|
38
39
|
end
|
39
40
|
|
40
41
|
Configuration via block is also allowed.
|
41
42
|
|
42
|
-
|
43
|
+
secret_data.new.configure { |config|
|
43
44
|
config.message = '~*~GOODBYE_{{var}}~*~' # optional
|
44
45
|
config.add_from_env('API_SECRET') # reads ENV['API_SECRET']
|
45
|
-
}.silence
|
46
|
+
}.silence { |secret, message|
|
46
47
|
puts "Have some ultra-confidential data: #{secret}!"
|
47
48
|
puts "...whoops, I should have shown you #{message}."
|
48
49
|
}
|
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.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -49,7 +49,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
49
49
|
version: '0'
|
50
50
|
segments:
|
51
51
|
- 0
|
52
|
-
hash: -
|
52
|
+
hash: -17330715242932135
|
53
53
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
54
|
none: false
|
55
55
|
requirements:
|
@@ -58,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
58
58
|
version: '0'
|
59
59
|
segments:
|
60
60
|
- 0
|
61
|
-
hash: -
|
61
|
+
hash: -17330715242932135
|
62
62
|
requirements: []
|
63
63
|
rubyforge_project:
|
64
64
|
rubygems_version: 1.8.24
|