sessionm-cassandra_object 2.5.4 → 2.5.5

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.
@@ -157,15 +157,11 @@ module CassandraObject
157
157
 
158
158
  if defined?(EM)
159
159
  def self.connection_pool
160
- if self.connection_spec[:datacenter]
161
- EM.reactor_running? ? self.async_ranged_connection_pool : self.sync_ranged_connection_pool
162
- else
163
- EM.reactor_running? ? self.async_connection_pool : self.sync_connection_pool
164
- end
160
+ EM.reactor_running? ? self.async_connection_pool : self.sync_connection_pool
165
161
  end
166
162
  else
167
163
  def self.connection_pool
168
- self.connection_spec[:datacenter] ? self.ranged_connection_pool : self.sync_connection_pool
164
+ self.sync_connection_pool
169
165
  end
170
166
  end
171
167
 
@@ -174,12 +170,12 @@ module CassandraObject
174
170
  end
175
171
 
176
172
  def self.connection()
177
- self.connection_pool.connection
173
+ self.connection_spec[:datacenter] ? self.ranged_connection.connection : self.connection_pool.connection
178
174
  end
179
175
  def self.connection?() !!connection end
180
176
 
181
177
  def self.with_connection(key=nil, &block)
182
- self.connection_pool.with_connection(&block)
178
+ self.connection_spec[:datacenter] ? self.ranged_connection_pool.with_connection(key, &block) : self.connection_pool.with_connection(&block)
183
179
  end
184
180
 
185
181
  def with_connection(key=nil, &block)
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'sessionm-cassandra_object'
5
- s.version = '2.5.4'
5
+ s.version = '2.5.5'
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
  - 5
8
- - 4
9
- version: 2.5.4
8
+ - 5
9
+ version: 2.5.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Michael Koziarski