soulheart 0.2.3 → 0.2.4
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.
- checksums.yaml +4 -4
- data/lib/soulheart/loader.rb +5 -3
- data/lib/soulheart/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ea5dc27c836697c1fdbf001f73cbed523f68224
|
4
|
+
data.tar.gz: 9cc198b63222b8bfbb9503178ce913996046526e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba0fd796cc5a6d631936ca12b04583add3ff2f46e5cf5e711fe6b0606c8c191facf6d5c5e9aeb0dba34801cf9503c8eadfd39a1d878b2bbd563fc7f8a33b6825
|
7
|
+
data.tar.gz: 18e922688690e0126b9e2722ee800677c2015366893b8b592ac07bacd1c2ae583473910a6cf510efd336dd05cba2984c08978cccdd7affe73e64f0658ae909ea
|
data/lib/soulheart/loader.rb
CHANGED
@@ -55,20 +55,22 @@ module Soulheart
|
|
55
55
|
# everything will work itself out as soon as the cache expires again.
|
56
56
|
end
|
57
57
|
|
58
|
-
def remove_results_hash
|
58
|
+
def remove_results_hash(cat_ids)
|
59
59
|
# delete the data store
|
60
60
|
# We don't do this every time we clear because because it breaks the caching feature.
|
61
61
|
# The option to clear this is only called in testing right now.
|
62
62
|
# There should be an option to clear it other times though.
|
63
|
+
cat_ids.map { |cat_id| redis.expire(no_query_id(cat_id), 0) }
|
63
64
|
redis.expire results_hashes_id, 0
|
64
65
|
redis.del(results_hashes_id)
|
65
66
|
end
|
66
67
|
|
67
68
|
def clear(remove_results=false)
|
68
|
-
category_combos.
|
69
|
+
cat_ids = category_combos.map { |cat| category_id(cat) }
|
70
|
+
cat_ids.each {|cat_id| delete_data(cat_id) }
|
69
71
|
delete_categories
|
70
72
|
delete_data
|
71
|
-
remove_results_hash if remove_results
|
73
|
+
remove_results_hash(cat_ids) if remove_results
|
72
74
|
end
|
73
75
|
|
74
76
|
def load(items)
|
data/lib/soulheart/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soulheart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Herr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hiredis
|