[DRE-commits] [ruby-diaspora-vines] 01/02: Patch to support rails 4.2.7.

Stefano Rivera stefano at rivera.za.net
Thu Aug 25 17:24:40 UTC 2016


This is an automated email from the git hooks/post-receive script.

stefanor pushed a commit to branch master
in repository ruby-diaspora-vines.

commit 1a6fcbbf09e0a3ff34affedb8f0b95bd1b975719
Author: Stefano Rivera <stefanor at debian.org>
Date:   Thu Aug 25 10:13:08 2016 -0700

    Patch to support rails 4.2.7.
---
 debian/changelog                      |  6 ++++++
 debian/patches/series                 |  1 +
 debian/patches/where-parameters.patch | 27 +++++++++++++++++++++++++++
 3 files changed, 34 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 8698ffa..bafc25f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+ruby-diaspora-vines (0.2.0.develop.4-2) UNRELEASED; urgency=medium
+
+  * Patch to support rails 4.2.7.
+
+ -- Stefano Rivera <stefanor at debian.org>  Thu, 25 Aug 2016 10:12:36 -0700
+
 ruby-diaspora-vines (0.2.0.develop.4-1) unstable; urgency=medium
 
   * Team upload
diff --git a/debian/patches/series b/debian/patches/series
index 58db2ee..d62bed3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 storage_test_patch.diff
 relax-dependency-eventmachine.patch
+where-parameters.patch
diff --git a/debian/patches/where-parameters.patch b/debian/patches/where-parameters.patch
new file mode 100644
index 0000000..6d1f951
--- /dev/null
+++ b/debian/patches/where-parameters.patch
@@ -0,0 +1,27 @@
+Description: Compatibility with Rails 4.2.7
+ See: https://github.com/rails/rails/issues/20434
+Author: Stefano Rivera <stefanor at debian.org>
+Forwarded: https://github.com/diaspora/vines/pull/79
+
+--- a/lib/vines/storage/sql.rb
++++ b/lib/vines/storage/sql.rb
+@@ -226,7 +226,7 @@
+       def save_message(from, to, msg)
+         return if from.empty? || to.empty? || msg.empty?
+         com = Sql::ChatOfflineMessage
+-        current = com.count(:to => to)
++        current = com.where(:to => to).count
+         unless current < Config.instance.max_offline_msgs
+           com.where(:to => to)
+              .order(created_at: :asc)
+--- a/test/storage/sql_test.rb
++++ b/test/storage/sql_test.rb
+@@ -149,7 +149,7 @@
+       Vines::Storage::Sql::ChatOfflineMessage.all.each do |com|
+         db.destroy_message(com.id)
+       end
+-      count = Vines::Storage::Sql::ChatOfflineMessage.count(id: 1)
++      count = Vines::Storage::Sql::ChatOfflineMessage.where(id: 1).count
+       assert_equal 0, count
+     end
+   end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-diaspora-vines.git



More information about the Pkg-ruby-extras-commits mailing list