gotime-cassandra_object 2.3.5 → 2.3.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.3.5'
5
+ s.version = '2.3.6'
6
6
  s.description = 'Cassandra ActiveModel'
7
7
  s.summary = 'Cassandra ActiveModel'
8
8
 
@@ -27,7 +27,7 @@ module CassandraObject
27
27
  count: limit,
28
28
  start: start_with,
29
29
  reversed: @options[:reversed],
30
- consistency: target_class.thrift_read_consistency)
30
+ consistency: @target_class.thrift_read_consistency)
31
31
 
32
32
  out_of_keys = index_results.size < limit
33
33
 
@@ -43,25 +43,20 @@ module CassandraObject
43
43
  multi_get(ids).values.compact
44
44
  end
45
45
 
46
- private
47
- def multi_get(keys, options={})
48
- attribute_results = ActiveSupport::Notifications.instrument("multi_get.cassandra_object", column_family: column_family, keys: keys) do
49
- connection.multi_get(column_family, keys.map(&:to_s), consistency: thrift_read_consistency)
50
- end
51
-
52
- attribute_results.inject({}) do |memo, (key, attributes)|
53
- if attributes.empty?
54
- memo[key] = nil
55
- else
56
- memo[parse_key(key)] = instantiate(key, attributes)
57
- end
58
- memo
59
- end
46
+ def multi_get(keys, options={})
47
+ attribute_results = ActiveSupport::Notifications.instrument("multi_get.cassandra_object", column_family: column_family, keys: keys) do
48
+ connection.multi_get(column_family, keys.map(&:to_s), consistency: thrift_read_consistency)
60
49
  end
61
50
 
62
- def get(key, options={})
63
- multi_get([key], options).values.first
51
+ attribute_results.inject({}) do |memo, (key, attributes)|
52
+ if attributes.empty?
53
+ memo[key] = nil
54
+ else
55
+ memo[parse_key(key)] = instantiate(key, attributes)
56
+ end
57
+ memo
64
58
  end
59
+ end
65
60
  end
66
61
  end
67
62
  end
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.3.5
4
+ version: 2.3.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ date: 2011-08-11 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activemodel
17
- requirement: &2168989460 !ruby/object:Gem::Requirement
17
+ requirement: &70284074277680 !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: *2168989460
25
+ version_requirements: *70284074277680
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: cassandra
28
- requirement: &2168985520 !ruby/object:Gem::Requirement
28
+ requirement: &70284074277120 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 0.11.3
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2168985520
36
+ version_requirements: *70284074277120
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: bundler
39
- requirement: &2168984360 !ruby/object:Gem::Requirement
39
+ requirement: &70284074276560 !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: *2168984360
47
+ version_requirements: *70284074276560
48
48
  description: Cassandra ActiveModel
49
49
  email: gems@gotime.com
50
50
  executables: []
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
157
  version: 1.3.5
158
158
  requirements: []
159
159
  rubyforge_project:
160
- rubygems_version: 1.8.5
160
+ rubygems_version: 1.8.6
161
161
  signing_key:
162
162
  specification_version: 3
163
163
  summary: Cassandra ActiveModel