sessionm-cassandra_object 2.2.33 → 2.2.34
Sign up to get free protection for your applications and to get access to all the features.
data/lib/cassandra_object.rb
CHANGED
@@ -6,11 +6,9 @@ module CassandraObject
|
|
6
6
|
# TODO: is this the convention?
|
7
7
|
include ActiveRecord::Reflection
|
8
8
|
include ActiveRecord::Associations
|
9
|
-
include ActiveRecord::AutosaveAssociation
|
10
9
|
|
11
10
|
autoload :OneToMany
|
12
11
|
autoload :OneToOne
|
13
|
-
autoload :AutosaveAssociation
|
14
12
|
|
15
13
|
included do
|
16
14
|
class_inheritable_hash :associations
|
@@ -34,6 +34,7 @@ module CassandraObject
|
|
34
34
|
include AsyncConnection
|
35
35
|
#include Connection
|
36
36
|
include Consistency
|
37
|
+
include RowTTL
|
37
38
|
include Identity
|
38
39
|
include Attributes
|
39
40
|
include Persistence
|
@@ -95,8 +96,5 @@ module CassandraObject
|
|
95
96
|
def []=(attr_name, value)
|
96
97
|
write_attribute(attr_name, value)
|
97
98
|
end
|
98
|
-
|
99
|
-
class_attribute :pluralize_table_names, :instance_writer => false
|
100
|
-
self.pluralize_table_names = true
|
101
99
|
end
|
102
100
|
end
|
@@ -35,7 +35,12 @@ module CassandraObject
|
|
35
35
|
key.tap do |key|
|
36
36
|
attributes = encode_columns_hash(attributes, schema_version)
|
37
37
|
ActiveSupport::Notifications.instrument("insert.cassandra_object", column_family: column_family, key: key, attributes: attributes) do
|
38
|
-
|
38
|
+
|
39
|
+
options = {}.tap do |options|
|
40
|
+
options[:consistency] = thrift_write_consistency
|
41
|
+
options[:ttl] = row_ttl unless row_ttl.nil?
|
42
|
+
end
|
43
|
+
connection.insert(column_family, key.to_s, attributes, options)
|
39
44
|
end
|
40
45
|
end
|
41
46
|
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.
|
5
|
+
s.version = '2.2.34'
|
6
6
|
s.description = 'Cassandra ActiveModel'
|
7
7
|
s.summary = 'Cassandra ActiveModel'
|
8
8
|
|
@@ -18,8 +18,8 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
19
|
s.require_paths = ['lib']
|
20
20
|
|
21
|
-
s.add_runtime_dependency('rails', "
|
22
|
-
s.add_runtime_dependency('cassandra', ">= 0.
|
21
|
+
s.add_runtime_dependency('rails', "~> 3.0")
|
22
|
+
s.add_runtime_dependency('cassandra', ">= 0.11.3")
|
23
23
|
|
24
24
|
s.add_development_dependency('bundler', "~> 1.0.0")
|
25
25
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sessionm-cassandra_object
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.34
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,33 +11,33 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2011-
|
14
|
+
date: 2011-12-16 00:00:00.000000000Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
18
|
-
requirement: &
|
18
|
+
requirement: &70137110867960 !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
21
|
-
- -
|
21
|
+
- - ~>
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: '3.
|
23
|
+
version: '3.0'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
|
-
version_requirements: *
|
26
|
+
version_requirements: *70137110867960
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: cassandra
|
29
|
-
requirement: &
|
29
|
+
requirement: &70137110867500 !ruby/object:Gem::Requirement
|
30
30
|
none: false
|
31
31
|
requirements:
|
32
32
|
- - ! '>='
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0.
|
34
|
+
version: 0.11.3
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
|
-
version_requirements: *
|
37
|
+
version_requirements: *70137110867500
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: bundler
|
40
|
-
requirement: &
|
40
|
+
requirement: &70137110867040 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
43
|
- - ~>
|
@@ -45,7 +45,7 @@ dependencies:
|
|
45
45
|
version: 1.0.0
|
46
46
|
type: :development
|
47
47
|
prerelease: false
|
48
|
-
version_requirements: *
|
48
|
+
version_requirements: *70137110867040
|
49
49
|
description: Cassandra ActiveModel
|
50
50
|
email: klange@sessionm.com
|
51
51
|
executables: []
|
@@ -91,6 +91,7 @@ files:
|
|
91
91
|
- lib/cassandra_object/mocking.rb
|
92
92
|
- lib/cassandra_object/persistence.rb
|
93
93
|
- lib/cassandra_object/railtie.rb
|
94
|
+
- lib/cassandra_object/row_ttl.rb
|
94
95
|
- lib/cassandra_object/schema.rb
|
95
96
|
- lib/cassandra_object/schema/migration.rb
|
96
97
|
- lib/cassandra_object/schema/migration_proxy.rb
|