switch version to 2.1.0

This commit is contained in:
albert
2013-03-03 16:14:03 -05:00
parent 23f9c2396f
commit 427e90bafb
3 changed files with 8 additions and 8 deletions

View File

@@ -200,7 +200,7 @@ class PostQueryBuilder
case q[:order] case q[:order]
when "id", "id_asc" when "id", "id_asc"
relation = relation.order("posts.id") relation = relation.order("posts.id ASC")
when "id_desc" when "id_desc"
relation = relation.order("posts.id DESC") relation = relation.order("posts.id DESC")
@@ -209,13 +209,13 @@ class PostQueryBuilder
relation = relation.order("posts.score DESC, posts.id DESC") relation = relation.order("posts.score DESC, posts.id DESC")
when "score_asc" when "score_asc"
relation = relation.order("posts.score, posts.id DESC") relation = relation.order("posts.score ASC, posts.id DESC")
when "favcount" when "favcount"
relation = relation.order("posts.fav_count DESC, posts.id DESC") relation = relation.order("posts.fav_count DESC, posts.id DESC")
when "favcount_asc" when "favcount_asc"
relation = relation.order("posts.fav_count, posts.id DESC") relation = relation.order("posts.fav_count ASC, posts.id DESC")
when "mpixels", "mpixels_desc" when "mpixels", "mpixels_desc"
# Use "w*h/1000000", even though "w*h" would give the same result, so this can use # Use "w*h/1000000", even though "w*h" would give the same result, so this can use
@@ -223,10 +223,10 @@ class PostQueryBuilder
relation = relation.order("posts.image_width * posts.image_height / 1000000.0 DESC, posts.id DESC") relation = relation.order("posts.image_width * posts.image_height / 1000000.0 DESC, posts.id DESC")
when "mpixels_asc" when "mpixels_asc"
relation = relation.order("posts.image_width * posts.image_height / 1000000.0, posts.id DESC") relation = relation.order("posts.image_width * posts.image_height / 1000000.0 ASC, posts.id DESC")
when "portrait" when "portrait"
relation = relation.order("1.0 * posts.image_width / GREATEST(1, posts.image_height), posts.id DESC") relation = relation.order("1.0 * posts.image_width / GREATEST(1, posts.image_height) ASC, posts.id DESC")
when "landscape" when "landscape"
relation = relation.order("1.0 * posts.image_width / GREATEST(1, posts.image_height) DESC, posts.id DESC") relation = relation.order("1.0 * posts.image_width / GREATEST(1, posts.image_height) DESC, posts.id DESC")
@@ -235,7 +235,7 @@ class PostQueryBuilder
relation = relation.order("posts.file_size DESC") relation = relation.order("posts.file_size DESC")
when "filesize_asc" when "filesize_asc"
relation = relation.order("posts.file_size") relation = relation.order("posts.file_size ASC")
when "rank" when "rank"
relation = relation.order("log(3, posts.score) + (extract(epoch from posts.created_at) - extract(epoch from timestamp '2005-05-24')) / 45000 DESC") relation = relation.order("log(3, posts.score) + (extract(epoch from posts.created_at) - extract(epoch from timestamp '2005-05-24')) / 45000 DESC")

View File

@@ -4,7 +4,7 @@ module Danbooru
class Configuration class Configuration
# The version of this Danbooru. # The version of this Danbooru.
def version def version
"2.0.0" "2.1.0"
end end
# The name of this Danbooru. # The name of this Danbooru.

View File

@@ -35,7 +35,7 @@ class UserTest < ActiveSupport::TestCase
assert_difference("ModAction.count") do assert_difference("ModAction.count") do
@user.invite!(User::Levels::CONTRIBUTOR) @user.invite!(User::Levels::CONTRIBUTOR)
end end
assert_equal("level changed Member -> Contributor by #{CurrentUser.name}", ModAction.first.description) assert_equal("#{@user.id} level changed Member -> Contributor by #{CurrentUser.name}", ModAction.first.description)
end end
end end