string_scrubber 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/string_scrubber/version.rb +1 -1
- data/lib/string_scrubber.rb +6 -1
- data/string_scrubber.gemspec +2 -0
- metadata +33 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfd4cd981ca09c1f43d73ed3421197e1fe5272ca
|
4
|
+
data.tar.gz: 238a992d57fdef0ef6807188b73abac6ba927f2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9be967a037ac759ba0c0b4cc575e40df5a8f85d1468e3a74b8916b736f90b7c8e91c6d541a36a8d39facf968e1604f1b98d187f045b80ed0b70a47ed8fb8316c
|
7
|
+
data.tar.gz: b8965693d3c17e837a9d6569d27ea88aeedf09013019e06a7052ccf73ff7fbb0576d023c432c175b1a8daf4438be8fef43067fb14fb8f2b32c1776ae7740bfdb
|
data/README.md
CHANGED
@@ -6,6 +6,8 @@ Climate](https://codeclimate.com/github/ministryofjustice/string_scrubber/badges
|
|
6
6
|
CI](https://circleci.com/gh/ministryofjustice/string_scrubber.svg?style=svg)](https://circleci.com/gh/ministryofjustice/string_scrubber)
|
7
7
|
[![Test
|
8
8
|
Coverage](https://codeclimate.com/github/ministryofjustice/string_scrubber/badges/coverage.svg)](https://codeclimate.com/github/ministryofjustice/string_scrubber/coverage)
|
9
|
+
[![Gem
|
10
|
+
Version](https://badge.fury.io/rb/string_scrubber.svg)](http://badge.fury.io/rb/string_scrubber)
|
9
11
|
|
10
12
|
|
11
13
|
This gem prevents #to_json calls from raising exceptions on strings that
|
data/lib/string_scrubber.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'string_scrubber/version'
|
2
|
+
require 'string-scrub' if RUBY_VERSION[/^2\.0/]
|
2
3
|
|
3
4
|
module StringScrubber
|
4
5
|
def to_json(options = nil)
|
@@ -8,4 +9,8 @@ module StringScrubber
|
|
8
9
|
end
|
9
10
|
end
|
10
11
|
|
11
|
-
|
12
|
+
if RUBY_VERSION[/^2\.0/].nil?
|
13
|
+
String.prepend(StringScrubber)
|
14
|
+
else
|
15
|
+
String.send :prepend, StringScrubber
|
16
|
+
end
|
data/string_scrubber.gemspec
CHANGED
@@ -25,6 +25,8 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
26
26
|
spec.require_paths = ["lib"]
|
27
27
|
|
28
|
+
spec.add_runtime_dependency "string-scrub", "~> 0.0.5" if RUBY_VERSION[/^2\.0/]
|
29
|
+
|
28
30
|
spec.add_development_dependency "bundler", "~> 1.10"
|
29
31
|
spec.add_development_dependency "rake", "~> 10.0"
|
30
32
|
spec.add_development_dependency "rspec", "~> 3.3"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: string_scrubber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Todd Tyree
|
@@ -10,88 +10,102 @@ bindir: exe
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2015-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: string-scrub
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.0.5
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.0.5
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
|
-
- -
|
31
|
+
- - ~>
|
18
32
|
- !ruby/object:Gem::Version
|
19
33
|
version: '1.10'
|
20
34
|
type: :development
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
|
-
- -
|
38
|
+
- - ~>
|
25
39
|
- !ruby/object:Gem::Version
|
26
40
|
version: '1.10'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rake
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
|
-
- -
|
45
|
+
- - ~>
|
32
46
|
- !ruby/object:Gem::Version
|
33
47
|
version: '10.0'
|
34
48
|
type: :development
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
|
-
- -
|
52
|
+
- - ~>
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '10.0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rspec
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
|
-
- -
|
59
|
+
- - ~>
|
46
60
|
- !ruby/object:Gem::Version
|
47
61
|
version: '3.3'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
|
-
- -
|
66
|
+
- - ~>
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '3.3'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: json
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- -
|
73
|
+
- - ~>
|
60
74
|
- !ruby/object:Gem::Version
|
61
75
|
version: '1.8'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- -
|
80
|
+
- - ~>
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '1.8'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: simplecov
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
|
-
- -
|
87
|
+
- - ~>
|
74
88
|
- !ruby/object:Gem::Version
|
75
89
|
version: '0.10'
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
|
-
- -
|
94
|
+
- - ~>
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '0.10'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: codeclimate-test-reporter
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
|
-
- -
|
101
|
+
- - ~>
|
88
102
|
- !ruby/object:Gem::Version
|
89
103
|
version: '0.4'
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
|
-
- -
|
108
|
+
- - ~>
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '0.4'
|
97
111
|
description: Logstasher fails if controller params are not properly encoded. This
|
@@ -102,9 +116,9 @@ executables: []
|
|
102
116
|
extensions: []
|
103
117
|
extra_rdoc_files: []
|
104
118
|
files:
|
105
|
-
-
|
106
|
-
-
|
107
|
-
-
|
119
|
+
- .gitignore
|
120
|
+
- .rspec
|
121
|
+
- .travis.yml
|
108
122
|
- Gemfile
|
109
123
|
- README.md
|
110
124
|
- Rakefile
|
@@ -125,17 +139,17 @@ require_paths:
|
|
125
139
|
- lib
|
126
140
|
required_ruby_version: !ruby/object:Gem::Requirement
|
127
141
|
requirements:
|
128
|
-
- -
|
142
|
+
- - '>='
|
129
143
|
- !ruby/object:Gem::Version
|
130
144
|
version: '0'
|
131
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
146
|
requirements:
|
133
|
-
- -
|
147
|
+
- - '>='
|
134
148
|
- !ruby/object:Gem::Version
|
135
149
|
version: '0'
|
136
150
|
requirements: []
|
137
151
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.
|
152
|
+
rubygems_version: 2.0.14
|
139
153
|
signing_key:
|
140
154
|
specification_version: 4
|
141
155
|
summary: Drop in fix for JSON UTF-8 encoding errors in logstasher.
|