Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Attempt at patching trinidad to take APP_PATH into account when loading config
# command_line_parser_spec.rb
it "respects web_app_dir if applicable when loading config" do
args = "--dir #{MOCK_WEB_APP_DIR} --config".split
options = subject.parse(args)
options[:config].should == "#{MOCK_WEB_APP_DIR}/config/trinidad.yml"
end
# command_line_parser.rb (line 32)
if default_options.has_key?(:config)
config_file = default_options[:web_app_dir] ? "#{default_options[:web_app_dir]}/#{default_options[:config]}" : default_options[:config]
config_options = YAML.load_file(config_file)
default_options.deep_merge!(config_options.symbolize!)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.