gotime-cassandra_object 2.11.8 → 2.11.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'gotime-cassandra_object'
5
- s.version = '2.11.8'
5
+ s.version = '2.11.9'
6
6
  s.description = 'Cassandra ActiveModel'
7
7
  s.summary = 'Cassandra ActiveModel'
8
8
 
@@ -15,11 +15,13 @@ module CassandraObject
15
15
  end
16
16
 
17
17
  def create(name, options = {})
18
- opts = { :name => name.to_s,
19
- :strategy_class => 'org.apache.cassandra.locator.SimpleStrategy',
20
- :replication_factor => 1,
21
- :cf_defs => [] }.merge(options)
22
-
18
+ opts = {
19
+ name: name.to_s,
20
+ strategy_class: 'org.apache.cassandra.locator.SimpleStrategy',
21
+ replication_factor: 1,
22
+ cf_defs: []
23
+ }.merge(options)
24
+
23
25
  ks = Cassandra::Keyspace.new.with_fields(opts)
24
26
  connection.add_keyspace ks
25
27
  end
@@ -60,11 +62,9 @@ module CassandraObject
60
62
 
61
63
  private
62
64
  def connection
63
- unless @connection
64
- c = CassandraObject::Base.connection
65
- @connection = Cassandra.new('system', c.servers, c.thrift_client_options)
65
+ @connection ||= begin
66
+ Cassandra.new('system', CassandraObject::Base.connection.servers)
66
67
  end
67
- @connection
68
68
  end
69
69
  end
70
70
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gotime-cassandra_object
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.8
4
+ version: 2.11.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-05-03 00:00:00.000000000 Z
13
+ date: 2012-05-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activemodel
@@ -196,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
196
  version: 1.3.5
197
197
  requirements: []
198
198
  rubyforge_project:
199
- rubygems_version: 1.8.21
199
+ rubygems_version: 1.8.24
200
200
  signing_key:
201
201
  specification_version: 3
202
202
  summary: Cassandra ActiveModel