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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad4599bd517f673d1e48ae116e245e7bd1359de3dd39f4b77c302a48c7d1314c
4
- data.tar.gz: 6c20071765b9b90e2dadab72f2a6b03cdda3c773b1bc55cfb2650aeacb0b1e17
3
+ metadata.gz: f7d70de1320441d2248285276ba8f4c070a5c450a5855cad82e684b312675a5c
4
+ data.tar.gz: 3a2bddb8c0d3eaddc3424df7ceca01fe0f8de4f3594a03ec17a35f05b5860e9a
5
5
  SHA512:
6
- metadata.gz: d5788a198de13d7d4cea307398ddf27d4fc6a61d02adeb1ceac90c191ae93a0ad2a39b9f1b9af54cf3770cd879542eaf953988da5a0187ec3afd15ca5f9b4165
7
- data.tar.gz: bea33ebd32155d2604ffee833122dc0fff3cc93bccc37ad23a792bc73726b42f163ccf85e9650763ae0edb402a7fa6133d95c804afb7615dec16b78d8e201167
6
+ metadata.gz: 742f7fc2b72b941b78bfe08473c333e30ecf4364932f1badbf91f110305a26aac2c936ef959898c5c5e68d6a5b6ef07fbfb0772ec94f17ad2318bb10eb6e40f5
7
+ data.tar.gz: ae7614f4cc923e9a8d67a6b8fdb875699fcb40f6862f899349fcd42dfced3f43273cb374ed46029fc835840de681ce9b0782988ab7ff2fab1031b3eb300630a2
data/.travis.yml CHANGED
@@ -1,6 +1,9 @@
1
1
  language: ruby
2
2
  cache: bundler
3
3
  rvm: 2.4
4
+ before_install:
5
+ - gem update --system
6
+ - gem install bundler
4
7
  script:
5
8
  - bundle exec bundle-audit update && bundle exec bundle-audit check
6
9
  - bundle exec rspec
data/hedgelog.gemspec CHANGED
@@ -19,5 +19,5 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ['lib']
20
20
 
21
21
  spec.add_dependency 'yajl-ruby', '~> 1.4'
22
- spec.add_development_dependency 'bundler', '~> 1.7'
22
+ spec.add_development_dependency 'bundler'
23
23
  end
@@ -3,15 +3,17 @@ class Hedgelog
3
3
  def initialize(key, replacement)
4
4
  @key = key
5
5
  @replacement = replacement
6
- @match_regex = /("?)#{@key}("?[=:]\s*"?)(.+?)(["&,;\s]|$)/
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
- start = Regexp.last_match[1]
12
- eql = Regexp.last_match[2]
13
- delim = Regexp.last_match[4]
14
- "#{start}#{@key}#{eql}#{@replacement}#{delim}"
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Hedgelog
4
- VERSION = '0.1.11'
4
+ VERSION = '0.1.12'
5
5
  end
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.11
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: 2018-11-14 00:00:00.000000000 Z
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: '1.7'
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: '1.7'
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
- rubyforge_project:
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