fixes #2108, upgrade to postgresql 9.3, fix tests

This commit is contained in:
r888888888
2014-04-11 14:15:14 -07:00
parent e46d467f64
commit 7edcbf33dd
4 changed files with 278 additions and 199 deletions

View File

@@ -19,11 +19,11 @@ group :assets do
end end
gem "rails" gem "rails"
gem "pg", "0.12.2" gem "pg"
gem "kgio" gem "kgio"
gem "dalli" gem "dalli"
gem "delayed_job" gem "delayed_job"
gem "delayed_job_active_record", :git => "https://github.com/r888888888/delayed_job_active_record.git", :branch => "postgresql8" gem "delayed_job_active_record"
gem "simple_form" gem "simple_form"
gem "mechanize" gem "mechanize"
gem "nokogiri" gem "nokogiri"

View File

@@ -1,12 +1,3 @@
GIT
remote: https://github.com/r888888888/delayed_job_active_record.git
revision: ed036c188ebc323929a7509a9cebf40466bc0b0d
branch: postgresql8
specs:
delayed_job_active_record (4.0.0)
activerecord (>= 3.0, < 4.1)
delayed_job (>= 3.0, < 4.1)
GIT GIT
remote: https://github.com/r888888888/ruby-imagespec.git remote: https://github.com/r888888888/ruby-imagespec.git
revision: 2dab9811f4abb4fbaeea66feb42e388ba545b2d8 revision: 2dab9811f4abb4fbaeea66feb42e388ba545b2d8
@@ -69,6 +60,9 @@ GEM
dalli (2.6.4) dalli (2.6.4)
delayed_job (4.0.0) delayed_job (4.0.0)
activesupport (>= 3.0, < 4.1) activesupport (>= 3.0, < 4.1)
delayed_job_active_record (4.0.0)
activerecord (>= 3.0, < 4.1)
delayed_job (>= 3.0, < 4.1)
diff-lcs (1.2.4) diff-lcs (1.2.4)
domain_name (0.5.12) domain_name (0.5.12)
unf (>= 0.0.5, < 1.0.0) unf (>= 0.0.5, < 1.0.0)
@@ -226,7 +220,7 @@ DEPENDENCIES
daemons daemons
dalli dalli
delayed_job delayed_job
delayed_job_active_record! delayed_job_active_record
diff-lcs diff-lcs
factory_girl factory_girl
ffaker ffaker
@@ -237,7 +231,7 @@ DEPENDENCIES
net-ssh net-ssh
newrelic_rpm newrelic_rpm
nokogiri nokogiri
pg (= 0.12.2) pg
pry pry
rails rails
rmagick rmagick

View File

@@ -106,7 +106,7 @@ class ForumTopic < ActiveRecord::Base
end end
def read_by?(user, read_forum_topic_ids) def read_by?(user, read_forum_topic_ids)
return true if updated_at < user.last_forum_read_at return true if user.last_forum_read_at && updated_at < user.last_forum_read_at
if read_forum_topic_ids.any? {|topic_id, timestamp| id.to_s == topic_id && updated_at.to_i > timestamp.to_i} if read_forum_topic_ids.any? {|topic_id, timestamp| id.to_s == topic_id && updated_at.to_i > timestamp.to_i}
return false return false
end end

File diff suppressed because it is too large Load Diff