recommendable 1.1.7 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/recommendable.rb +38 -26
- data/lib/recommendable/configuration.rb +47 -0
- data/lib/recommendable/helpers.rb +3 -9
- data/lib/recommendable/helpers/calculations.rb +150 -0
- data/lib/recommendable/helpers/queriers.rb +23 -0
- data/lib/recommendable/helpers/redis_key_mapper.rb +29 -0
- data/lib/recommendable/orm/active_record.rb +6 -0
- data/lib/recommendable/orm/data_mapper.rb +7 -0
- data/lib/recommendable/orm/mongo_mapper.rb +8 -0
- data/lib/recommendable/orm/mongoid.rb +7 -0
- data/lib/recommendable/ratable.rb +83 -0
- data/lib/recommendable/ratable/dislikable.rb +26 -0
- data/lib/recommendable/ratable/likable.rb +26 -0
- data/lib/recommendable/rater.rb +109 -0
- data/lib/recommendable/rater/bookmarker.rb +120 -0
- data/lib/recommendable/rater/disliker.rb +122 -0
- data/lib/recommendable/rater/hider.rb +120 -0
- data/lib/recommendable/rater/liker.rb +122 -0
- data/lib/recommendable/rater/recommender.rb +68 -0
- data/lib/recommendable/version.rb +5 -4
- data/lib/recommendable/workers/delayed_job.rb +16 -0
- data/lib/recommendable/workers/rails.rb +16 -0
- data/lib/recommendable/workers/resque.rb +13 -0
- data/lib/recommendable/workers/sidekiq.rb +13 -0
- metadata +62 -131
- data/.gitignore +0 -57
- data/.travis.yml +0 -3
- data/CHANGELOG.markdown +0 -159
- data/Gemfile +0 -3
- data/Gemfile.lock +0 -112
- data/LICENSE.txt +0 -22
- data/README.markdown +0 -135
- data/Rakefile +0 -26
- data/TODO +0 -7
- data/app/models/recommendable/dislike.rb +0 -19
- data/app/models/recommendable/ignore.rb +0 -19
- data/app/models/recommendable/like.rb +0 -19
- data/app/models/recommendable/stash.rb +0 -19
- data/app/workers/recommendable/delayed_job_worker.rb +0 -17
- data/app/workers/recommendable/rails_worker.rb +0 -17
- data/app/workers/recommendable/resque_worker.rb +0 -14
- data/app/workers/recommendable/sidekiq_worker.rb +0 -14
- data/config/routes.rb +0 -3
- data/db/migrate/20120124193723_create_likes.rb +0 -17
- data/db/migrate/20120124193728_create_dislikes.rb +0 -17
- data/db/migrate/20120127092558_create_ignores.rb +0 -17
- data/db/migrate/20120131173909_create_stashes.rb +0 -17
- data/lib/generators/recommendable/USAGE +0 -8
- data/lib/generators/recommendable/install_generator.rb +0 -40
- data/lib/generators/recommendable/templates/initializer.rb +0 -28
- data/lib/recommendable/acts_as_recommendable.rb +0 -176
- data/lib/recommendable/acts_as_recommended_to.rb +0 -774
- data/lib/recommendable/engine.rb +0 -14
- data/lib/recommendable/exceptions.rb +0 -4
- data/lib/recommendable/railtie.rb +0 -6
- data/lib/sidekiq/middleware/client/unique_jobs.rb +0 -37
- data/lib/sidekiq/middleware/server/unique_jobs.rb +0 -17
- data/lib/tasks/recommendable_tasks.rake +0 -1
- data/recommendable.gemspec +0 -30
- data/script/rails +0 -8
- data/spec/configuration_spec.rb +0 -9
- data/spec/dummy/README.rdoc +0 -261
- data/spec/dummy/Rakefile +0 -7
- data/spec/dummy/app/assets/javascripts/application.js +0 -15
- data/spec/dummy/app/assets/stylesheets/application.css +0 -13
- data/spec/dummy/app/controllers/application_controller.rb +0 -3
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/app/models/bully.rb +0 -2
- data/spec/dummy/app/models/movie.rb +0 -2
- data/spec/dummy/app/models/php_framework.rb +0 -2
- data/spec/dummy/app/models/user.rb +0 -3
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/config/application.rb +0 -56
- data/spec/dummy/config/boot.rb +0 -10
- data/spec/dummy/config/database.yml +0 -25
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -37
- data/spec/dummy/config/environments/production.rb +0 -67
- data/spec/dummy/config/environments/test.rb +0 -37
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/inflections.rb +0 -15
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/recommendable.rb +0 -14
- data/spec/dummy/config/initializers/secret_token.rb +0 -7
- data/spec/dummy/config/initializers/session_store.rb +0 -8
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/en.yml +0 -5
- data/spec/dummy/config/routes.rb +0 -4
- data/spec/dummy/db/migrate/20120128005553_create_likes.recommendable.rb +0 -18
- data/spec/dummy/db/migrate/20120128005554_create_dislikes.recommendable.rb +0 -18
- data/spec/dummy/db/migrate/20120128005555_create_ignores.recommendable.rb +0 -18
- data/spec/dummy/db/migrate/20120128020228_create_users.rb +0 -9
- data/spec/dummy/db/migrate/20120128020413_create_movies.rb +0 -10
- data/spec/dummy/db/migrate/20120128024632_create_php_frameworks.rb +0 -9
- data/spec/dummy/db/migrate/20120128024804_create_bullies.rb +0 -9
- data/spec/dummy/db/migrate/20120131195416_create_stashes.recommendable.rb +0 -19
- data/spec/dummy/db/schema.rb +0 -89
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/public/404.html +0 -26
- data/spec/dummy/public/422.html +0 -26
- data/spec/dummy/public/500.html +0 -25
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/recommendable_dummy_development +0 -0
- data/spec/dummy/recommendable_dummy_test +0 -0
- data/spec/dummy/script/rails +0 -6
- data/spec/factories.rb +0 -16
- data/spec/models/dislike_spec.rb +0 -41
- data/spec/models/ignore_spec.rb +0 -27
- data/spec/models/like_spec.rb +0 -42
- data/spec/models/movie_spec.rb +0 -82
- data/spec/models/stash_spec.rb +0 -27
- data/spec/models/user_benchmark_spec.rb +0 -49
- data/spec/models/user_spec.rb +0 -443
- data/spec/spec_helper.rb +0 -28
@@ -0,0 +1,122 @@
|
|
1
|
+
module Recommendable
|
2
|
+
module Rater
|
3
|
+
module Liker
|
4
|
+
# Like an object. This will remove the item from a user's set of dislikes,
|
5
|
+
# or hidden items.
|
6
|
+
#
|
7
|
+
# @param [Object] obj the object to be liked
|
8
|
+
# @return true if object was liked successfully
|
9
|
+
# @raise [ArgumentError] if the passed object was not declared ratable
|
10
|
+
def like(obj)
|
11
|
+
raise(ArgumentError, 'Object has not been declared ratable.') unless obj.respond_to?(:recommendable?) && obj.recommendable?
|
12
|
+
return if likes?(obj)
|
13
|
+
|
14
|
+
run_hook(:before_like, obj)
|
15
|
+
Recommendable.redis.sadd(Recommendable::Helpers::RedisKeyMapper.liked_set_for(obj.class, id), obj.id)
|
16
|
+
Recommendable.redis.sadd(Recommendable::Helpers::RedisKeyMapper.liked_by_set_for(obj.class, obj.id), id)
|
17
|
+
run_hook(:after_like, obj)
|
18
|
+
|
19
|
+
true
|
20
|
+
end
|
21
|
+
|
22
|
+
# Check whether the user has liked an object.
|
23
|
+
#
|
24
|
+
# @param [Object] obj the object in question
|
25
|
+
# @return true if the user has liked obj, false if not
|
26
|
+
def likes?(obj)
|
27
|
+
Recommendable.redis.sismember(Recommendable::Helpers::RedisKeyMapper.liked_set_for(obj.class, id), obj.id)
|
28
|
+
end
|
29
|
+
|
30
|
+
# Unlike an object. This removes the object from a user's set of likes.
|
31
|
+
#
|
32
|
+
# @param [Object] obj the object to be unliked
|
33
|
+
# @return true if the object was liked successfully, nil if the object wasn't already liked
|
34
|
+
def unlike(obj)
|
35
|
+
return unless likes?(obj)
|
36
|
+
|
37
|
+
run_hook(:before_unlike, obj)
|
38
|
+
Recommendable.redis.srem(Recommendable::Helpers::RedisKeyMapper.liked_set_for(obj.class, id), obj.id)
|
39
|
+
Recommendable.redis.srem(Recommendable::Helpers::RedisKeyMapper.liked_by_set_for(obj.class, obj.id), id)
|
40
|
+
run_hook(:after_unlike, obj)
|
41
|
+
|
42
|
+
true
|
43
|
+
end
|
44
|
+
|
45
|
+
# Retrieve an array of objects the user has liked
|
46
|
+
#
|
47
|
+
# @return [Array] an array of records
|
48
|
+
def likes
|
49
|
+
Recommendable.config.ratable_classes.map { |klass| liked_for(klass) }.flatten
|
50
|
+
end
|
51
|
+
|
52
|
+
# Retrieve an array of objects both this user and another user have liked
|
53
|
+
#
|
54
|
+
# @return [Array] an array of records
|
55
|
+
def likes_in_common_with(user)
|
56
|
+
Recommendable.config.ratable_classes.map { |klass| liked_in_common_with(klass, user) }.flatten
|
57
|
+
end
|
58
|
+
|
59
|
+
# Get the number of items the user has liked
|
60
|
+
#
|
61
|
+
# @return [Fixnum] the number of liked items
|
62
|
+
def likes_count
|
63
|
+
Recommendable.config.ratable_classes.inject(0) do |sum, klass|
|
64
|
+
sum + liked_count_for(klass)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
private
|
69
|
+
|
70
|
+
# Fetch IDs for objects belonging to a passed class that the user has liked
|
71
|
+
#
|
72
|
+
# @param [String, Symbol, Class] the class for which you want IDs
|
73
|
+
# @return [Array] an array of IDs
|
74
|
+
# @private
|
75
|
+
def liked_ids_for(klass)
|
76
|
+
ids = Recommendable.redis.smembers(Recommendable::Helpers::RedisKeyMapper.liked_set_for(klass, id))
|
77
|
+
ids.map!(&:to_i) if [:active_record, :data_mapper].include?(Recommendable.config.orm)
|
78
|
+
ids
|
79
|
+
end
|
80
|
+
|
81
|
+
# Fetch records belonging to a passed class that the user has liked
|
82
|
+
#
|
83
|
+
# @param [String, Symbol, Class] the class for which you want liked records
|
84
|
+
# @return [Array] an array of liked records
|
85
|
+
# @private
|
86
|
+
def liked_for(klass)
|
87
|
+
Recommendable.query(klass, liked_ids_for(klass))
|
88
|
+
end
|
89
|
+
|
90
|
+
# Get the number of items belonging to a passed class that the user has liked
|
91
|
+
#
|
92
|
+
# @param [String, Symbol, Class] the class for which you want a count of likes
|
93
|
+
# @return [Fixnum] the number of likes
|
94
|
+
# @private
|
95
|
+
def liked_count_for(klass)
|
96
|
+
Recommendable.redis.scard(Recommendable::Helpers::RedisKeyMapper.liked_set_for(klass, id))
|
97
|
+
end
|
98
|
+
|
99
|
+
# Get a list of records that both this user and a passed user have liked
|
100
|
+
#
|
101
|
+
# @param [User] the other user
|
102
|
+
# @param [String, Symbol, Class] the class of common liked items
|
103
|
+
# @return [Array] an array of records both users have liked
|
104
|
+
# @private
|
105
|
+
def liked_in_common_with(klass, user)
|
106
|
+
Recommendable.query(klass, liked_ids_in_common_with(klass, user))
|
107
|
+
end
|
108
|
+
|
109
|
+
# Get a list of IDs for records that both this user and a passed user have
|
110
|
+
# liked
|
111
|
+
#
|
112
|
+
# @param [User, Fixnum] the other user (or its ID)
|
113
|
+
# @param [String, Symbol, Class] the class of common liked items
|
114
|
+
# @return [Array] an array of IDs for records that both users have liked
|
115
|
+
# @private
|
116
|
+
def liked_ids_in_common_with(klass, user_id)
|
117
|
+
user_id = user_id.id if user_id.is_a?(Recommendable.config.user_class)
|
118
|
+
Recommendable.redis.sinter(Recommendable::Helpers::RedisKeyMapper.liked_set_for(klass, id), Recommendable::Helpers::RedisKeyMapper.liked_set_for(klass, user_id))
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
module Recommendable
|
2
|
+
module Rater
|
3
|
+
module Recommender
|
4
|
+
# Get a list of raters that have been found to be the most similar to
|
5
|
+
# self. They are sorted by the calculated similarity value.
|
6
|
+
#
|
7
|
+
# @param [Fixnum] count the number of users to return (defaults to 10)
|
8
|
+
# @return [Array] An array of instances of your user class
|
9
|
+
def similar_raters(count = 10)
|
10
|
+
ids = Recommendable.redis.zrevrange(Recommendable::Helpers::RedisKeyMapper.similarity_set_for(id), 0, count - 1)
|
11
|
+
Recommendable.query(self.class, ids).sort_by { |user| ids.index(user.id.to_s) }
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
# Fetch a list of recommendations for a passed class.
|
17
|
+
#
|
18
|
+
# @param [String, Symbol, Class] klass the class from which to get recommendations
|
19
|
+
# @param [Fixnum] count the number of recommendations to fetch (defaults to 10)
|
20
|
+
# @return [Array] a list of things this person's gonna love
|
21
|
+
def recommended_for(klass, count = 10)
|
22
|
+
recommended_set = Recommendable::Helpers::RedisKeyMapper.recommended_set_for(klass, self.id)
|
23
|
+
return Recommendable.query(klass, []) unless rated_anything? && Recommendable.redis.zcard(recommended_set) > 0
|
24
|
+
|
25
|
+
ids = Recommendable.redis.zrevrange(recommended_set, 0, count - 1)
|
26
|
+
Recommendable.query(klass, ids)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Removes an item from a user's set of recommendations
|
30
|
+
# @private
|
31
|
+
def unrecommend(obj)
|
32
|
+
Recommendable.redis.zrem(Recommendable::Helpers::RedisKeyMapper.recommended_set_for(obj.class, id), obj.id)
|
33
|
+
true
|
34
|
+
end
|
35
|
+
|
36
|
+
# Removes a user from Recommendable. Called internally on a before_destroy hook.
|
37
|
+
# @private
|
38
|
+
def remove_from_recommendable!
|
39
|
+
# Remove this user's similarity ZSET
|
40
|
+
Recommendable.redis.del(Recommendable::Helpers::RedisKeyMapper.similarity_set_for(id))
|
41
|
+
|
42
|
+
# Remove from other users' similarity ZSETs
|
43
|
+
Recommendable.redis.keys(Recommendable::Helpers::RedisKeyMapper.similarity_set_for('*')).each do |zset|
|
44
|
+
Recommendable.redis.zrem(zset, id)
|
45
|
+
end
|
46
|
+
|
47
|
+
# For each ratable class...
|
48
|
+
Recommendable.config.ratable_classes.each do |klass|
|
49
|
+
# Remove this user from any class member's liked_by/disliked_by sets
|
50
|
+
Recommendable.redis.keys(Recommendable::Helpers::RedisKeyMapper.liked_by_set_for(klass, '*')).each do |set|
|
51
|
+
Recommendable.redis.srem(set, id)
|
52
|
+
end
|
53
|
+
|
54
|
+
Recommendable.redis.keys(Recommendable::Helpers::RedisKeyMapper.disliked_by_set_for(klass, '*')).each do |set|
|
55
|
+
Recommendable.redis.srem(set, id)
|
56
|
+
end
|
57
|
+
|
58
|
+
# Remove this user's liked/disliked/hidden/bookmarked/recommended sets for the class
|
59
|
+
Recommendable.redis.del(Recommendable::Helpers::RedisKeyMapper.liked_set_for(klass, id))
|
60
|
+
Recommendable.redis.del(Recommendable::Helpers::RedisKeyMapper.disliked_set_for(klass, id))
|
61
|
+
Recommendable.redis.del(Recommendable::Helpers::RedisKeyMapper.hidden_set_for(klass, id))
|
62
|
+
Recommendable.redis.del(Recommendable::Helpers::RedisKeyMapper.bookmarked_set_for(klass, id))
|
63
|
+
Recommendable.redis.del(Recommendable::Helpers::RedisKeyMapper.recommended_set_for(klass, id))
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Recommendable
|
2
|
+
module Workers
|
3
|
+
class DelayedJob
|
4
|
+
attr_accessor :user_id
|
5
|
+
|
6
|
+
def initialize(user_id)
|
7
|
+
@user_id = user_id
|
8
|
+
end
|
9
|
+
|
10
|
+
def perform
|
11
|
+
Recommendable::Helpers::Calculations.update_similarities_for(user_id)
|
12
|
+
Recommendable::Helpers::Calculations.update_recommendations_for(user_id)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Recommendable
|
2
|
+
module Workers
|
3
|
+
class Rails
|
4
|
+
attr_accessor :user_id
|
5
|
+
|
6
|
+
def initialize(user_id)
|
7
|
+
@user_id = user_id
|
8
|
+
end
|
9
|
+
|
10
|
+
def run
|
11
|
+
Recommendable::Helpers::Calculations.update_similarities_for(user_id)
|
12
|
+
Recommendable::Helpers::Calculations.update_recommendations_for(user_id)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Recommendable
|
2
|
+
module Workers
|
3
|
+
class Resque
|
4
|
+
include ::Resque::Plugins::UniqueJob if defined?(::Resque::Plugins::UniqueJob)
|
5
|
+
@queue = :recommendable
|
6
|
+
|
7
|
+
def self.perform(user_id)
|
8
|
+
Recommendable::Helpers::Calculations.update_similarities_for(user_id)
|
9
|
+
Recommendable::Helpers::Calculations.update_recommendations_for(user_id)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Recommendable
|
2
|
+
module Workers
|
3
|
+
class Sidekiq
|
4
|
+
include ::Sidekiq::Worker
|
5
|
+
sidekiq_options :unique => true, :queue => :recommendable
|
6
|
+
|
7
|
+
def perform(user_id)
|
8
|
+
Recommendable::Helpers::Calculations.update_similarities_for(user_id)
|
9
|
+
Recommendable::Helpers::Calculations.update_recommendations_for(user_id)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
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:
|
4
|
+
version: 2.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,58 +9,58 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: activesupport
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
22
|
-
type: :
|
21
|
+
version: 3.0.0
|
22
|
+
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 3.0.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
|
-
name:
|
31
|
+
name: redis
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
none: false
|
34
34
|
requirements:
|
35
35
|
- - ! '>='
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
38
|
-
type: :
|
37
|
+
version: 2.2.0
|
38
|
+
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
43
|
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
45
|
+
version: 2.2.0
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
47
|
+
name: hooks
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
49
49
|
none: false
|
50
50
|
requirements:
|
51
51
|
- - ! '>='
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
54
|
-
type: :
|
53
|
+
version: 0.2.1
|
54
|
+
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
none: false
|
58
58
|
requirements:
|
59
59
|
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 0.2.1
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
63
|
+
name: minitest
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
none: false
|
66
66
|
requirements:
|
@@ -76,23 +76,23 @@ dependencies:
|
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
|
-
name:
|
79
|
+
name: miniskirt
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|
81
81
|
none: false
|
82
82
|
requirements:
|
83
|
-
- -
|
83
|
+
- - ! '>='
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: 0
|
85
|
+
version: '0'
|
86
86
|
type: :development
|
87
87
|
prerelease: false
|
88
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
89
|
none: false
|
90
90
|
requirements:
|
91
|
-
- -
|
91
|
+
- - ! '>='
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version: 0
|
93
|
+
version: '0'
|
94
94
|
- !ruby/object:Gem::Dependency
|
95
|
-
name:
|
95
|
+
name: yard
|
96
96
|
requirement: !ruby/object:Gem::Requirement
|
97
97
|
none: false
|
98
98
|
requirements:
|
@@ -114,151 +114,81 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - ! '>='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 3.
|
118
|
-
type: :
|
117
|
+
version: 3.1.0
|
118
|
+
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
none: false
|
122
122
|
requirements:
|
123
123
|
- - ! '>='
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: 3.
|
125
|
+
version: 3.1.0
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
|
-
name:
|
127
|
+
name: sqlite3
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
none: false
|
130
130
|
requirements:
|
131
131
|
- - ! '>='
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version:
|
134
|
-
type: :
|
133
|
+
version: '0'
|
134
|
+
type: :development
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
137
|
none: false
|
138
138
|
requirements:
|
139
139
|
- - ! '>='
|
140
140
|
- !ruby/object:Gem::Version
|
141
|
-
version:
|
141
|
+
version: '0'
|
142
142
|
- !ruby/object:Gem::Dependency
|
143
|
-
name:
|
143
|
+
name: database_cleaner
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
145
145
|
none: false
|
146
146
|
requirements:
|
147
147
|
- - ! '>='
|
148
148
|
- !ruby/object:Gem::Version
|
149
|
-
version: 0
|
150
|
-
type: :
|
149
|
+
version: '0'
|
150
|
+
type: :development
|
151
151
|
prerelease: false
|
152
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
153
|
none: false
|
154
154
|
requirements:
|
155
155
|
- - ! '>='
|
156
156
|
- !ruby/object:Gem::Version
|
157
|
-
version: 0
|
158
|
-
description:
|
159
|
-
|
160
|
-
|
157
|
+
version: '0'
|
158
|
+
description: ! 'A Like/Dislike recommendation engine for Ruby apps using Redis.
|
159
|
+
|
160
|
+
'
|
161
|
+
email:
|
162
|
+
- david@davidcelis.com
|
161
163
|
executables: []
|
162
164
|
extensions: []
|
163
165
|
extra_rdoc_files: []
|
164
166
|
files:
|
165
|
-
- .
|
166
|
-
- .
|
167
|
-
-
|
168
|
-
-
|
169
|
-
- Gemfile.lock
|
170
|
-
- LICENSE.txt
|
171
|
-
- README.markdown
|
172
|
-
- Rakefile
|
173
|
-
- TODO
|
174
|
-
- app/models/recommendable/dislike.rb
|
175
|
-
- app/models/recommendable/ignore.rb
|
176
|
-
- app/models/recommendable/like.rb
|
177
|
-
- app/models/recommendable/stash.rb
|
178
|
-
- app/workers/recommendable/delayed_job_worker.rb
|
179
|
-
- app/workers/recommendable/rails_worker.rb
|
180
|
-
- app/workers/recommendable/resque_worker.rb
|
181
|
-
- app/workers/recommendable/sidekiq_worker.rb
|
182
|
-
- config/routes.rb
|
183
|
-
- db/migrate/20120124193723_create_likes.rb
|
184
|
-
- db/migrate/20120124193728_create_dislikes.rb
|
185
|
-
- db/migrate/20120127092558_create_ignores.rb
|
186
|
-
- db/migrate/20120131173909_create_stashes.rb
|
187
|
-
- lib/generators/recommendable/USAGE
|
188
|
-
- lib/generators/recommendable/install_generator.rb
|
189
|
-
- lib/generators/recommendable/templates/initializer.rb
|
190
|
-
- lib/recommendable.rb
|
191
|
-
- lib/recommendable/acts_as_recommendable.rb
|
192
|
-
- lib/recommendable/acts_as_recommended_to.rb
|
193
|
-
- lib/recommendable/engine.rb
|
194
|
-
- lib/recommendable/exceptions.rb
|
167
|
+
- lib/recommendable/configuration.rb
|
168
|
+
- lib/recommendable/helpers/calculations.rb
|
169
|
+
- lib/recommendable/helpers/queriers.rb
|
170
|
+
- lib/recommendable/helpers/redis_key_mapper.rb
|
195
171
|
- lib/recommendable/helpers.rb
|
196
|
-
- lib/recommendable/
|
172
|
+
- lib/recommendable/orm/active_record.rb
|
173
|
+
- lib/recommendable/orm/data_mapper.rb
|
174
|
+
- lib/recommendable/orm/mongo_mapper.rb
|
175
|
+
- lib/recommendable/orm/mongoid.rb
|
176
|
+
- lib/recommendable/ratable/dislikable.rb
|
177
|
+
- lib/recommendable/ratable/likable.rb
|
178
|
+
- lib/recommendable/ratable.rb
|
179
|
+
- lib/recommendable/rater/bookmarker.rb
|
180
|
+
- lib/recommendable/rater/disliker.rb
|
181
|
+
- lib/recommendable/rater/hider.rb
|
182
|
+
- lib/recommendable/rater/liker.rb
|
183
|
+
- lib/recommendable/rater/recommender.rb
|
184
|
+
- lib/recommendable/rater.rb
|
197
185
|
- lib/recommendable/version.rb
|
198
|
-
- lib/
|
199
|
-
- lib/
|
200
|
-
- lib/
|
201
|
-
- recommendable.
|
202
|
-
-
|
203
|
-
|
204
|
-
- spec/dummy/README.rdoc
|
205
|
-
- spec/dummy/Rakefile
|
206
|
-
- spec/dummy/app/assets/javascripts/application.js
|
207
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
208
|
-
- spec/dummy/app/controllers/application_controller.rb
|
209
|
-
- spec/dummy/app/helpers/application_helper.rb
|
210
|
-
- spec/dummy/app/mailers/.gitkeep
|
211
|
-
- spec/dummy/app/models/.gitkeep
|
212
|
-
- spec/dummy/app/models/bully.rb
|
213
|
-
- spec/dummy/app/models/movie.rb
|
214
|
-
- spec/dummy/app/models/php_framework.rb
|
215
|
-
- spec/dummy/app/models/user.rb
|
216
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
217
|
-
- spec/dummy/config.ru
|
218
|
-
- spec/dummy/config/application.rb
|
219
|
-
- spec/dummy/config/boot.rb
|
220
|
-
- spec/dummy/config/database.yml
|
221
|
-
- spec/dummy/config/environment.rb
|
222
|
-
- spec/dummy/config/environments/development.rb
|
223
|
-
- spec/dummy/config/environments/production.rb
|
224
|
-
- spec/dummy/config/environments/test.rb
|
225
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
226
|
-
- spec/dummy/config/initializers/inflections.rb
|
227
|
-
- spec/dummy/config/initializers/mime_types.rb
|
228
|
-
- spec/dummy/config/initializers/recommendable.rb
|
229
|
-
- spec/dummy/config/initializers/secret_token.rb
|
230
|
-
- spec/dummy/config/initializers/session_store.rb
|
231
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
232
|
-
- spec/dummy/config/locales/en.yml
|
233
|
-
- spec/dummy/config/routes.rb
|
234
|
-
- spec/dummy/db/migrate/20120128005553_create_likes.recommendable.rb
|
235
|
-
- spec/dummy/db/migrate/20120128005554_create_dislikes.recommendable.rb
|
236
|
-
- spec/dummy/db/migrate/20120128005555_create_ignores.recommendable.rb
|
237
|
-
- spec/dummy/db/migrate/20120128020228_create_users.rb
|
238
|
-
- spec/dummy/db/migrate/20120128020413_create_movies.rb
|
239
|
-
- spec/dummy/db/migrate/20120128024632_create_php_frameworks.rb
|
240
|
-
- spec/dummy/db/migrate/20120128024804_create_bullies.rb
|
241
|
-
- spec/dummy/db/migrate/20120131195416_create_stashes.recommendable.rb
|
242
|
-
- spec/dummy/db/schema.rb
|
243
|
-
- spec/dummy/lib/assets/.gitkeep
|
244
|
-
- spec/dummy/log/.gitkeep
|
245
|
-
- spec/dummy/public/404.html
|
246
|
-
- spec/dummy/public/422.html
|
247
|
-
- spec/dummy/public/500.html
|
248
|
-
- spec/dummy/public/favicon.ico
|
249
|
-
- spec/dummy/recommendable_dummy_development
|
250
|
-
- spec/dummy/recommendable_dummy_test
|
251
|
-
- spec/dummy/script/rails
|
252
|
-
- spec/factories.rb
|
253
|
-
- spec/models/dislike_spec.rb
|
254
|
-
- spec/models/ignore_spec.rb
|
255
|
-
- spec/models/like_spec.rb
|
256
|
-
- spec/models/movie_spec.rb
|
257
|
-
- spec/models/stash_spec.rb
|
258
|
-
- spec/models/user_benchmark_spec.rb
|
259
|
-
- spec/models/user_spec.rb
|
260
|
-
- spec/spec_helper.rb
|
261
|
-
homepage: http://github.com/davidcelis/recommendable
|
186
|
+
- lib/recommendable/workers/delayed_job.rb
|
187
|
+
- lib/recommendable/workers/rails.rb
|
188
|
+
- lib/recommendable/workers/resque.rb
|
189
|
+
- lib/recommendable/workers/sidekiq.rb
|
190
|
+
- lib/recommendable.rb
|
191
|
+
homepage: https://github.com/davidcelis/recommendable
|
262
192
|
licenses: []
|
263
193
|
post_install_message:
|
264
194
|
rdoc_options: []
|
@@ -281,5 +211,6 @@ rubyforge_project:
|
|
281
211
|
rubygems_version: 1.8.23
|
282
212
|
signing_key:
|
283
213
|
specification_version: 3
|
284
|
-
summary:
|
214
|
+
summary: A Like/Dislike recommendation engine for Ruby apps using Redis
|
285
215
|
test_files: []
|
216
|
+
has_rdoc: yard
|