While the warning is useful in itself, it doesn't tell you what file is
specifically causing the issue which can make resolving it harder than
it should be. As we've got the path already, we can simply include the
location of the problematic file in the warning message.
The regular expression used to check for non-breaking spaces is invalid,
but prints a warning ("Unknown escape \U is ignored: /\U+A0/") instead
of raising an error.
This commit fixes the check (and the warning).
- If an error occurs when rendering ERB (other than a Psych's
SyntaxError), it's impossible to know in which file the error
occured.
This commit fixes that
Rails has a number of places where a YAML configuration file is read,
then ERB is evaluated and finally the YAML is parsed.
This consolidates that into one common class.
Co-authored-by: Kasper Timm Hansen <kaspth@gmail.com>