kasket 4.12.0 → 4.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kasket/read_mixin.rb +4 -4
- data/lib/kasket/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c1c83230c5c06c292c4dd62d839372d06a54a763ed7dfd0ea5ed339fb57913a
|
4
|
+
data.tar.gz: 96df87b7c7ee9f8f19e593b3bc3bcbad257d928e0cdc4e0b3f5b22afed00b9c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ced9df5e050870ed7446bcf1b2e469fa2954ce1e7afcd67b799b14bb25a7323690242ca5ebb097c8d7df7f5c0c70317a72f292c202bebcc189b7afb64e905d1
|
7
|
+
data.tar.gz: aef1d32b14c4d6c3526b2b9093fec72f2c1998c04bebcf40861a30a1226234e4a70976168e605358fb452ed9152e49a7d69564c2fd7583541056c66cbe7fc8f0
|
data/lib/kasket/read_mixin.rb
CHANGED
@@ -23,7 +23,7 @@ module Kasket
|
|
23
23
|
|
24
24
|
if query && has_kasket_index_on?(query[:index])
|
25
25
|
if query[:key].is_a?(Array)
|
26
|
-
filter_pending_records(find_by_sql_with_kasket_on_id_array(query[:key]))
|
26
|
+
filter_pending_records(find_by_sql_with_kasket_on_id_array(query[:key]), &blk)
|
27
27
|
else
|
28
28
|
if value = Kasket.cache.read(query[:key])
|
29
29
|
# Identified a specific edge case where memcached server returns 0x00 binary protocol response with no data
|
@@ -38,7 +38,7 @@ module Kasket
|
|
38
38
|
elsif value.is_a?(Array)
|
39
39
|
filter_pending_records(find_by_sql_with_kasket_on_id_array(value))
|
40
40
|
else
|
41
|
-
filter_pending_records(Array.wrap(value).collect { |record| instantiate(record.dup) })
|
41
|
+
filter_pending_records(Array.wrap(value).collect { |record| instantiate(record.dup, &blk) })
|
42
42
|
end
|
43
43
|
|
44
44
|
payload = {
|
@@ -56,11 +56,11 @@ module Kasket
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
-
def find_by_sql_with_kasket_on_id_array(keys)
|
59
|
+
def find_by_sql_with_kasket_on_id_array(keys, &blk)
|
60
60
|
key_attributes_map = Kasket.cache.read_multi(*keys)
|
61
61
|
|
62
62
|
found_keys, missing_keys = keys.partition {|k| key_attributes_map[k] }
|
63
|
-
found_keys.each {|k| key_attributes_map[k] = instantiate(key_attributes_map[k].dup) }
|
63
|
+
found_keys.each {|k| key_attributes_map[k] = instantiate(key_attributes_map[k].dup, &blk) }
|
64
64
|
key_attributes_map.merge!(missing_records_from_db(missing_keys))
|
65
65
|
|
66
66
|
key_attributes_map.values.compact
|
data/lib/kasket/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kasket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mick Staugaard
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-04-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|