seifertd-cache-money 0.2.7.1 → 0.2.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/cash/query/abstract.rb +7 -3
- data/spec/cash/finders_spec.rb +1 -1
- metadata +3 -2
data/lib/cash/query/abstract.rb
CHANGED
@@ -156,9 +156,13 @@ module Cash
|
|
156
156
|
|
157
157
|
def find_from_keys(*missing_keys)
|
158
158
|
missing_ids = Array(missing_keys).flatten.collect { |key| key.split('/')[2].to_i }
|
159
|
-
vals = find_from_ids_without_cache(missing_ids, {})
|
160
|
-
|
161
|
-
|
159
|
+
vals = find_from_ids_without_cache(missing_ids, {})
|
160
|
+
if Array === vals
|
161
|
+
vals = vals.inject({}) {|h,obj| h[obj.id] = obj; h}
|
162
|
+
# Reorder according to input ids
|
163
|
+
return missing_ids.map{|id| vals[id]}
|
164
|
+
end
|
165
|
+
vals
|
162
166
|
end
|
163
167
|
end
|
164
168
|
end
|
data/spec/cash/finders_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: seifertd-cache-money
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.7.
|
4
|
+
version: 0.2.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Kallen
|
@@ -74,6 +74,7 @@ files:
|
|
74
74
|
- lib/cache_money.rb
|
75
75
|
has_rdoc: false
|
76
76
|
homepage: http://github.com/seifertd/cache-money
|
77
|
+
licenses:
|
77
78
|
post_install_message:
|
78
79
|
rdoc_options: []
|
79
80
|
|
@@ -94,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
95
|
requirements: []
|
95
96
|
|
96
97
|
rubyforge_project:
|
97
|
-
rubygems_version: 1.
|
98
|
+
rubygems_version: 1.3.5
|
98
99
|
signing_key:
|
99
100
|
specification_version: 2
|
100
101
|
summary: Write-through and Read-through Cacheing for ActiveRecord
|