diff --git a/app/views/artists/_secondary_links.html.erb b/app/views/artists/_secondary_links.html.erb index 024099bdc..4f477f30d 100644 --- a/app/views/artists/_secondary_links.html.erb +++ b/app/views/artists/_secondary_links.html.erb @@ -1,6 +1,6 @@ <% content_for(:secondary_links) do %> -
  • <%= render "quick_search" %>
  • +
  • <%= render "artists/quick_search" %>
  • <%= link_to "Listing", artists_path %>
  • <%= link_to "Banned", banned_artists_path %>
  • <%= link_to "Search", search_artists_path %>
  • diff --git a/config/schedule.rb b/config/schedule.rb index c7aa0a091..b613464f1 100644 --- a/config/schedule.rb +++ b/config/schedule.rb @@ -18,7 +18,7 @@ every 1.day, :at => "1:00 am" do command "cd /var/www/danbooru2/current ; script/donmai/prune_backup_dbs" end -every 1.day, :at => "2:00 am" do +every 8.hours do command "psql --set statement_timeout=0 -hdbserver -c \"vacuum analyze;\" danbooru2" end diff --git a/db/structure.sql b/db/structure.sql index 4a5521f38..baf20924b 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -2250,8 +2250,6 @@ CREATE TABLE posts ( id integer NOT NULL, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, - up_score integer DEFAULT 0 NOT NULL, - down_score integer DEFAULT 0 NOT NULL, score integer DEFAULT 0 NOT NULL, source character varying(255), md5 character varying(255) NOT NULL, @@ -6256,4 +6254,6 @@ INSERT INTO schema_migrations (version) VALUES ('20130318002652'); INSERT INTO schema_migrations (version) VALUES ('20130318012517'); -INSERT INTO schema_migrations (version) VALUES ('20130318030619'); \ No newline at end of file +INSERT INTO schema_migrations (version) VALUES ('20130318030619'); + +INSERT INTO schema_migrations (version) VALUES ('20130318031705'); \ No newline at end of file diff --git a/test/functional/tag_aliases_controller_test.rb b/test/functional/tag_aliases_controller_test.rb index 7ca6ce19b..9a08faf22 100644 --- a/test/functional/tag_aliases_controller_test.rb +++ b/test/functional/tag_aliases_controller_test.rb @@ -50,16 +50,5 @@ class TagAliasesControllerTest < ActionController::TestCase end end end - - context "destroy_cache action" do - setup do - @tag_alias = FactoryGirl.create(:tag_alias, :antecedent_name => "aaa") - end - - should "reset the cache" do - post :cache, {:id => @tag_alias.id}, {:user_id => @user.id} - assert_nil(Cache.get("ta:aaa")) - end - end end end diff --git a/test/unit/artist_test.rb b/test/unit/artist_test.rb index 11fa3b7d6..c33e5e052 100644 --- a/test/unit/artist_test.rb +++ b/test/unit/artist_test.rb @@ -92,20 +92,20 @@ class ArtistTest < ActiveSupport::TestCase end should "find matches by url" do - a1 = FactoryGirl.create(:artist, :name => "rembrandt", :url_string => "http://rembrandt.com/test.jpg") - a2 = FactoryGirl.create(:artist, :name => "subway", :url_string => "http://subway.com/test.jpg") - a3 = FactoryGirl.create(:artist, :name => "minko", :url_string => "https://minko.com/test.jpg") + a1 = FactoryGirl.create(:artist, :name => "rembrandt", :url_string => "http://rembrandt.com/x/test.jpg") + a2 = FactoryGirl.create(:artist, :name => "subway", :url_string => "http://subway.com/x/test.jpg") + a3 = FactoryGirl.create(:artist, :name => "minko", :url_string => "https://minko.com/x/test.jpg") - assert_equal(["rembrandt"], Artist.find_all_by_url("http://rembrandt.com/test.jpg").map(&:name)) - assert_equal(["rembrandt"], Artist.find_all_by_url("http://rembrandt.com/another.jpg").map(&:name)) + assert_equal(["rembrandt"], Artist.find_all_by_url("http://rembrandt.com/x/test.jpg").map(&:name)) + assert_equal(["rembrandt"], Artist.find_all_by_url("http://rembrandt.com/x/another.jpg").map(&:name)) assert_equal([], Artist.find_all_by_url("http://nonexistent.com/test.jpg").map(&:name)) - assert_equal(["minko"], Artist.find_all_by_url("https://minko.com/test.jpg").map(&:name)) - assert_equal(["minko"], Artist.find_all_by_url("http://minko.com/test.jpg").map(&:name)) + assert_equal(["minko"], Artist.find_all_by_url("https://minko.com/x/test.jpg").map(&:name)) + assert_equal(["minko"], Artist.find_all_by_url("http://minko.com/x/test.jpg").map(&:name)) end should "not allow duplicates" do - FactoryGirl.create(:artist, :name => "warhol", :url_string => "http://warhol.com/a/image.jpg\nhttp://warhol.com/b/image.jpg") - assert_equal(["warhol"], Artist.find_all_by_url("http://warhol.com/test.jpg").map(&:name)) + FactoryGirl.create(:artist, :name => "warhol", :url_string => "http://warhol.com/x/a/image.jpg\nhttp://warhol.com/x/b/image.jpg") + assert_equal(["warhol"], Artist.find_all_by_url("http://warhol.com/x/test.jpg").map(&:name)) end should "hide deleted artists" do