cequel-migrations-rails 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cequel/migration.rb +7 -3
- data/lib/cequel-migrations-rails/version.rb +1 -1
- metadata +2 -2
data/lib/cequel/migration.rb
CHANGED
@@ -3,7 +3,7 @@ module Cequel
|
|
3
3
|
attr_reader :db
|
4
4
|
|
5
5
|
def initialize
|
6
|
-
@db = CassandraCQL::Database.new(
|
6
|
+
@db = CassandraCQL::Database.new(server, { :keyspace => self.class.cequel_env_conf['keyspace'] }, thrift_options)
|
7
7
|
end
|
8
8
|
|
9
9
|
def execute(cql_string)
|
@@ -15,8 +15,12 @@ module Cequel
|
|
15
15
|
end
|
16
16
|
|
17
17
|
private
|
18
|
-
def
|
19
|
-
self.class.cequel_env_conf['hosts']
|
18
|
+
def server
|
19
|
+
if self.class.cequel_env_conf['hosts']
|
20
|
+
return self.class.cequel_env_conf['hosts'].first
|
21
|
+
else
|
22
|
+
return self.class.cequel_env_conf['host']
|
23
|
+
end
|
20
24
|
end
|
21
25
|
|
22
26
|
def thrift_options
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cequel-migrations-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: shearwater
|