hedgelog 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/hedgelog.gemspec +1 -1
- data/lib/hedgelog/scrub_replacement.rb +7 -5
- data/lib/hedgelog/version.rb +1 -1
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7d70de1320441d2248285276ba8f4c070a5c450a5855cad82e684b312675a5c
|
4
|
+
data.tar.gz: 3a2bddb8c0d3eaddc3424df7ceca01fe0f8de4f3594a03ec17a35f05b5860e9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 742f7fc2b72b941b78bfe08473c333e30ecf4364932f1badbf91f110305a26aac2c936ef959898c5c5e68d6a5b6ef07fbfb0772ec94f17ad2318bb10eb6e40f5
|
7
|
+
data.tar.gz: ae7614f4cc923e9a8d67a6b8fdb875699fcb40f6862f899349fcd42dfced3f43273cb374ed46029fc835840de681ce9b0782988ab7ff2fab1031b3eb300630a2
|
data/.travis.yml
CHANGED
data/hedgelog.gemspec
CHANGED
@@ -3,15 +3,17 @@ class Hedgelog
|
|
3
3
|
def initialize(key, replacement)
|
4
4
|
@key = key
|
5
5
|
@replacement = replacement
|
6
|
-
@match_regex = /("?)#{@key}(
|
6
|
+
@match_regex = /("?)#{@key}\1(=>|=|:)(\s*)("?)(.+?)\4(&|,|;|\s|$)/
|
7
7
|
end
|
8
8
|
|
9
9
|
def scrub_string(string)
|
10
10
|
string.gsub!(@match_regex) do
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
quote1 = Regexp.last_match[1]
|
12
|
+
sep = Regexp.last_match[2]
|
13
|
+
whitespace = Regexp.last_match[3]
|
14
|
+
quote2 = Regexp.last_match[4]
|
15
|
+
rest = Regexp.last_match[6]
|
16
|
+
"#{quote1}#{@key}#{quote1}#{sep}#{whitespace}#{quote2}#{@replacement}#{quote2}#{rest}"
|
15
17
|
end
|
16
18
|
end
|
17
19
|
|
data/lib/hedgelog/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hedgelog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Utter
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yajl-ruby
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
description: An opinionated/structured JSON logger for Ruby
|
42
42
|
email:
|
43
43
|
- jeff.utter@firespring.com
|
@@ -87,8 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '0'
|
89
89
|
requirements: []
|
90
|
-
|
91
|
-
rubygems_version: 2.7.7
|
90
|
+
rubygems_version: 3.0.3
|
92
91
|
signing_key:
|
93
92
|
specification_version: 4
|
94
93
|
summary: A strucutred JSON logger for Ruby
|