lib/godofwar/builder.rb
# check if the war file exists, rename it if true.
check if the war file exists, rename it if true.
check if the war file exists rename it if true .
def fix_war_exists(war_file)
      if File.exist? war_file
        rename = "#{File.basename(war_file, '.war')}_#{Time.now.to_i}.war"
        puts '[-] '.bold + "File #{war_file} Exists, rename '#{war_file}' to '#{rename}'"
        FileUtils.mv(war_file, rename)
      end
    end
def fix_war_exists ( war_file ) if File . exist? war_file rename = "#{File.basename(war_file, '.war')}_#{Time.now.to_i}.war" puts '[-] ' . bold + "File #{war_file} Exists, rename '#{war_file}' to '#{rename}'" FileUtils . mv ( war_file , rename ) end end
check if the war file exists, rename it if true.
check if the war file exists rename it if true .
war_file