Silence parser warnings (#18429)
This commit is contained in:
parent
abbb4d2015
commit
0e43c915d9
5 changed files with 14 additions and 1 deletions
1
Gemfile
1
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
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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{(?<scheme>https?://)?(?<host>.+?)(?<port>:\d+)?$}
|
||||
|
||||
|
|
|
|||
BIN
vendor/cache/warning-1.3.0.gem
vendored
Normal file
BIN
vendor/cache/warning-1.3.0.gem
vendored
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue