inquisitio 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1f21fe3e248bfc71fe48ad21a377e5af5f66dab4
4
- data.tar.gz: 783537f85a674f4457b035b9bee329c917d0a1cc
3
+ metadata.gz: 7e07cc53ffa7b5cdb0d8b62c7f3afb38bec99b97
4
+ data.tar.gz: a954c3e4223e0b3df9a30271274d482ba793fb01
5
5
  SHA512:
6
- metadata.gz: 3b690662b732126c5d052a5e20375224fb9e71689fc2e97cc96f1749ea203c12d1438ea50b6c3619f69d0b46e56803d8cac9e068520d2adeb0fd585f9b3db0b7
7
- data.tar.gz: 538fe6d3f54a319bcd2d29ede1fe65fd84a4f21652c60c2b17a0bd88c9a84da0ee8b1f587278c92d2abda26b36f6f2c6c4062420a5cdfa5dcc34ad40e690d603
6
+ metadata.gz: 0037bcd1d4993960e3af1191d986b508000bc84f80c757c2db54097ee6a24bad66f17bf2a0190135ec53d1938cc46e1241d259edce2e8a8fb616830f6a6bf013
7
+ data.tar.gz: 76f5cec6d4ae58d2d9606f1e079cf92e0a05804da798b19375fbefedf7106cad4ecea23b2538bf835dc63728430bd5a80849d1202688427bcd3e443fc6628649
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ 0.1.6 / 2013-11-05
2
+
3
+ [BUGFIX] Correctly ignore nil fields when indexing.
4
+
1
5
  0.1.5 / 2013-11-05
2
6
 
3
7
  [FEATURE] Ignore nil fields when indexing.
@@ -7,7 +7,7 @@ module Inquisitio
7
7
  @type = type
8
8
  @id = id
9
9
  @version = version
10
- @fields = fields.reject! {|k,v| v.nil?}
10
+ @fields = fields.reject {|k,v| v.nil?}
11
11
  end
12
12
 
13
13
  def to_SDF
@@ -1,3 +1,3 @@
1
1
  module Inquisitio
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -44,5 +44,25 @@ module Inquisitio
44
44
  assert_equal JSON.parse(@expected_SDF).to_json,
45
45
  JSON.parse(@document.to_SDF).to_json
46
46
  end
47
+
48
+ def test_should_ignore_null_field_values_when_creating_SDF_json
49
+ expected_SDF =
50
+ <<-EOS
51
+ { "type": "add",
52
+ "id": "12345",
53
+ "version": 1,
54
+ "lang": "en",
55
+ "fields": {
56
+ "title": "The Title"
57
+ }
58
+ }
59
+ EOS
60
+
61
+ fields = { :title => 'The Title', :author => nil }
62
+ document = Document.new(@type, @id, @version, fields)
63
+
64
+ assert_equal JSON.parse(expected_SDF).to_json,
65
+ JSON.parse(document.to_SDF).to_json
66
+ end
47
67
  end
48
68
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inquisitio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Walker