gotime-cassandra_object 2.11.5 → 2.11.6

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.11.5'
5
+ s.version = '2.11.6'
6
6
  s.description = 'Cassandra ActiveModel'
7
7
  s.summary = 'Cassandra ActiveModel'
8
8
 
@@ -56,7 +56,7 @@ module CassandraObject
56
56
  self.attributes = attributes
57
57
  attribute_definitions.each do |attr, attribute_definition|
58
58
  unless attribute_exists?(attr)
59
- self.attributes[attr.to_s] = self.class.typecast_attribute(self, attr, nil)
59
+ @attributes[attr.to_s] = self.class.typecast_attribute(self, attr, nil)
60
60
  end
61
61
  end
62
62
 
@@ -4,7 +4,7 @@ module CassandraObject
4
4
 
5
5
  module ClassMethods
6
6
  def find_each
7
- connection.each(column_family, {:count => 500}) do |k, v|
7
+ connection.each(column_family, count: 500) do |k, v|
8
8
  yield instantiate(k, v)
9
9
  end
10
10
  end
@@ -1,18 +1,18 @@
1
1
  namespace :ks do
2
2
  desc 'Create the keyspace in cassandra_config/cassandra.yml for the current environment'
3
- task :create => :environment do
3
+ task create: :environment do
4
4
  CassandraObject::Tasks::Keyspace.new.create cassandra_config['keyspace'], cassandra_config
5
5
  puts "Created keyspace: #{cassandra_config['keyspace']}"
6
6
  end
7
7
 
8
8
  desc 'Drop keyspace in cassandra_config/cassandra.yml for the current environment'
9
- task :drop => :environment do
9
+ task drop: :environment do
10
10
  CassandraObject::Tasks::Keyspace.new.drop cassandra_config['keyspace']
11
11
  puts "Dropped keyspace: #{cassandra_config['keyspace']}"
12
12
  end
13
13
 
14
14
  desc 'Migrate the keyspace (options: VERSION=x)'
15
- task :migrate => :environment do
15
+ task migrate: :environment do
16
16
  version = ( ENV['VERSION'] ? ENV['VERSION'].to_i : nil )
17
17
  CassandraObject::Schema::Migrator.migrate CassandraObject::Schema::Migrator.migrations_path, version
18
18
  schema_dump
@@ -30,7 +30,7 @@ namespace :ks do
30
30
  end
31
31
 
32
32
  desc 'Pushes the schema to the next version (specify steps w/ STEP=n)'
33
- task :forward => :environment do
33
+ task forward: :environment do
34
34
  step = ENV['STEP'] ? ENV['STEP'].to_i : 1
35
35
  CassandraObject::Schema::Migrator.forward CassandraObject::Schema::Migrator.migrations_path, step
36
36
  schema_dump
@@ -50,7 +50,7 @@ namespace :ks do
50
50
 
51
51
  namespace :test do
52
52
  desc 'Load the development schema in to the test keyspace'
53
- task :prepare => :environment do
53
+ task prepare: :environment do
54
54
  schema_dump :development
55
55
  schema_load :test
56
56
  end
@@ -20,6 +20,10 @@ class CassandraObject::Types::ArrayTypeTest < CassandraObject::Types::TestCase
20
20
  array :favorite_colors, unique: true
21
21
  end
22
22
 
23
+ test 'default' do
24
+ assert_equal [], TestIssue.new.favorite_colors
25
+ end
26
+
23
27
  test 'append marks dirty' do
24
28
  issue = TestIssue.create favorite_colors: []
25
29
  assert !issue.changed?
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.11.5
4
+ version: 2.11.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: