sessionm-cassandra_object 2.2.43 → 2.2.44

Sign up to get free protection for your applications and to get access to all the features.
@@ -42,14 +42,16 @@ module CassandraObject
42
42
 
43
43
  def write(key, attributes, schema_version)
44
44
  key.tap do |key|
45
- attributes = encode_columns_hash(attributes, schema_version)
46
- ActiveSupport::Notifications.instrument("insert.cassandra_object", column_family: column_family, key: key, attributes: attributes) do
47
-
48
- options = {}.tap do |options|
49
- options[:consistency] = thrift_write_consistency
50
- options[:ttl] = row_ttl unless row_ttl.nil?
45
+ unless attributes.blank?
46
+ attributes = encode_columns_hash(attributes, schema_version)
47
+ ActiveSupport::Notifications.instrument("insert.cassandra_object", column_family: column_family, key: key, attributes: attributes) do
48
+
49
+ options = {}.tap do |options|
50
+ options[:consistency] = thrift_write_consistency
51
+ options[:ttl] = row_ttl unless row_ttl.nil?
52
+ end
53
+ connection.insert(column_family, key.to_s, attributes, options)
51
54
  end
52
- connection.insert(column_family, key.to_s, attributes, options)
53
55
  end
54
56
  end
55
57
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'sessionm-cassandra_object'
5
- s.version = '2.2.43'
5
+ s.version = '2.2.44'
6
6
  s.description = 'Cassandra ActiveModel'
7
7
  s.summary = 'Cassandra ActiveModel'
8
8
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 2
7
7
  - 2
8
- - 43
9
- version: 2.2.43
8
+ - 44
9
+ version: 2.2.44
10
10
  platform: ruby
11
11
  authors:
12
12
  - Michael Koziarski
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-03-28 00:00:00 -04:00
19
+ date: 2012-04-02 00:00:00 -04:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency