14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/jfrog/saas/log/unzipper.rb', line 14
def (solution, source_file, target_path, target_file_name, gzip_content)
file_mgr = FileManager.new
sol_tgt_path = file_mgr.check_and_create_dir(solution, target_path)
unless gzip_content.nil?
File.open("#{sol_tgt_path}/#{target_file_name}", 'a') do |fp|
fp.write(Zlib::GzipReader.new(StringIO.new(gzip_content)).read)
end
MessageUtils.instance.log_message(MessageUtils::EXTRACT_LOG_FILE_SUCCESS, { "param1": source_file.to_s,
"param2": "#{sol_tgt_path}/#{target_file_name}",
"#{MessageUtils::LOG_LEVEL}": CommonUtils::LOG_INFO,
"#{MessageUtils::SOLUTION}": solution })
end
end
|