recommendable 1.1.7 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. data/lib/recommendable.rb +38 -26
  2. data/lib/recommendable/configuration.rb +47 -0
  3. data/lib/recommendable/helpers.rb +3 -9
  4. data/lib/recommendable/helpers/calculations.rb +150 -0
  5. data/lib/recommendable/helpers/queriers.rb +23 -0
  6. data/lib/recommendable/helpers/redis_key_mapper.rb +29 -0
  7. data/lib/recommendable/orm/active_record.rb +6 -0
  8. data/lib/recommendable/orm/data_mapper.rb +7 -0
  9. data/lib/recommendable/orm/mongo_mapper.rb +8 -0
  10. data/lib/recommendable/orm/mongoid.rb +7 -0
  11. data/lib/recommendable/ratable.rb +83 -0
  12. data/lib/recommendable/ratable/dislikable.rb +26 -0
  13. data/lib/recommendable/ratable/likable.rb +26 -0
  14. data/lib/recommendable/rater.rb +109 -0
  15. data/lib/recommendable/rater/bookmarker.rb +120 -0
  16. data/lib/recommendable/rater/disliker.rb +122 -0
  17. data/lib/recommendable/rater/hider.rb +120 -0
  18. data/lib/recommendable/rater/liker.rb +122 -0
  19. data/lib/recommendable/rater/recommender.rb +68 -0
  20. data/lib/recommendable/version.rb +5 -4
  21. data/lib/recommendable/workers/delayed_job.rb +16 -0
  22. data/lib/recommendable/workers/rails.rb +16 -0
  23. data/lib/recommendable/workers/resque.rb +13 -0
  24. data/lib/recommendable/workers/sidekiq.rb +13 -0
  25. metadata +62 -131
  26. data/.gitignore +0 -57
  27. data/.travis.yml +0 -3
  28. data/CHANGELOG.markdown +0 -159
  29. data/Gemfile +0 -3
  30. data/Gemfile.lock +0 -112
  31. data/LICENSE.txt +0 -22
  32. data/README.markdown +0 -135
  33. data/Rakefile +0 -26
  34. data/TODO +0 -7
  35. data/app/models/recommendable/dislike.rb +0 -19
  36. data/app/models/recommendable/ignore.rb +0 -19
  37. data/app/models/recommendable/like.rb +0 -19
  38. data/app/models/recommendable/stash.rb +0 -19
  39. data/app/workers/recommendable/delayed_job_worker.rb +0 -17
  40. data/app/workers/recommendable/rails_worker.rb +0 -17
  41. data/app/workers/recommendable/resque_worker.rb +0 -14
  42. data/app/workers/recommendable/sidekiq_worker.rb +0 -14
  43. data/config/routes.rb +0 -3
  44. data/db/migrate/20120124193723_create_likes.rb +0 -17
  45. data/db/migrate/20120124193728_create_dislikes.rb +0 -17
  46. data/db/migrate/20120127092558_create_ignores.rb +0 -17
  47. data/db/migrate/20120131173909_create_stashes.rb +0 -17
  48. data/lib/generators/recommendable/USAGE +0 -8
  49. data/lib/generators/recommendable/install_generator.rb +0 -40
  50. data/lib/generators/recommendable/templates/initializer.rb +0 -28
  51. data/lib/recommendable/acts_as_recommendable.rb +0 -176
  52. data/lib/recommendable/acts_as_recommended_to.rb +0 -774
  53. data/lib/recommendable/engine.rb +0 -14
  54. data/lib/recommendable/exceptions.rb +0 -4
  55. data/lib/recommendable/railtie.rb +0 -6
  56. data/lib/sidekiq/middleware/client/unique_jobs.rb +0 -37
  57. data/lib/sidekiq/middleware/server/unique_jobs.rb +0 -17
  58. data/lib/tasks/recommendable_tasks.rake +0 -1
  59. data/recommendable.gemspec +0 -30
  60. data/script/rails +0 -8
  61. data/spec/configuration_spec.rb +0 -9
  62. data/spec/dummy/README.rdoc +0 -261
  63. data/spec/dummy/Rakefile +0 -7
  64. data/spec/dummy/app/assets/javascripts/application.js +0 -15
  65. data/spec/dummy/app/assets/stylesheets/application.css +0 -13
  66. data/spec/dummy/app/controllers/application_controller.rb +0 -3
  67. data/spec/dummy/app/helpers/application_helper.rb +0 -2
  68. data/spec/dummy/app/mailers/.gitkeep +0 -0
  69. data/spec/dummy/app/models/.gitkeep +0 -0
  70. data/spec/dummy/app/models/bully.rb +0 -2
  71. data/spec/dummy/app/models/movie.rb +0 -2
  72. data/spec/dummy/app/models/php_framework.rb +0 -2
  73. data/spec/dummy/app/models/user.rb +0 -3
  74. data/spec/dummy/app/views/layouts/application.html.erb +0 -14
  75. data/spec/dummy/config.ru +0 -4
  76. data/spec/dummy/config/application.rb +0 -56
  77. data/spec/dummy/config/boot.rb +0 -10
  78. data/spec/dummy/config/database.yml +0 -25
  79. data/spec/dummy/config/environment.rb +0 -5
  80. data/spec/dummy/config/environments/development.rb +0 -37
  81. data/spec/dummy/config/environments/production.rb +0 -67
  82. data/spec/dummy/config/environments/test.rb +0 -37
  83. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  84. data/spec/dummy/config/initializers/inflections.rb +0 -15
  85. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  86. data/spec/dummy/config/initializers/recommendable.rb +0 -14
  87. data/spec/dummy/config/initializers/secret_token.rb +0 -7
  88. data/spec/dummy/config/initializers/session_store.rb +0 -8
  89. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  90. data/spec/dummy/config/locales/en.yml +0 -5
  91. data/spec/dummy/config/routes.rb +0 -4
  92. data/spec/dummy/db/migrate/20120128005553_create_likes.recommendable.rb +0 -18
  93. data/spec/dummy/db/migrate/20120128005554_create_dislikes.recommendable.rb +0 -18
  94. data/spec/dummy/db/migrate/20120128005555_create_ignores.recommendable.rb +0 -18
  95. data/spec/dummy/db/migrate/20120128020228_create_users.rb +0 -9
  96. data/spec/dummy/db/migrate/20120128020413_create_movies.rb +0 -10
  97. data/spec/dummy/db/migrate/20120128024632_create_php_frameworks.rb +0 -9
  98. data/spec/dummy/db/migrate/20120128024804_create_bullies.rb +0 -9
  99. data/spec/dummy/db/migrate/20120131195416_create_stashes.recommendable.rb +0 -19
  100. data/spec/dummy/db/schema.rb +0 -89
  101. data/spec/dummy/lib/assets/.gitkeep +0 -0
  102. data/spec/dummy/log/.gitkeep +0 -0
  103. data/spec/dummy/public/404.html +0 -26
  104. data/spec/dummy/public/422.html +0 -26
  105. data/spec/dummy/public/500.html +0 -25
  106. data/spec/dummy/public/favicon.ico +0 -0
  107. data/spec/dummy/recommendable_dummy_development +0 -0
  108. data/spec/dummy/recommendable_dummy_test +0 -0
  109. data/spec/dummy/script/rails +0 -6
  110. data/spec/factories.rb +0 -16
  111. data/spec/models/dislike_spec.rb +0 -41
  112. data/spec/models/ignore_spec.rb +0 -27
  113. data/spec/models/like_spec.rb +0 -42
  114. data/spec/models/movie_spec.rb +0 -82
  115. data/spec/models/stash_spec.rb +0 -27
  116. data/spec/models/user_benchmark_spec.rb +0 -49
  117. data/spec/models/user_spec.rb +0 -443
  118. 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
