carwash 1.0.6 → 1.0.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4db8f621bb66ead951cd9ba7fc599171653c225c
4
- data.tar.gz: c47e0944bc3fc87b4e21b76ea526bd8bedf9cd0b
3
+ metadata.gz: ee6629f61a2db520c4ddf5fbb26095361cca39eb
4
+ data.tar.gz: c7183ec7e0d71c506f98afd0a8d414bc61aba8b7
5
5
  SHA512:
6
- metadata.gz: d562ecb14545ab964b7d28e72d17093b77d842fb47f60946de42fe9c0bee80dea832348a8c5c9bbe57944a31926ad10391e72594e4d0e67a7046cb2f7d825995
7
- data.tar.gz: 4a14ffdb810e9569f3da63dd183e24527e8d0004bec5ba4972b88db97de5e8299bc23c1e11d3c86c096dc16f0945b4dd47c70e56a7e3f001480ad45e8d3b395c
6
+ metadata.gz: ec7b6ea3e4eed94be2224b2221545a09a8d1617d07b8c0a5197910d6678bc23371b94f7644bb745d42ba4b51fc69ab2bde430d37c535930a56875da340ba82f7
7
+ data.tar.gz: 2bae763ae487f064baa6ce6726473c8c691e437f3156c3662d87610486d67c692a0144732fab0fa5a8d89f822d11888860aa6cddefbf233eacd705efc7ecdb80
@@ -0,0 +1,30 @@
1
+ # Ruby CircleCI 2.0 configuration file
2
+ #
3
+ # Check https://circleci.com/docs/2.0/language-ruby/ for more details
4
+ #
5
+ version: 2
6
+ jobs:
7
+ build:
8
+ docker:
9
+ - image: circleci/ruby:2.3.4
10
+ working_directory: ~/repo
11
+ steps:
12
+ - checkout
13
+ - run:
14
+ name: install dependencies
15
+ command: |
16
+ bundle install --jobs=4 --retry=3 --path vendor/bundle
17
+ - run:
18
+ name: run tests
19
+ command: |
20
+ mkdir /tmp/test-results
21
+
22
+ bundle exec rspec --format progress \
23
+ --format RspecJunitFormatter \
24
+ --out /tmp/test-results/rspec.xml \
25
+ --format progress
26
+ - store_test_results:
27
+ path: /tmp/test-results
28
+ - store_artifacts:
29
+ path: /tmp/test-results
30
+ destination: test-results
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Carwash
2
2
 
3
+ [![CircleCI](https://circleci.com/gh/tokenshift/ruby_carwash.svg?style=svg)](https://circleci.com/gh/tokenshift/ruby_carwash)
4
+
3
5
  Log sanitizer. Obscures passwords and other potentially sensitive values in log
4
6
  entries.
5
7
 
@@ -25,4 +25,5 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency "bundler", "~> 1.14"
26
26
  spec.add_development_dependency "rake", "~> 10.0"
27
27
  spec.add_development_dependency "rspec", "~> 3.0"
28
+ spec.add_development_dependency "rspec_junit_formatter"
28
29
  end
@@ -88,7 +88,8 @@ class Carwash::Scrubber
88
88
  # detected. Makes replacements in place.
89
89
  def obscure_sensitive_values!(line, obscure_with: self.obscure_with)
90
90
  @sensitive_vals.each do |val|
91
- line.gsub!(val, obscure_with)
91
+ val=Regexp::escape(val)
92
+ line.gsub!(/#{val}/i, obscure_with)
92
93
  end
93
94
  end
94
95
 
@@ -107,7 +108,7 @@ class Carwash::Scrubber
107
108
  obscure_sensitive_values!(line, obscure_with: obscure_with)
108
109
  end
109
110
 
110
- # Learns from and scrubs each line of an input stream, writing the result to
111
+ # Learns from and scrubs each line of an input stream, writing the result to
111
112
  # the given output stream.
112
113
  def scrub_stream(input, output)
113
114
  input.each_line do |line|
@@ -2,14 +2,11 @@
2
2
  # values.
3
3
  #
4
4
  # Looks for the following patterns of key-value pairs:
5
- # KEY=value
6
- # KEY='value'
7
- # KEY="value"
8
- # KEY value
9
- # KEY 'value'
10
- # KEY "value"
11
- # KEY: value
12
- # KEY => value
5
+ # * KEY=value
6
+ # * KEY value
7
+ # * KEY: value
8
+ # * KEY => value
9
+ # Where the value may be single or double quoted.
13
10
  class Carwash::ValueDiscoverer < Struct.new(:key)
14
11
  ESCAPE_CHARACTERS = {
15
12
  "\\0" => "\0",
@@ -1,3 +1,3 @@
1
1
  module Carwash
2
- VERSION = "1.0.6"
2
+ VERSION = "1.0.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carwash
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Clark
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-14 00:00:00.000000000 Z
11
+ date: 2017-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec_junit_formatter
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description:
56
70
  email:
57
71
  - nathan.clark@tokenshift.com
@@ -59,6 +73,7 @@ executables: []
59
73
  extensions: []
60
74
  extra_rdoc_files: []
61
75
  files:
76
+ - ".circleci/config.yml"
62
77
  - ".gitignore"
63
78
  - ".rspec"
64
79
  - ".ruby-version"