24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/canuby/config.rb', line 24
def self.load
args = ArgParser.min(ARGV)
if ENV['Testing'] != 'true' && File.exist?(args.yml_file)
$options = OpenStruct.new(args.to_h.merge!(YAML.load_file(args.yml_file)))
else
default = { 'projects' => {
'Googletest' => { 'url' => 'https://github.com/google/googletest', 'version' => '1.0.0', 'project_file' => 'googletest-distribution',
'output_dir' => 'googlemock/gtest', 'outputs' => ['gtest.lib', 'gtest_main.lib'] }, \
'Dummy' => { 'url' => 'https://github.com/google/googletest', 'version' => '1.0.0', 'project_file' => 'googletest-distribution',
'output_dir' => 'googlemock/gtest', 'outputs' => ['gtest.lib'] }, \
'Dummy2' => { 'url' => 'https://github.com/google/googletest', 'version' => '1.0.0', 'project_file' => 'googletest-distribution',
'output_dir' => 'googlemock/gtest', 'outputs' => ['gtest_main.lib'] }
} }
$options = OpenStruct.new(args.to_h.merge!(default))
end
end
|