gotime-cassandra_object 2.4.1 → 2.4.2

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.4.1'
5
+ s.version = '2.4.2'
6
6
  s.description = 'Cassandra ActiveModel'
7
7
  s.summary = 'Cassandra ActiveModel'
8
8
 
@@ -4,6 +4,8 @@ module CassandraObject
4
4
 
5
5
  module ClassMethods
6
6
  def find(key)
7
+ key = key.try :to_s
8
+
7
9
  if !parse_key(key)
8
10
  raise CassandraObject::RecordNotFound, "Couldn't find #{self.name} with key #{key.inspect}"
9
11
  elsif attributes = connection.get(column_family, key)
@@ -4,6 +4,7 @@ class CassandraObject::FinderMethodsTest < CassandraObject::TestCase
4
4
  test 'find' do
5
5
  Issue.create.tap do |issue|
6
6
  assert_equal issue, Issue.find(issue.id)
7
+ assert_equal issue, Issue.find(issue.key)
7
8
  end
8
9
 
9
10
  begin
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.4.1
4
+ version: 2.4.2
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: 2011-08-22 00:00:00.000000000Z
13
+ date: 2011-08-26 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activemodel
17
- requirement: &70296304870220 !ruby/object:Gem::Requirement
17
+ requirement: &70186624012980 !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: *70296304870220
25
+ version_requirements: *70186624012980
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: cassandra
28
- requirement: &70296304869760 !ruby/object:Gem::Requirement
28
+ requirement: &70186624012360 !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: *70296304869760
36
+ version_requirements: *70186624012360
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: bundler
39
- requirement: &70296304869300 !ruby/object:Gem::Requirement
39
+ requirement: &70186624011700 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
@@ -44,7 +44,7 @@ dependencies:
44
44
  version: 1.0.0
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *70296304869300
47
+ version_requirements: *70186624011700
48
48
  description: Cassandra ActiveModel
49
49
  email: gems@gotime.com
50
50
  executables: []