hets.rb revision 0772cf7b22adf46dbab68e829d6a2cd8e8d1bc2a
dfa2201c6ac8ddb2d2798dee15662cfe774e644eMartti Rannanjärvi yaml = YAML.load_file(File.join(Rails.root, 'config', 'hets.yml'))
8846e6eed6177a39b662f4f1ebf9b84ad1f0b7ecTimo Sirainen @allowed_extensions = yaml.delete 'allowed_extensions'
c13ec2148cc43cb36f61e781f2514705f563cf47Timo Sirainen raise ArgumentError.new('Wrong hets path.') unless @path
a9ba65037107e370c126d2b7e8c6e3f2a4aafd23Timo Sirainen ENV[key.upcase] = first_which_exists value if key != 'hets_path'
548f87789cf9865572b7b86f7be5a9bbfa132f3fTimo Sirainen # Runs hets with input_file and returns XML output file path.
6f2e601fa36133320aa88258106be46a175a0e53Timo Sirainen status = `#{config.path} -o sym.xml -v2 #{input_file} 2>&1`
6f2e601fa36133320aa88258106be46a175a0e53Timo Sirainen if $?.exitstatus != 0 or status.starts_with? '*** Error'