From 625589c516a201bb2f56c198fef3acea9eb0f5af Mon Sep 17 00:00:00 2001 From: Francesc Esplugas Date: Mon, 18 Nov 2013 15:47:57 +0100 Subject: [PATCH 1/2] Removed deprecation warnings --- test/rails-trash_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/rails-trash_test.rb b/test/rails-trash_test.rb index bfdc4c7..dc4db40 100644 --- a/test/rails-trash_test.rb +++ b/test/rails-trash_test.rb @@ -56,7 +56,7 @@ class Site < ActiveRecord::Base class Entry < ActiveRecord::Base include Rails::Trash - default_scope where(arel_table[:deleted_at].eq(nil)) if arel_table[:deleted_at] + default_scope { where(arel_table[:deleted_at].eq(nil)) } if arel_table[:deleted_at] belongs_to :site has_many :comments, :dependent => :destroy @@ -64,7 +64,7 @@ class Entry < ActiveRecord::Base class Comment < ActiveRecord::Base include Rails::Trash - default_scope where(arel_table[:deleted_at].eq(nil)) if arel_table[:deleted_at] + default_scope { where(arel_table[:deleted_at].eq(nil)) } if arel_table[:deleted_at] belongs_to :entry end From a1edde6c0ce7a57f1bf1c15f2174d8786a610985 Mon Sep 17 00:00:00 2001 From: Francesc Esplugas Date: Mon, 18 Nov 2013 15:52:48 +0100 Subject: [PATCH 2/2] Make sure it works with Rails 4. --- rails-trash.gemspec | 4 ++-- test/rails-trash_test.rb | 11 ----------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/rails-trash.gemspec b/rails-trash.gemspec index a096d75..08f2cfa 100644 --- a/rails-trash.gemspec +++ b/rails-trash.gemspec @@ -1,12 +1,12 @@ Gem::Specification.new do |s| s.name = 'rails-trash' - s.version = '3.0.0' + s.version = '4.0.0' s.author = 'Francesc Esplugas' s.email = 'contact@francescesplugas.com' s.homepage = 'https://github.com/fesplugas/rails-trash' s.summary = 'Trash' - s.add_dependency('rails', '>= 3.2.12') + s.add_dependency('rails', '>= 4.0.1') s.add_development_dependency("factory_girl", "~> 4.2.0") s.add_development_dependency("sqlite3", "~> 1.3.7") diff --git a/test/rails-trash_test.rb b/test/rails-trash_test.rb index dc4db40..b336f6b 100644 --- a/test/rails-trash_test.rb +++ b/test/rails-trash_test.rb @@ -1,14 +1,3 @@ -module Rails - module VERSION - MAJOR = 3 - MINOR = 1 - TINY = 0 - PRE = "rc1" - - STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.') - end -end - require 'test/unit' require 'rubygems' require 'active_record'