jsoncrossreference 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/jsoncrossreference.rb +3 -3
- metadata +2 -2
data/lib/jsoncrossreference.rb
CHANGED
@@ -13,8 +13,8 @@ class JSONCrossreference
|
|
13
13
|
# Output: JSON with matches
|
14
14
|
# Limitations: Only returns data from one file. Matching multiple fields functions as && not ||. Only takes 2 files input
|
15
15
|
def compare(*fieldnames)
|
16
|
-
if JSON.parse(
|
17
|
-
file1 = JSON.parse(
|
16
|
+
if JSON.parse(@input2).length < JSON.parse(@input1).length
|
17
|
+
file1 = JSON.parse(@input2)
|
18
18
|
file1length = file1.length
|
19
19
|
file2 = @input1
|
20
20
|
|
@@ -24,7 +24,7 @@ class JSONCrossreference
|
|
24
24
|
end
|
25
25
|
fieldnames = tmparray
|
26
26
|
else
|
27
|
-
file1 = JSON.parse(
|
27
|
+
file1 = JSON.parse(@input1)
|
28
28
|
file1length = file1.length
|
29
29
|
file2 = @input2
|
30
30
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsoncrossreference
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-01-16 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Crossreferences JSONs and returns the matches
|
15
15
|
email: shidash@shidash.com
|