From 427e90bafbb316d8aeb2219024fa9fc227bf808b Mon Sep 17 00:00:00 2001 From: albert Date: Sun, 3 Mar 2013 16:14:03 -0500 Subject: [PATCH] switch version to 2.1.0 --- app/logical/post_query_builder.rb | 12 ++++++------ config/danbooru_default_config.rb | 2 +- test/unit/user_test.rb | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/logical/post_query_builder.rb b/app/logical/post_query_builder.rb index 209fa8506..719faef88 100644 --- a/app/logical/post_query_builder.rb +++ b/app/logical/post_query_builder.rb @@ -200,7 +200,7 @@ class PostQueryBuilder case q[:order] when "id", "id_asc" - relation = relation.order("posts.id") + relation = relation.order("posts.id ASC") when "id_desc" relation = relation.order("posts.id DESC") @@ -209,13 +209,13 @@ class PostQueryBuilder relation = relation.order("posts.score DESC, posts.id DESC") when "score_asc" - relation = relation.order("posts.score, posts.id DESC") + relation = relation.order("posts.score ASC, posts.id DESC") when "favcount" relation = relation.order("posts.fav_count DESC, posts.id DESC") 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" # 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") 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" - 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" 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") when "filesize_asc" - relation = relation.order("posts.file_size") + relation = relation.order("posts.file_size ASC") when "rank" relation = relation.order("log(3, posts.score) + (extract(epoch from posts.created_at) - extract(epoch from timestamp '2005-05-24')) / 45000 DESC") diff --git a/config/danbooru_default_config.rb b/config/danbooru_default_config.rb index e19fa2c49..b30fbfe02 100644 --- a/config/danbooru_default_config.rb +++ b/config/danbooru_default_config.rb @@ -4,7 +4,7 @@ module Danbooru class Configuration # The version of this Danbooru. def version - "2.0.0" + "2.1.0" end # The name of this Danbooru. diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index e084bcaf3..0f470a5b1 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -35,7 +35,7 @@ class UserTest < ActiveSupport::TestCase assert_difference("ModAction.count") do @user.invite!(User::Levels::CONTRIBUTOR) 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