diff --git a/Gemfile b/Gemfile index f8fc1b154..3c3dfaf31 100644 --- a/Gemfile +++ b/Gemfile @@ -108,6 +108,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.17" # Used to store secrets +gem "warning", "~> 1.3" # 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 c379fe345..a63583631 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -902,6 +902,7 @@ GEM vcr (6.1.0) warden (1.2.9) rack (>= 2.0.9) + warning (1.3.0) wcag_color_contrast (0.1.0) web-console (4.2.0) actionview (>= 6.0.0) @@ -1094,6 +1095,7 @@ DEPENDENCIES validate_url (~> 1.0) vault (~> 0.17) vcr (~> 6.1) + warning (~> 1.3) wcag_color_contrast (~> 0.1) web-console (~> 4.2) webdrivers (~> 5.0) diff --git a/bin/setup b/bin/setup index 6bb406ecc..96b520c24 100755 --- a/bin/setup +++ b/bin/setup @@ -30,7 +30,7 @@ FileUtils.chdir APP_ROOT do FileUtils.cp "config/database.yml.sample", "config/database.yml" end - unless File.exists?(".env") + unless File.exist?(".env") FileUtils.cp ".env_sample", ".env" end diff --git a/config/initializers/0_application_config.rb b/config/initializers/0_application_config.rb index 486313028..de053cf6c 100644 --- a/config/initializers/0_application_config.rb +++ b/config/initializers/0_application_config.rb @@ -1,3 +1,13 @@ +# 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}) + class ApplicationConfig URI_REGEXP = %r{(?https?://)?(?.+?)(?:\d+)?$} diff --git a/vendor/cache/warning-1.3.0.gem b/vendor/cache/warning-1.3.0.gem new file mode 100644 index 000000000..ec97a189b Binary files /dev/null and b/vendor/cache/warning-1.3.0.gem differ