g5-logger 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/g5/logger.rb +1 -1
- data/lib/g5/logger/version.rb +1 -1
- data/spec/g5/logger/log_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30f6b01806c8db666fd315259a94ed98db53c46e
|
4
|
+
data.tar.gz: 645d9ceff1f5d5408cb05bd1a5c9a994d125967e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 401414cddf8452333bbd8c819dd07cdbbc866f5fc405ed819815e2ee5faa1a0ad62d086da0a116113b532a330fdb72b4052a0b32db320a94ecdbd9a8b6693367
|
7
|
+
data.tar.gz: 0ff7cc2ecb56788efd45e44bfdac08c7f62657f4514862b21108597855e2b4411142ffd460defdd9f9c580eaa5c3293253b385a1671d94d4dea84bef5c0bb47e
|
data/lib/g5/logger.rb
CHANGED
@@ -12,7 +12,7 @@ module G5
|
|
12
12
|
logger: 'REQUIRED', #usually Rails.logger
|
13
13
|
source_app_name: 'REQUIRED - this is the name of the app using it',
|
14
14
|
format: JSON_FORMAT, # json or key_value
|
15
|
-
redact_keys: [/credit/, /password/, /cvv/, /ssn/, /birth/, /drivers/],
|
15
|
+
redact_keys: [/credit/, /password/, /cvv/, /ssn/, /birth/, /drivers/, /salary/],
|
16
16
|
redact_value: '***',
|
17
17
|
default_log_hash: {} #when you Log.log(your_hash), your_hash will get merged into the default_log_hash
|
18
18
|
}
|
data/lib/g5/logger/version.rb
CHANGED
data/spec/g5/logger/log_spec.rb
CHANGED
@@ -12,7 +12,7 @@ describe G5::Logger::Log do
|
|
12
12
|
after do
|
13
13
|
G5::Logger::Config[:default_log_hash] = {}
|
14
14
|
end
|
15
|
-
let(:request) { {'credit_card' => '4344122144442222', foo: 'bar', ssn: '333224444', date_of_birth: '05-15-1976', parent: {cvv: '323', jimmy: 'joe'}, 'array' => [{'my_password' => 'jimpass', 'redactme' => 'secretval'}]} }
|
15
|
+
let(:request) { {'credit_card' => '4344122144442222', foo: 'bar', ssn: '333224444', date_of_birth: '05-15-1976', annual_salary: '$89000', parent: {cvv: '323', jimmy: 'joe'}, 'array' => [{'my_password' => 'jimpass', 'redactme' => 'secretval'}]} }
|
16
16
|
let(:body) { {credit_exp_date: '10/2015', whatever: 'brah'} }
|
17
17
|
let(:response) { double(:response, code: 201, body: body) }
|
18
18
|
let(:redact_value) { G5::Logger::Config[:redact_value] }
|
@@ -24,7 +24,7 @@ describe G5::Logger::Log do
|
|
24
24
|
|
25
25
|
it { is_expected.to eq({"source_app_name" => "test", "external_parent_source_name" => "g5-jobs", "foo" => "bar", "j_cvv" => redact_value, "status" => 201,
|
26
26
|
"request" => {"credit_card" => redact_value, "foo" => "bar",
|
27
|
-
"ssn"=>redact_value, "date_of_birth"=>redact_value,
|
27
|
+
"ssn"=>redact_value, "date_of_birth"=>redact_value, "annual_salary"=>redact_value,
|
28
28
|
"parent" => {"cvv" => redact_value, "jimmy" => "joe"},
|
29
29
|
"array" => [{"my_password" => redact_value, "redactme" => redact_value}]},
|
30
30
|
"response" => {"credit_exp_date" => redact_value, "whatever" => "brah"}}) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: g5-logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Perry Hertler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|