recommendable 2.0.2 → 2.0.3

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.
@@ -56,7 +56,7 @@ module Recommendable
56
56
  [liked_by_set, disliked_by_set]
57
57
  end
58
58
 
59
- memo | Recommendable.redis.sunion(sets.flatten)
59
+ memo | Recommendable.redis.sunion(*sets.flatten)
60
60
  else
61
61
  memo
62
62
  end
@@ -102,8 +102,8 @@ module Recommendable
102
102
  return if sets_to_union.empty?
103
103
 
104
104
  # SDIFF rated items so they aren't recommended
105
- Recommendable.redis.sunionstore(temp_set, sets_to_union)
106
- item_ids = Recommendable.redis.sdiff(temp_set, rated_sets)
105
+ Recommendable.redis.sunionstore(temp_set, *sets_to_union)
106
+ item_ids = Recommendable.redis.sdiff(temp_set, *rated_sets)
107
107
  scores = item_ids.map { |id| [predict_for(user_id, klass, id), id] }
108
108
  scores.each do |s|
109
109
  Recommendable.redis.zadd(recommended_set, s[0], s[1])
@@ -1,7 +1,7 @@
1
1
  module Recommendable
2
2
  MAJOR = 2
3
3
  MINOR = 0
4
- PATCH = 2
4
+ PATCH = 3
5
5
  PRE = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join '.'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recommendable
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-20 00:00:00.000000000 Z
12
+ date: 2013-02-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport