gotime-cassandra_object 4.3.0 → 4.3.1
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.
- data/gotime-cassandra_object.gemspec +1 -1
- data/lib/cassandra_object/tasks/ks.rake +10 -4
- metadata +1 -1
@@ -10,10 +10,7 @@ ks_namespace = namespace :ks do
|
|
10
10
|
|
11
11
|
task reset: [:drop, :setup]
|
12
12
|
|
13
|
-
task setup: :create
|
14
|
-
filename = ENV['SCHEMA'] || "#{Rails.root}/ks/structure.cql"
|
15
|
-
CassandraObject::Schema.load(filename)
|
16
|
-
end
|
13
|
+
task setup: [:create, :_load]
|
17
14
|
|
18
15
|
namespace :structure do
|
19
16
|
task dump: :environment do
|
@@ -22,12 +19,21 @@ ks_namespace = namespace :ks do
|
|
22
19
|
CassandraObject::Schema.dump(file)
|
23
20
|
end
|
24
21
|
end
|
22
|
+
|
23
|
+
task load: :environment do
|
24
|
+
filename = ENV['SCHEMA'] || "#{Rails.root}/ks/structure.cql"
|
25
|
+
CassandraObject::Schema.load(filename)
|
26
|
+
end
|
25
27
|
end
|
26
28
|
|
27
29
|
task :_dump do
|
28
30
|
ks_namespace["structure:dump"].invoke
|
29
31
|
end
|
30
32
|
|
33
|
+
task :_load do
|
34
|
+
ks_namespace["structure:load"].invoke
|
35
|
+
end
|
36
|
+
|
31
37
|
private
|
32
38
|
def cassandra_config
|
33
39
|
@cassandra_config ||= begin
|