supernova 0.6.6 → 0.6.7

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.6
1
+ 0.6.7
@@ -268,7 +268,7 @@ class Supernova::SolrIndexer
268
268
  else
269
269
  self.current_json_string << ",\n"
270
270
  end
271
- self.current_json_string << %("add":#{{:doc => row}.to_json})
271
+ self.current_json_string << %("add":#{{:doc => row.delete_if { |key, value| value.nil? }}.to_json})
272
272
  end
273
273
 
274
274
  def finalize_json_string
@@ -84,6 +84,11 @@ describe Supernova::SolrIndexer do
84
84
  indexer.current_json_string.should == %({\n"add":{"doc":{"a":1}})
85
85
  end
86
86
 
87
+ it "removes nil values" do
88
+ indexer.append_to_json_string({"a" => 1, "b" => nil})
89
+ indexer.current_json_string.should == %({\n"add":{"doc":{"a":1}})
90
+ end
91
+
87
92
  it "appends to the existing string" do
88
93
  indexer.append_to_json_string({"a" => 1})
89
94
  indexer.append_to_json_string({"b" => 2})
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{supernova}
8
- s.version = "0.6.6"
8
+ s.version = "0.6.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tobias Schwab"]
12
- s.date = %q{2011-11-04}
12
+ s.date = %q{2011-11-07}
13
13
  s.default_executable = %q{start_solr}
14
14
  s.description = %q{Unified search scopes}
15
15
  s.email = %q{tobias.schwab@dynport.de}
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: supernova
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 6
10
- version: 0.6.6
9
+ - 7
10
+ version: 0.6.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tobias Schwab
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-04 00:00:00 +01:00
18
+ date: 2011-11-07 00:00:00 +01:00
19
19
  default_executable: start_solr
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency