diff --git a/Gemfile b/Gemfile index ef07f9f0f..cfa908da3 100644 --- a/Gemfile +++ b/Gemfile @@ -107,6 +107,7 @@ gem "twitter", "~> 7.0" # A Ruby interface to the Twitter API gem "uglifier", "~> 4.2" # Uglifier minifies JavaScript files gem "validate_url", "~> 1.0" # Library for validating urls in Rails gem "vault", "~> 0.16" # Used to store secrets +gem "warning", "~> 1.2" # Adds custom processing for warnings, including the ability to ignore specific warning messages gem "wcag_color_contrast", "~> 0.1" # Detect contrast of colors to determine readability and a11y. gem "webpacker", "~> 5.4.3" # Use webpack to manage app-like JavaScript modules in Rails diff --git a/Gemfile.lock b/Gemfile.lock index ef74f9d84..008366ddd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -851,6 +851,7 @@ GEM vcr (6.0.0) warden (1.2.9) rack (>= 2.0.9) + warning (1.2.1) wcag_color_contrast (0.1.0) web-console (4.2.0) actionview (>= 6.0.0) @@ -1036,6 +1037,7 @@ DEPENDENCIES validate_url (~> 1.0) vault (~> 0.16) vcr (~> 6.0) + warning (~> 1.2) wcag_color_contrast (~> 0.1) web-console (~> 4.2) webdrivers (~> 5.0) diff --git a/config/boot.rb b/config/boot.rb index 988a5ddc4..d22fd2f3b 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,4 +1,14 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) +# NOTE: We need to ignore this warning early during app startup. +# 1. `parser` is a transitive dependency (`erb_lint` -> `better_html` -> `parser`) +# 2. The warnings are generated while reading the class body, so we need to ignore +# them *before* the gem's code is read. +# 3. The warning is intentional, it will always occur when the used point release +# isn't the most recent. Since our update schedule is somewhat influenced by +# Fedora release cycles right now, this can occur frequently. +require "warning" +Warning.ignore(%r{parser/current}) + require "bundler/setup" # Set up gems listed in the Gemfile. require "bootsnap/setup" # Speed up boot time by caching expensive operations. diff --git a/vendor/cache/warning-1.2.1.gem b/vendor/cache/warning-1.2.1.gem new file mode 100644 index 000000000..3e2214264 Binary files /dev/null and b/vendor/cache/warning-1.2.1.gem differ