leenookx-json-mangler 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -0
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/features/test_comparisons/2level_extraction.json +1 -1
- data/features/test_comparisons/array_extraction.json +1 -1
- data/features/test_comparisons/author_extraction.json +1 -1
- data/features/test_comparisons/empty_extraction.json +1 -1
- data/features/test_comparisons/published_extraction.json +1 -1
- data/json-mangler.gemspec +3 -2
- data/lib/json-mangler/json_extractor.rb +2 -2
- data/lib/json-mangler.rb +2 -0
- metadata +3 -2
data/.gitignore
CHANGED
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.5
|
@@ -1 +1 @@
|
|
1
|
-
{ "results": {"title": "A test document", "author": "My Name", "published": "1999", "keywords": ["rubbish", "nonsense"]} }
|
1
|
+
{ "results": [{"title": "A test document", "author": "My Name", "published": "1999", "keywords": ["rubbish", "nonsense"]}] }
|
@@ -1 +1 @@
|
|
1
|
-
{ "results": {"keywords": ["rubbish", "nonsense"]} }
|
1
|
+
{ "results": [{"keywords": ["rubbish", "nonsense"]}] }
|
@@ -1 +1 @@
|
|
1
|
-
{ "results": {"author": "My Name"} }
|
1
|
+
{ "results": [{"author": "My Name"}] }
|
@@ -1 +1 @@
|
|
1
|
-
{ "results":
|
1
|
+
{ "results": [] }
|
@@ -1 +1 @@
|
|
1
|
-
{ "results": {"published": "1999"} }
|
1
|
+
{ "results": [{"published": "1999"}] }
|
data/json-mangler.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{json-mangler}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["lee nookx"]
|
12
|
-
s.date = %q{2009-
|
12
|
+
s.date = %q{2009-09-01}
|
13
13
|
s.description = %q{JSON data format mangling tools.}
|
14
14
|
s.email = %q{lnookx@googlemail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -47,6 +47,7 @@ Gem::Specification.new do |s|
|
|
47
47
|
"features/test_comparisons/empty_extraction.json",
|
48
48
|
"features/test_comparisons/published_extraction.json",
|
49
49
|
"json-mangler.gemspec",
|
50
|
+
"lib/json-mangler.rb",
|
50
51
|
"lib/json-mangler/json_extractor.rb",
|
51
52
|
"lib/json-mangler/json_mangler.rb",
|
52
53
|
"test/test_json_mangler.rb"
|
@@ -32,7 +32,7 @@ class JSONExtractor
|
|
32
32
|
|
33
33
|
parse_value
|
34
34
|
|
35
|
-
results = "{ \"results\":
|
35
|
+
results = "{ \"results\": [" + @output + "] }\n"
|
36
36
|
end
|
37
37
|
|
38
38
|
private
|
@@ -226,7 +226,7 @@ class JSONExtractor
|
|
226
226
|
@output << ", "
|
227
227
|
end
|
228
228
|
|
229
|
-
@output << fragment
|
229
|
+
@output << '{' << fragment << '}'
|
230
230
|
end
|
231
231
|
end
|
232
232
|
|
data/lib/json-mangler.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: leenookx-json-mangler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lee nookx
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-09-01 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -53,6 +53,7 @@ files:
|
|
53
53
|
- features/test_comparisons/empty_extraction.json
|
54
54
|
- features/test_comparisons/published_extraction.json
|
55
55
|
- json-mangler.gemspec
|
56
|
+
- lib/json-mangler.rb
|
56
57
|
- lib/json-mangler/json_extractor.rb
|
57
58
|
- lib/json-mangler/json_mangler.rb
|
58
59
|
- test/test_json_mangler.rb
|