1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

6 commits

Author SHA1 Message Date
Ivan Giuliani
66f8a2ea7f Include file path in invisible space warning
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.
2020-12-23 10:07:38 +00:00
Jonathan Hefner
58470a06ad Fix ConfigurationFile check for non-breaking space
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).
2020-02-15 14:37:01 -06:00
Edouard CHIN
afb0220436 Cast ConfigurationFile#content_path to a string:
- This is required when we assign the `ERB#filename` in case
  of a Pathname.
2020-02-10 19:12:33 -04:00
Kasper Timm Hansen
94d2b29e86
Fine, Rubocop, don't shadow outer variable 2020-02-10 23:14:48 +01:00
Edouard CHIN
ec1b3d70ca
Add the filename when building ERB:
- 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
2020-02-10 23:06:30 +01:00
Kurtis Rainbolt-Greene
ef7599fe91
Extract internal ActiveSupport::ConfigurationFile object
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>
2020-02-10 02:50:12 +01:00