eventus 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f044a21d912f891cddeb152780b7c9f1f572b8c4
4
- data.tar.gz: e129431af35652286f4c2a5a730e722e9087c341
3
+ metadata.gz: 4da30411f666bb3e50ec581a31e9f3e721703a4f
4
+ data.tar.gz: c800e974e35d6d6070706c58d17213cb5fe903e6
5
5
  SHA512:
6
- metadata.gz: 0a4079431f8c26910a46640182593fd03823547ed26b5a37d10a064fc2ba66417584720a5515387e51a7c0ad46b124f30daeed4fd63b96286c724d6795fdde6c
7
- data.tar.gz: 1a7a0edfc561aae0685c85b0ff5cabaa57b9293e70fd4b70b6ce3b9bf6c8a9944d43eb67995c85a03a021a26c8a14e357e9f8f0e338b18cc3eebf38e479410db
6
+ metadata.gz: a89dca93d85fb176ce473f27a95d06613226991033a5fefc70d5ec0221c371ef222ccf8a6db690e231d1ea28b722e4bc852d816547334b723fdd119f12743827
7
+ data.tar.gz: 8319eab2c36f3b2e61844214f259ac2586b21bb972e332942c6a026fcf1f707e1dd32541e1aed303c9ba4c4287d56cc1de21e1cd90b4733cec5b95eb770709f7
@@ -15,7 +15,7 @@ module Eventus
15
15
  def commit(events)
16
16
  @db.transaction(:savepoint => true) do
17
17
  events.each do |event|
18
- event['body'] = db.typecast_value(:json, event['body'])
18
+ event['body'] = db.typecast_value(:json, event['body'] || {})
19
19
  end
20
20
  @dataset.multi_insert(events)
21
21
  end
@@ -1,3 +1,3 @@
1
1
  module Eventus
2
- VERSION = "0.6.6"
2
+ VERSION = "0.6.7"
3
3
  end
@@ -22,6 +22,15 @@ describe Eventus::Persistence::Sequel do
22
22
  result['body'].should == event['body']
23
23
  end
24
24
 
25
+ it "stores nil body as empty object" do
26
+ id = uuid.generate :compact
27
+ commit = create_commit(id, 1, nil)
28
+ persistence.commit(commit)
29
+
30
+ result = persistence.load(id)[0]
31
+ result['body'].should == {}
32
+ end
33
+
25
34
  it "should return events" do
26
35
  id = uuid.generate :compact
27
36
  o = {'a' => 'super', 'complex' => ['object', 'with', {'nested' => ['members', 'galore', 1]}]}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eventus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Staten