Closed barzilay closed 6 years ago
While working on this one, it might be nice to extend the error reporting as following:
Current
Unknown environment variable 'acceptance.pages.root.url' and no default given
Possible improvement
The environment variable 'acceptance.pages.root.url' was not found:
- acceptance > exists
- acceptance.pages > exists
- acceptance.pages.root > does not exist
@barzilay WDYT?
Expect the following feedback (or similar) when parsing fails for a config file:
`2.3.1 :006 > x = YAML.load_file('config.yml')
Psych::SyntaxError: (config.yml): mapping values are not allowed in this context at line 51 column 16
from /Users/Barzilay/.rvm/gems/ruby-2.3.1/gems/psych-2.2.4/lib/psych.rb:377:in parse' from /Users/Barzilay/.rvm/gems/ruby-2.3.1/gems/psych-2.2.4/lib/psych.rb:377:in
parse_stream'
from /Users/Barzilay/.rvm/gems/ruby-2.3.1/gems/psych-2.2.4/lib/psych.rb:325:in parse' from /Users/Barzilay/.rvm/gems/ruby-2.3.1/gems/psych-2.2.4/lib/psych.rb:252:in
load'
from /Users/Barzilay/.rvm/gems/ruby-2.3.1/gems/psych-2.2.4/lib/psych.rb:473:in block in load_file' from /Users/Barzilay/.rvm/gems/ruby-2.3.1/gems/psych-2.2.4/lib/psych.rb:472:in
open'
from /Users/Barzilay/.rvm/gems/ruby-2.3.1/gems/psych-2.2.4/lib/psych.rb:472:in load_file' from (irb):6 from /Users/Barzilay/.rvm/rubies/ruby-2.3.1/bin/irb:11:in
@sjieg, "Possible improvement" looks like a nice to have. When the config parsing and feedback is correct I expect though that its much clearer how to configure and call variables so lets stick with only the fix for this ticket.
Pull request #84 fixes this issue
Actual
Unable to find a configuration file, defaulting to empty config.yml.
Expected