@@ -1,7 +1,8 @@
1
1
  module Recommendable
2
- MAJOR = 1
3
- MINOR = 1
4
- PATCH = 7
2
+ MAJOR = 2
3
+ MINOR = 0
4
+ PATCH = 0
5
+ PRE = nil
5
6
 
6
- VERSION = [MAJOR, MINOR, PATCH].join '.'
7
+ VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join '.'
7
8
  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: 1.1.7
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-08-28 00:00:00.000000000 Z
12
+ date: 2012-10-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: sqlite3
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: '0'
22
- type: :development
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: '0'
29
+ version: 3.0.0
30
30
  - !ruby/object:Gem::Dependency
31
- name: minitest
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: '0'
38
- type: :development
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: '0'
45
+ version: 2.2.0
46
46
  - !ruby/object:Gem::Dependency
47
- name: miniskirt
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: '0'
54
- type: :development
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: '0'
61
+ version: 0.2.1
62
62
  - !ruby/object:Gem::Dependency
63
- name: shoulda
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: yard
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.6.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.6.0
93
+ version: '0'
94
94
  - !ruby/object:Gem::Dependency
95
- name: bundler
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.0.0
118
- type: :runtime
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.0.0
125
+ version: 3.1.0
126
126
  - !ruby/object:Gem::Dependency
127
- name: redis
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: 2.2.0
134
- type: :runtime
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: 2.2.0
141
+ version: '0'
142
142
  - !ruby/object:Gem::Dependency
143
- name: hooks
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.2.1
150
- type: :runtime
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.2.1
158
- description: Allow a model (typically User) to Like and/or Dislike models in your
159
- app. Generate recommendations quickly using redis.
160
- email: david@davidcelis.com
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
- - .gitignore
166
- - .travis.yml
167
- - CHANGELOG.markdown
168
- - Gemfile
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/railtie.rb
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/sidekiq/middleware/client/unique_jobs.rb
199
- - lib/sidekiq/middleware/server/unique_jobs.rb
200
- - lib/tasks/recommendable_tasks.rake
201
- - recommendable.gemspec
202
- - script/rails
203
- - spec/configuration_spec.rb
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: Add like-based and/or dislike-based recommendations to your app.
214
+ summary: A Like/Dislike recommendation engine for Ruby apps using Redis
285
215
  test_files: []
216
+ has_rdoc: yard