cassandra-model 0.2.1 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -43,7 +43,7 @@ task :test => :check_dependencies
43
43
 
44
44
  task :default => :test
45
45
 
46
- require 'rake/rdoctask'
46
+ require 'rdoc/task'
47
47
  Rake::RDocTask.new do |rdoc|
48
48
  version = File.exist?('VERSION') ? File.read('VERSION') : ""
49
49
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cassandra-model}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tien Le"]
@@ -88,7 +88,11 @@ module CassandraModel
88
88
  end
89
89
 
90
90
  def ==(other)
91
- true
91
+ if other.respond_to? :key
92
+ self.key == other.key
93
+ else
94
+ false
95
+ end
92
96
  end
93
97
 
94
98
  alias :eql? ==
@@ -1,7 +1,10 @@
1
1
  module CassandraModel
2
2
  class StringType
3
3
  def self.load(v)
4
- v && v.to_s
4
+ return '' unless v
5
+ s = v.to_s
6
+ s.force_encoding('UTF-8') if (RUBY_VERSION > '1.9' && s.encoding.name.downcase != 'utf-8')
7
+ s
5
8
  end
6
9
  end
7
10
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 1
9
- version: 0.2.1
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tien Le