jgrep 1.5.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/jgrep.rb +1 -1
- data/spec/unit/jgrep_spec.rb +6 -0
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 509f732ca3be7fd9dfa779aa9ed84add1984e2281d4aad57d4add5c3463d9bde
|
4
|
+
data.tar.gz: fff88143cbd608842d56c17fa68f4ddc0e8dab10bcf1ccb09cf13e20258a8202
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73185977c8e4fadf3690feca816591c085f8fc7982d4a2d45b6dfcdc141c85327b2ecfa72317a33ce91df4b17da543c06ec7cff0a2a8ed9fea208590daa7c9a0
|
7
|
+
data.tar.gz: '09a5b00c9c11d861d886e86c24f2c74f6d7a572dd4a9c98ba4c3cd08514bf565cb2713bc5d810171e11937d4d08a68df865e3b9d665b94ceb7a2225d245ef775'
|
data/lib/jgrep.rb
CHANGED
@@ -119,7 +119,7 @@ module JGrep
|
|
119
119
|
def self.format(kvalue, value)
|
120
120
|
if kvalue.to_s =~ /^\d+$/ && value.to_s =~ /^\d+$/
|
121
121
|
[Integer(kvalue), Integer(value)]
|
122
|
-
elsif kvalue.to_s =~ /^\d
|
122
|
+
elsif kvalue.to_s =~ /^\d+\.\d+$/ && value.to_s =~ /^\d+\.\d+$/
|
123
123
|
[Float(kvalue), Float(value)]
|
124
124
|
else
|
125
125
|
[kvalue, value]
|
data/spec/unit/jgrep_spec.rb
CHANGED
@@ -76,6 +76,12 @@ module JGrep
|
|
76
76
|
expect(result1.is_a?(String)).to eq(true)
|
77
77
|
expect(result2.is_a?(String)).to eq(true)
|
78
78
|
end
|
79
|
+
|
80
|
+
it 'should not format strings with a single [^\d\.] character' do
|
81
|
+
result1, result2 = JGrep.format("2012R2", "2008R2")
|
82
|
+
expect(result1).to be_a(String)
|
83
|
+
expect(result2).to be_a(String)
|
84
|
+
end
|
79
85
|
end
|
80
86
|
|
81
87
|
describe "#has_object?" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jgrep
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- P Loubser
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2020-02-28 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: Compare a list of json documents to a simple logical language and returns
|
16
16
|
matches as output
|
@@ -57,8 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
57
57
|
- !ruby/object:Gem::Version
|
58
58
|
version: '0'
|
59
59
|
requirements: []
|
60
|
-
|
61
|
-
rubygems_version: 2.5.1
|
60
|
+
rubygems_version: 3.0.3
|
62
61
|
signing_key:
|
63
62
|
specification_version: 4
|
64
63
|
summary: Filter JSON documents with a simple logical language
|