gotime-cassandra_object 2.10.4 → 2.10.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -58,9 +58,8 @@ namespace :ks do
|
|
58
58
|
|
59
59
|
private
|
60
60
|
def schema_dump(env = Rails.env)
|
61
|
-
ks = set_keyspace env
|
62
61
|
File.open "#{Rails.root}/ks/schema.json", 'w' do |file|
|
63
|
-
schema = ActiveSupport::JSON.decode(
|
62
|
+
schema = ActiveSupport::JSON.decode(get_keyspace.schema_dump.to_json)
|
64
63
|
JSON.pretty_generate(schema).split(/\n/).each do |line|
|
65
64
|
file.puts line
|
66
65
|
end
|
@@ -68,10 +67,9 @@ namespace :ks do
|
|
68
67
|
end
|
69
68
|
|
70
69
|
def schema_load(env = Rails.env)
|
71
|
-
ks = set_keyspace env
|
72
70
|
File.open "#{Rails.root}/ks/schema.json", 'r' do |file|
|
73
71
|
hash = JSON.parse(file.read(nil))
|
74
|
-
|
72
|
+
get_keyspace.schema_load CassandraObject::Tasks::Keyspace.parse(hash)
|
75
73
|
end
|
76
74
|
end
|
77
75
|
|
@@ -81,5 +79,11 @@ namespace :ks do
|
|
81
79
|
cassandra_configs[Rails.env || 'development']
|
82
80
|
end
|
83
81
|
end
|
82
|
+
|
83
|
+
def get_keyspace
|
84
|
+
ks = CassandraObject::Tasks::Keyspace.new
|
85
|
+
ks.set cassandra_config['keyspace']
|
86
|
+
ks
|
87
|
+
end
|
84
88
|
end
|
85
89
|
|
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.10.
|
4
|
+
version: 2.10.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-01-
|
13
|
+
date: 2012-01-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activemodel
|
17
|
-
requirement: &
|
17
|
+
requirement: &70292668657020 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: '3.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70292668657020
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: cassandra
|
28
|
-
requirement: &
|
28
|
+
requirement: &70292668655180 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: 0.12.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70292668655180
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: bundler
|
39
|
-
requirement: &
|
39
|
+
requirement: &70292668654740 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,7 +44,7 @@ dependencies:
|
|
44
44
|
version: '0'
|
45
45
|
type: :development
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *70292668654740
|
48
48
|
description: Cassandra ActiveModel
|
49
49
|
email: gems@gotime.com
|
50
50
|
executables: []
|