From 082e300a4007ef7f0f1ae35cf80e42c551d8f700 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Mon, 21 Dec 2015 02:35:49 +0100 Subject: [PATCH] remove PublicsController completely --- app/controllers/publics_controller.rb | 20 -------------------- config/routes.rb | 10 +--------- spec/controllers/publics_controller_spec.rb | 14 -------------- 3 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 app/controllers/publics_controller.rb delete mode 100644 spec/controllers/publics_controller_spec.rb diff --git a/app/controllers/publics_controller.rb b/app/controllers/publics_controller.rb deleted file mode 100644 index 5d7d0e0eda5..00000000000 --- a/app/controllers/publics_controller.rb +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) 2010-2011, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. - -class PublicsController < ApplicationController - include Diaspora::Parser - - skip_before_action :set_header_data - skip_before_action :set_grammatical_gender - before_action :authenticate_user!, :only => [:index] - - respond_to :html - respond_to :xml, :only => :post - - layout false - - def hub - render :text => params['hub.challenge'], :status => 202, :layout => false - end -end diff --git a/config/routes.rb b/config/routes.rb index 33e5847a187..2daa85525d0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -18,6 +18,7 @@ mount Sidekiq::Web => '/sidekiq', :as => 'sidekiq' end + # Federation mount DiasporaFederation::Engine => "/" get "/atom.xml" => redirect('http://blog.diasporafoundation.org/feed/atom') #too many stupid redirects :() @@ -182,15 +183,6 @@ get '/u/:username' => 'people#show', :as => 'user_profile', :constraints => { :username => /[^\/]+/ } get '/u/:username/profile_photo' => 'users#user_photo', :constraints => { :username => /[^\/]+/ } - - # Federation - - controller :publics do - get "hub" => :hub - end - - - # External resources :services, :only => [:index, :destroy] diff --git a/spec/controllers/publics_controller_spec.rb b/spec/controllers/publics_controller_spec.rb deleted file mode 100644 index 3f3d089ba5b..00000000000 --- a/spec/controllers/publics_controller_spec.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2010-2011, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. - -require 'spec_helper' - -describe PublicsController, :type => :controller do - describe '#hub' do - it 'succeeds' do - get :hub - expect(response).to be_success - end - end -end