mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-06-05 21:15:20 +00:00
- cmock now accepts any combo of yaml and command line options, applying them in the order they appear on the command line (thanks kylebhamilton for the suggestion!)
This commit is contained in:
+1
-1
@@ -77,7 +77,7 @@ if ($0 == __FILE__)
|
||||
filelist = []
|
||||
ARGV.each do |arg|
|
||||
if (arg =~ /^-o\"?([a-zA-Z0-9._\\\/:\s]+)\"?/)
|
||||
options = arg.gsub(/^-o/,'')
|
||||
options.merge CMockConfig.load_config_file_from_yaml( arg.gsub(/^-o/,'') )
|
||||
elsif (arg =~ /^--([a-zA-Z0-9._\\\/:\s]+)=\"?([a-zA-Z0-9._\\\/:\s\;]+)\"?/)
|
||||
options = option_maker(options, $1, $2)
|
||||
else
|
||||
|
||||
@@ -67,6 +67,10 @@ class CMockConfig
|
||||
end
|
||||
|
||||
def load_config_file_from_yaml yaml_filename
|
||||
self.class.load_config_file_from_yaml yaml_filename
|
||||
end
|
||||
|
||||
def self.load_config_file_from_yaml yaml_filename
|
||||
require 'yaml'
|
||||
require 'fileutils'
|
||||
YAML.load_file(yaml_filename)[:cmock]
|
||||
|
||||
Reference in New Issue
Block a user