g5-logger 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: caa3b73b0b6d5dfb41c6b7f37aca0cd4ff1379ad
4
- data.tar.gz: b5f982c46699a727d44616b0b71b6161a2d7c5f5
3
+ metadata.gz: 1eaf2a4fea4fddb5b389b00c298fea30ecc4aae6
4
+ data.tar.gz: e2a55c5960b45e5d440960aa2bfc6b59db0a4d6c
5
5
  SHA512:
6
- metadata.gz: 38b4c22960ef7dd4f5a2d5d2cead866abf40e1dee54e313ecca30f4e9607005389d14879f616d0d65a91f5ad0703882b0fb40fb97b556cfdd084d4186c2a2d73
7
- data.tar.gz: f8a129e1dfd6a9dd93519adb6e194fbb3f8b5b06bb03a2cbf54a66766819a6db85e3e1f725f47a8061d10064e1da23bbb8b350db02b15efce4f92cddcbea2122
6
+ metadata.gz: ad385de54dcc46860fc5553c0cc709825f42a4a6dc606bbc4902d3c53f899debd237d49c95e4df866fc524419ec0a799f927bff5cca07b729973cdaedd2a897f
7
+ data.tar.gz: 140870a5f58421cfd0d0544bf2c8e539352f3897b2789c3aa2c292aae5485e8334411925a4dd088c95abd0867643c7e3e738021ddd20686f89a69f6539dfd70f
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.1.3
1
+ 2.1.5
@@ -1,5 +1,5 @@
1
1
  module G5
2
2
  module Logger
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
data/lib/g5/logger.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'g5/logger/version'
2
2
  require 'g5/logger/log'
3
+ require 'active_support'
3
4
  require 'active_support/core_ext'
4
5
 
5
6
  module G5
@@ -11,7 +12,7 @@ module G5
11
12
  logger: 'REQUIRED', #usually Rails.logger
12
13
  source_app_name: 'REQUIRED - this is the name of the app using it',
13
14
  format: JSON_FORMAT, # json or key_value
14
- redact_keys: [/credit/, /password/, /cvv/],
15
+ redact_keys: [/credit/, /password/, /cvv/, /ssn/, /birth/, /drivers/],
15
16
  redact_value: '***',
16
17
  default_log_hash: {} #when you Log.log(your_hash), your_hash will get merged into the default_log_hash
17
18
  }
@@ -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', 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', 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,6 +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
28
  "parent" => {"cvv" => redact_value, "jimmy" => "joe"},
28
29
  "array" => [{"my_password" => redact_value, "redactme" => redact_value}]},
29
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.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Perry Hertler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-05 00:00:00.000000000 Z
11
+ date: 2015-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  version: '0'
149
149
  requirements: []
150
150
  rubyforge_project:
151
- rubygems_version: 2.2.2
151
+ rubygems_version: 2.4.3
152
152
  signing_key:
153
153
  specification_version: 4
154
154
  summary: Client gem that logs to the G5-logging-service.