diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index dd82a3105..9ab319e56 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -19,6 +19,7 @@ env: DATABASE_NAME_TEST: Forem_test KNAPSACK_PRO_FIXED_QUEUE_SPLIT: true POSTGRES_PASSWORD: postgres + KNAPSACK_PRO_LOG_LEVEL: info jobs: bundle_install: diff --git a/.gitpod.dockerfile b/.gitpod.dockerfile index 12595d9bd..ea7b4b646 100644 --- a/.gitpod.dockerfile +++ b/.gitpod.dockerfile @@ -1,7 +1,7 @@ FROM gitpod/workspace-postgres # Install Ruby -ENV RUBY_VERSION=3.0.2 +ENV RUBY_VERSION=3.0.6 # Install the GitHub CLI RUN brew install gh diff --git a/.ruby-version b/.ruby-version index b50214693..818bd47ab 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.0.2 +3.0.6 diff --git a/Containerfile b/Containerfile index 99ae22f91..5de64bbbd 100644 --- a/Containerfile +++ b/Containerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/forem/ruby:3.0.2@sha256:04c945460e5999c0483b119074597dba62b863f5f5ea3c98bff4169e0d2f990b as base +FROM ghcr.io/forem/ruby:3.0.6@sha256:287260a9c729fcd4f7952c551f8320cfe484db9d1e3ac77986b175b959aba715 as base FROM base as builder diff --git a/Gemfile b/Gemfile index 66bcf2a78..aa5162b02 100644 --- a/Gemfile +++ b/Gemfile @@ -173,3 +173,5 @@ group :test do gem "with_model", "~> 2.1.6" # Dynamically build a model within an RSpec context gem "zonebie", "~> 0.6.1" # Runs your tests in a random timezone end + +gem "cgi", "~> 0.3.6" # Support for the Common Gateway Interface protocol. diff --git a/Gemfile.lock b/Gemfile.lock index 045aa8910..24226c330 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -156,6 +156,7 @@ GEM activesupport (>= 3.2.0) carrierwave fastimage + cgi (0.3.6) chartkick (4.2.1) cloudinary (1.26.0) aws_cf_signer @@ -979,6 +980,7 @@ DEPENDENCIES capybara (~> 3.37.1) carrierwave (~> 2.2) carrierwave-bombshelter (~> 0.2) + cgi (~> 0.3.6) cloudinary (~> 1.23) counter_culture (~> 3.2) cuprite (~> 0.13) @@ -1118,7 +1120,7 @@ DEPENDENCIES zonebie (~> 0.6.1) RUBY VERSION - ruby 3.0.2p107 + ruby 3.0.6p216 BUNDLED WITH - 2.2.22 + 2.2.33 diff --git a/bin/knapsack_pro_rspec b/bin/knapsack_pro_rspec index 949a2c99d..875a25c2d 100755 --- a/bin/knapsack_pro_rspec +++ b/bin/knapsack_pro_rspec @@ -4,7 +4,7 @@ if [ "$KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC" = "" ]; then KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC=disabled-for-fork \ KNAPSACK_PRO_MAX_REQUEST_RETRIES=0 \ KNAPSACK_PRO_CI_NODE_RETRY_COUNT=0 \ - bundle exec rake "knapsack_pro:rspec[--format RspecJunitFormatter --out tmp/rspec.xml]" + bundle exec rake "knapsack_pro:rspec[--force-color --format documentation --format RspecJunitFormatter --out tmp/rspec.xml]" else - bundle exec rake "knapsack_pro:queue:rspec[--format RspecJunitFormatter --out tmp/rspec.xml]" + bundle exec rake "knapsack_pro:queue:rspec[--force-color --format documentation --format RspecJunitFormatter --out tmp/rspec.xml]" fi diff --git a/spec/liquid_tags/twitch_tag_spec.rb b/spec/liquid_tags/twitch_tag_spec.rb index 38091672d..81d5bc16e 100644 --- a/spec/liquid_tags/twitch_tag_spec.rb +++ b/spec/liquid_tags/twitch_tag_spec.rb @@ -7,12 +7,12 @@ RSpec.describe TwitchTag, type: :liquid_tag do def assert_parses_clip(slug, token) liquid = Liquid::Template.parse("{% twitch #{token} %}").render - expect(liquid).to include "https://clips.twitch.tv/embed?clip=#{slug}&parent=localhost&autoplay=false" + expect(liquid).to include "https://clips.twitch.tv/embed?clip=#{slug}&parent=forem.test&autoplay=false" end def assert_parses_video(id, token) liquid = Liquid::Template.parse("{% twitch #{token} %}").render - expect(liquid).to include "https://player.twitch.tv/?video=#{id}&parent=localhost&autoplay=false" + expect(liquid).to include "https://player.twitch.tv/?video=#{id}&parent=forem.test&autoplay=false" end context "when twitch clip slug passed in" do diff --git a/spec/liquid_tags/unified_embed/tag_spec.rb b/spec/liquid_tags/unified_embed/tag_spec.rb index a4ada6ecc..8a6f0cbb6 100644 --- a/spec/liquid_tags/unified_embed/tag_spec.rb +++ b/spec/liquid_tags/unified_embed/tag_spec.rb @@ -22,7 +22,7 @@ RSpec.describe UnifiedEmbed::Tag, type: :liquid_tag do headers: { "Accept" => "*/*", "Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3", - "User-Agent" => "DEV(local) (http://localhost:3000)" + "User-Agent" => "DEV(local) (http://forem.test)" }, ) .to_return( diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 80c5056c2..527eb8dcb 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -1,4 +1,6 @@ ENV["RAILS_ENV"] = "test" +# Temporary workaround for Ruby 3.0.6 / CGI udpate +ENV["APP_DOMAIN"] = "forem.test" require "knapsack_pro" require "simplecov" require "simplecov_json_formatter" diff --git a/spec/requests/articles/articles_spec.rb b/spec/requests/articles/articles_spec.rb index 75478f699..1c11d90ad 100644 --- a/spec/requests/articles/articles_spec.rb +++ b/spec/requests/articles/articles_spec.rb @@ -280,12 +280,12 @@ RSpec.describe "Articles" do it "sets canonical url with base" do get "/new" - expect(response.body).to include('') + expect(response.body).to include('') end it "sets canonical url with prefill" do get "/new?prefill=dsdweewewew" - expect(response.body).to include('') + expect(response.body).to include('') end end diff --git a/spec/requests/stories/tagged_articles_spec.rb b/spec/requests/stories/tagged_articles_spec.rb index 476b55823..4aa9fa310 100644 --- a/spec/requests/stories/tagged_articles_spec.rb +++ b/spec/requests/stories/tagged_articles_spec.rb @@ -260,7 +260,7 @@ RSpec.describe "Stories::TaggedArticlesIndex" do end def renders_canonical_url(tag) - expect(response.body).to include("") + expect(response.body).to include("") end it "renders proper page 2", :aggregate_failures do @@ -276,7 +276,7 @@ RSpec.describe "Stories::TaggedArticlesIndex" do end def renders_page_2_canonical_url(tag) - expected_tag = "" + expected_tag = "" expect(response.body).to include(expected_tag) end end diff --git a/spec/services/markdown_processor/parser_spec.rb b/spec/services/markdown_processor/parser_spec.rb index 235c2bcd8..7d99df13b 100644 --- a/spec/services/markdown_processor/parser_spec.rb +++ b/spec/services/markdown_processor/parser_spec.rb @@ -278,7 +278,7 @@ RSpec.describe MarkdownProcessor::Parser, type: :service do end it "strips the styles as expected" do - linked_user = %(@user1) + linked_user = %(@user1) expected_result = <<~HTML.strip
x{animation:s}#{linked_user} s{}<br> <style>{transition:color 1s}:hover{color:red}</p> diff --git a/uffizzi/Dockerfile b/uffizzi/Dockerfile index 9bbf5c132..34b7ec1e6 100644 --- a/uffizzi/Dockerfile +++ b/uffizzi/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/forem/ruby:3.0.2@sha256:04c945460e5999c0483b119074597dba62b863f5f5ea3c98bff4169e0d2f990b as base +FROM ghcr.io/forem/ruby:3.0.6@sha256:287260a9c729fcd4f7952c551f8320cfe484db9d1e3ac77986b175b959aba715 as base FROM base as builder diff --git a/vendor/cache/cgi-0.3.6.gem b/vendor/cache/cgi-0.3.6.gem new file mode 100644 index 000000000..925746cd3 Binary files /dev/null and b/vendor/cache/cgi-0.3.6.gem differ