From 1ae10d7e6f3c2d86ade5867ab287813e339e7f61 Mon Sep 17 00:00:00 2001 From: Ben Halpern Date: Thu, 27 Jan 2022 13:29:05 -0500 Subject: [PATCH] =?UTF-8?q?Remove=20hardcoded=20/badge=20page=20that=20is?= =?UTF-8?q?=20DEV-only=20=E2=9C=82=EF=B8=8F=E2=9C=82=EF=B8=8F=E2=9C=82?= =?UTF-8?q?=EF=B8=8F=20(#16303)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove hardcoded /badge page that is DEV-only * Remove /badge test * Remove scheduled job --- app/views/pages/badge.html.erb | 128 --------------------------------- config/routes.rb | 1 - config/schedule.yml | 6 -- spec/requests/pages_spec.rb | 8 --- 4 files changed, 143 deletions(-) delete mode 100644 app/views/pages/badge.html.erb diff --git a/app/views/pages/badge.html.erb b/app/views/pages/badge.html.erb deleted file mode 100644 index af9159956..000000000 --- a/app/views/pages/badge.html.erb +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - <%= community_name %> ❤️ - - - <% if @html_variant %> - <%= @html_variant.html.html_safe %> -
- - <% if Settings::General.ga_tracking_id %> - - <% end %> - <% end %> - - diff --git a/config/routes.rb b/config/routes.rb index de04875fa..22dfb60b0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -255,7 +255,6 @@ Rails.application.routes.draw do get "/welcome", to: "pages#welcome" get "/challenge", to: "pages#challenge" get "/checkin", to: "pages#checkin" - get "/badge", to: "pages#badge", as: :pages_badge get "/💸", to: redirect("t/hiring") get "/survey", to: redirect("https://dev.to/ben/final-thoughts-on-the-state-of-the-web-survey-44nn") get "/sponsors", to: "pages#sponsors" diff --git a/config/schedule.yml b/config/schedule.yml index 22292c636..74a9192c4 100644 --- a/config/schedule.yml +++ b/config/schedule.yml @@ -100,12 +100,6 @@ hourly_feed_cache_bust: class: "BustCachePathWorker" args: - "/feed.xml" -hourly_badge_cache_bust: - description: "Busts the edge cache of badges (runs hourly on the hour)" - cron: "0 * * * *" - class: "BustCachePathWorker" - args: - - "/badge" daily_home_cache_bust: description: "Busts the edge cache of the homepage (runs daily at 00:00 UTC)" cron: "0 0 * * *" diff --git a/spec/requests/pages_spec.rb b/spec/requests/pages_spec.rb index f6cdbf9ac..32cddabea 100644 --- a/spec/requests/pages_spec.rb +++ b/spec/requests/pages_spec.rb @@ -219,14 +219,6 @@ RSpec.describe "Pages", type: :request do end end - describe "GET /badge" do - it "has proper headline" do - html_variant = create(:html_variant, group: "badge_landing_page", published: true, approved: true) - get "/badge" - expect(response.body).to include(html_variant.html) - end - end - describe "GET /robots.txt" do it "has proper text" do get "/robots.txt"