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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'gotime-cassandra_object'
5
- s.version = '2.10.4'
5
+ s.version = '2.10.5'
6
6
  s.description = 'Cassandra ActiveModel'
7
7
  s.summary = 'Cassandra ActiveModel'
8
8
 
@@ -1,5 +1,4 @@
1
- class <%= name %> < CassandraObject::Schema::Migration
2
-
1
+ class <%= name.classify %> < CassandraObject::Schema::Migration
3
2
  def self.up
4
3
 
5
4
  end
@@ -7,5 +6,4 @@ class <%= name %> < CassandraObject::Schema::Migration
7
6
  def self.down
8
7
 
9
8
  end
10
-
11
9
  end
@@ -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(ks.schema_dump.to_json)
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
- ks.schema_load CassandraObject::Tasks::Keyspace.parse(hash)
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
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-10 00:00:00.000000000 Z
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: &70334275426700 !ruby/object:Gem::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: *70334275426700
25
+ version_requirements: *70292668657020
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: cassandra
28
- requirement: &70334275424680 !ruby/object:Gem::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: *70334275424680
36
+ version_requirements: *70292668655180
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: bundler
39
- requirement: &70334275423800 !ruby/object:Gem::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: *70334275423800
47
+ version_requirements: *70292668654740
48
48
  description: Cassandra ActiveModel
49
49
  email: gems@gotime.com
50
50
  executables: []