diff --git a/app/assets/images/SheCodedBackground.png b/app/assets/images/SheCodedBackground.png deleted file mode 100644 index 373da26ea..000000000 Binary files a/app/assets/images/SheCodedBackground.png and /dev/null differ diff --git a/app/assets/images/shecoded-background.jpg b/app/assets/images/shecoded-background.jpg deleted file mode 100644 index 58f6677da..000000000 Binary files a/app/assets/images/shecoded-background.jpg and /dev/null differ diff --git a/app/lib/constants/site_config.rb b/app/lib/constants/site_config.rb index be0a4fd80..f3e3e6a86 100644 --- a/app/lib/constants/site_config.rb +++ b/app/lib/constants/site_config.rb @@ -14,7 +14,7 @@ module Constants }, campaign_featured_tags: { description: "Posts with which tags will be featured in the campaign sidebar (comma separated, letters only)", - placeholder: "List of campaign tags: comma separated, letters only e.g. shecoded,theycoded" + placeholder: "List of campaign tags: comma separated, letters only e.g. tagone,tagtwo" }, campaign_hero_html_variant_name: { description: "Hero HtmlVariant name", diff --git a/app/views/social_previews/articles/shecoded.html.erb b/app/views/social_previews/articles/shecoded.html.erb deleted file mode 100644 index 3e84cefe1..000000000 --- a/app/views/social_previews/articles/shecoded.html.erb +++ /dev/null @@ -1,132 +0,0 @@ - -
-
- <% if @article.title.size < 15 %> - <% font_size = 12 %> - <% elsif @article.title.size < 30 %> - <% font_size = 9.2 %> - <% elsif @article.title.size < 50 %> - <% font_size = 8.3 %> - <% else %> - <% font_size = 15 - (((@article.title.size**0.92) + 85) / 16) %> - <% end %> - - <% font_size *= 0.9 %> -
- <%= (@article.tag_list & Campaign.current.featured_tags).map { |tag| "##{tag}" }.join(" ") %> -
-
-

<%= @article.title %>

-
-
- - <%= truncate @article.user.name, length: 28 %>・<%= @article.readable_publish_date %> -
-
- <% @tag_badges.each do |badge| %> - <%# Use a seed in Random so we don't break cache on every render %> - <% not_so_rand = Random.new(badge.id + @article.id) %> - - <% end %> - -
-
-
diff --git a/lib/data_update_scripts/20200225114328_update_tags_social_preview_templates.rb b/lib/data_update_scripts/20200225114328_update_tags_social_preview_templates.rb index ca7292964..0bc7be99e 100644 --- a/lib/data_update_scripts/20200225114328_update_tags_social_preview_templates.rb +++ b/lib/data_update_scripts/20200225114328_update_tags_social_preview_templates.rb @@ -1,7 +1,9 @@ module DataUpdateScripts class UpdateTagsSocialPreviewTemplates def run - Tag.where(name: %w[shecoded theycoded shecodedally]).update_all(social_preview_template: "shecoded") + # This script references the shecoded campaign, which has been removed from the app code entirely. + + # Tag.where(name: %w[shecoded theycoded shecodedally]).update_all(social_preview_template: "shecoded") end end end diff --git a/spec/requests/articles/articles_spec.rb b/spec/requests/articles/articles_spec.rb index 6b091eec8..ffa5e993a 100644 --- a/spec/requests/articles/articles_spec.rb +++ b/spec/requests/articles/articles_spec.rb @@ -274,7 +274,7 @@ RSpec.describe "Articles", type: :request do context "with authorized user with tag param" do it "returns a new article" do - get "/new", params: { slug: "shecoded" } + get "/new", params: { slug: "mytag" } expect(response).to have_http_status(:ok) end end diff --git a/spec/requests/social_previews_spec.rb b/spec/requests/social_previews_spec.rb index 330d3e745..9f67a4a6b 100644 --- a/spec/requests/social_previews_spec.rb +++ b/spec/requests/social_previews_spec.rb @@ -32,27 +32,6 @@ RSpec.describe "SocialPreviews", type: :request do expect(first_request_body).to eq second_request_body end - it "renders custom template when tagged with shecoded" do - create(:tag, social_preview_template: "shecoded") - she_coded_article = create(:article, tags: "shecoded") - - get "/social_previews/article/#{she_coded_article.id}" - - expect(response.body).to include CGI.escapeHTML(she_coded_article.title) - end - - it "includes campaign tags when tagged with 2 campaign tags" do - create(:tag, name: "shecoded", social_preview_template: "shecoded") - create(:tag, name: "theycoded", social_preview_template: "shecoded") - - she_coded_article = create(:article, tags: "shecoded, theycoded") - SiteConfig.campaign_featured_tags = "shecoded,theycoded" - - get "/social_previews/article/#{she_coded_article.id}" - - expect(response.body).to include("#shecoded #theycoded") - end - it "renders an image when requested and redirects to image url" do get "/social_previews/article/#{article.id}.png" diff --git a/spec/requests/stories_index_spec.rb b/spec/requests/stories_index_spec.rb index 5ba32cc6e..b030c9959 100644 --- a/spec/requests/stories_index_spec.rb +++ b/spec/requests/stories_index_spec.rb @@ -198,12 +198,12 @@ RSpec.describe "StoriesIndex", type: :request do context "with campaign_sidebar" do before do - allow(SiteConfig).to receive(:campaign_featured_tags).and_return("shecoded,theycoded") + allow(SiteConfig).to receive(:campaign_featured_tags).and_return("mytag,yourtag") allow(SiteConfig).to receive(:home_feed_minimum_score).and_return(7) - a_body = "---\ntitle: Super-sheep#{rand(1000)}\npublished: true\ntags: heyheyhey,shecoded\n---\n\nHello" + a_body = "---\ntitle: Super-sheep#{rand(1000)}\npublished: true\ntags: heyheyhey,mytag\n---\n\nHello" create(:article, approved: true, body_markdown: a_body, score: 1) - u_body = "---\ntitle: Unapproved-post#{rand(1000)}\npublished: true\ntags: heyheyhey,shecoded\n---\n\nHello" + u_body = "---\ntitle: Unapproved-post#{rand(1000)}\npublished: true\ntags: heyheyhey,mytag\n---\n\nHello" create(:article, approved: false, body_markdown: u_body, score: 1) end