leenookx-json-mangler 0.2.3 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  doc
2
2
  pkg
3
+ coverage
3
4
 
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'cucumber'
5
5
  require 'cucumber/rake/task'
6
6
 
7
7
  Cucumber::Rake::Task.new(:features) do |t|
8
- t.cucumber_opts = "features --format pretty"
8
+ t.cucumber_opts = "features"
9
9
  t.rcov = true
10
10
  end
11
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
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.3"
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-08-31}
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\": {" + @output + "} }\n"
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
 
@@ -0,0 +1,2 @@
1
+ require 'lib/json-mangler/json_mangler'
2
+ require 'lib/json-mangler/json_extractor'
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.3
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-08-31 00:00:00 -07:00
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