From 613fea26d457d5efc76aa97421c841b3f33ddf0c Mon Sep 17 00:00:00 2001 From: Ari Timonen Date: Sun, 22 Mar 2020 15:04:06 +0200 Subject: [PATCH] Remove acts_as_rateable --- Gemfile | 2 ++ lib/plugins/acts_as_rateable/MIT-LICENSE | 20 ------------ lib/plugins/acts_as_rateable/README | 40 ------------------------ lib/plugins/acts_as_rateable/Rakefile | 22 ------------- lib/plugins/acts_as_rateable/init.rb | 3 -- 5 files changed, 2 insertions(+), 85 deletions(-) delete mode 100644 lib/plugins/acts_as_rateable/MIT-LICENSE delete mode 100644 lib/plugins/acts_as_rateable/README delete mode 100644 lib/plugins/acts_as_rateable/Rakefile delete mode 100644 lib/plugins/acts_as_rateable/init.rb diff --git a/Gemfile b/Gemfile index 6ca30ac..8ac2ccd 100644 --- a/Gemfile +++ b/Gemfile @@ -23,6 +23,8 @@ gem 'puma' # Model plugins # FIXME: using this b/c ruby 2.4 not supported gem 'unread', '0.10.1' +# gem 'impressionist' +# gem 'ratyrate' # gem "acts_as_rateable", :git => "git://github.com/anton-zaytsev/acts_as_rateable.git" # View helper gems diff --git a/lib/plugins/acts_as_rateable/MIT-LICENSE b/lib/plugins/acts_as_rateable/MIT-LICENSE deleted file mode 100644 index 570ecf8..0000000 --- a/lib/plugins/acts_as_rateable/MIT-LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2007 [name of plugin creator] - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/lib/plugins/acts_as_rateable/README b/lib/plugins/acts_as_rateable/README deleted file mode 100644 index 90e0228..0000000 --- a/lib/plugins/acts_as_rateable/README +++ /dev/null @@ -1,40 +0,0 @@ -Acts As Rateble -============= - -Acts_as_rateable is a plugin released under the MIT license. -It makes activerecord models rateable through a polymorphic association and optionally logs which user rated which model. -In this case, one user can rate an object once. Used on cotcot.hu for article rating, sponsored quizzes, etc. - - -Example -======= - -Install the plugin into your vendor/plugins directory, insert 'acts_as_rateable' into your model, then restart your application. - -class Post < ActiveRecord::Base - - acts_as_rateable - -end - -Now your model is extended by the plugin, you can rate it ( 1-# )or calculate the average rating. - -@post.rate_it( 4, current_user.id ) - -@post.average_rating #=> 4.0 - -@post.average_rating_round #=> 4 - -@post.average_rating_percent #=> 80 - -@post.rated_by?( current_user ) #=> rating || false - -Post.find_average_of( 4 ) #=> array of posts - -See acts_as_rateable.rb for further details! - -# Notes - -Jinzhu - generator is compatible with rails 3. - -Copyright (c) 2007-2010 Ferenc Fekete, http://feketeferenc.hu , released under the MIT license diff --git a/lib/plugins/acts_as_rateable/Rakefile b/lib/plugins/acts_as_rateable/Rakefile deleted file mode 100644 index 27caa2b..0000000 --- a/lib/plugins/acts_as_rateable/Rakefile +++ /dev/null @@ -1,22 +0,0 @@ -require 'rake' -require 'rake/testtask' -require 'rake/rdoctask' - -desc 'Default: run unit tests.' -task :default => :test - -desc 'Test the acts_as_ratable plugin.' -Rake::TestTask.new(:test) do |t| - t.libs << 'lib' - t.pattern = 'test/**/*_test.rb' - t.verbose = true -end - -desc 'Generate documentation for the acts_as_ratable plugin.' -Rake::RDocTask.new(:rdoc) do |rdoc| - rdoc.rdoc_dir = 'rdoc' - rdoc.title = 'ActsAsRatable' - rdoc.options << '--line-numbers' << '--inline-source' - rdoc.rdoc_files.include('README') - rdoc.rdoc_files.include('lib/**/*.rb') -end diff --git a/lib/plugins/acts_as_rateable/init.rb b/lib/plugins/acts_as_rateable/init.rb deleted file mode 100644 index fad37bf..0000000 --- a/lib/plugins/acts_as_rateable/init.rb +++ /dev/null @@ -1,3 +0,0 @@ -require 'acts_as_rateable' - -ActiveRecord::Base.send(:include, ActiveRecord::Acts::Rateable)