From b2a2f4bee5d1ad3762126ab10db084d3250abffb Mon Sep 17 00:00:00 2001 From: Anna Buianova Date: Tue, 7 Apr 2020 17:36:21 +0300 Subject: [PATCH] Remove dynamic /live page (#7130) * Removed dynamic /live page --- .erb-lint.yml | 1 - app/controllers/pages_controller.rb | 7 --- app/views/pages/live.html.erb | 70 ----------------------------- config/routes.rb | 1 - spec/requests/pages_spec.rb | 9 ---- 5 files changed, 88 deletions(-) delete mode 100644 app/views/pages/live.html.erb diff --git a/.erb-lint.yml b/.erb-lint.yml index f05a282b4..c078a6547 100644 --- a/.erb-lint.yml +++ b/.erb-lint.yml @@ -37,7 +37,6 @@ linters: - '**/app/views/layouts/_styles.html.erb' - '**/app/views/liquid_embeds/show.html.erb' - '**/app/views/moderations/mod.html.erb' - - '**/app/views/pages/live.html.erb' - '**/app/views/pages/onboarding.html.erb' - '**/app/views/partnerships/show.html.erb' - '**/app/views/partnerships/index.html.erb' diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index ca6c3b743..05ed20dea 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -72,13 +72,6 @@ class PagesController < ApplicationController end end - def live - @active_channel = ChatChannel.find_by(channel_name: "Workshop") - @chat_channels = [@active_channel].to_json( - only: %i[channel_name channel_type last_message_at slug status id], - ) - end - def crayons @page = Page.find_by(slug: "crayons") render :show if @page diff --git a/app/views/pages/live.html.erb b/app/views/pages/live.html.erb deleted file mode 100644 index 4c9c753ca..000000000 --- a/app/views/pages/live.html.erb +++ /dev/null @@ -1,70 +0,0 @@ -<% if user_signed_in? %> - <%= javascript_packs_with_chunks_tag "Chat", defer: true %> -<% end %> -<% title "DEV Live 📡👩‍💻👨‍💻👩‍💻👨‍💻" %> - - - - - - - - - - - - - - - - - - - -<% if current_user&.has_role?(:super_admin) %> -
-
-
- -
-
-
" data-chat-channels="<%= @chat_channels %>" data-chat-options="<%= { showChannelsList: false, showTimestamp: false, activeChannelId: @active_channel.id }.to_json %>"> -
-
-
-
DEV Live is in beta and currently does not support Safari. We recommend Chrome or Firefox for optimal viewing experience. If you are having issues, contact - members@dev.to for support. ❤️ -
-
-<% elsif false %> -
-

- DEV LIVE <%= image_tag("emoji/emoji-one-television.png", style: "width: 55px; height: 50px; vertical-align: text-top;", alt: "television emoji") %> -

-

- Our event is starting soon! Check back very shortly. -

-
- -<% elsif false %> -
-

DEV IS - LIVE <%= image_tag("emoji/emoji-one-television.png", style: "width: 60px;", alt: "television emoji") %> -

- <%= render "devise/registrations/registration_form" %> - -
-<% else %> -
-

We are working on more ways to bring live coding to the community.

-

Check out the integrations tab in your settings.

-
-<% end %> diff --git a/config/routes.rb b/config/routes.rb index 1645c35dc..04a58af43 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -305,7 +305,6 @@ Rails.application.routes.draw do get "/code-of-conduct" => "pages#code_of_conduct" get "/report-abuse" => "pages#report_abuse" get "/faq" => "pages#faq" - get "/live" => "pages#live" get "/welcome" => "pages#welcome" get "/challenge" => "pages#challenge" get "/badge" => "pages#badge" diff --git a/spec/requests/pages_spec.rb b/spec/requests/pages_spec.rb index ae779a210..350744150 100644 --- a/spec/requests/pages_spec.rb +++ b/spec/requests/pages_spec.rb @@ -106,15 +106,6 @@ RSpec.describe "Pages", type: :request do end end - describe "GET /live" do - context "when nothing is live" do - it "shows the correct message" do - get "/live" - expect(response.body).to include("We are working on more ways to bring live coding to the community") - end - end - end - describe "GET /robots.txt" do it "has proper text" do get "/robots.txt"