OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
use Tempfile.open with block instead of Tempfile.new with explicit unlink
Ivan Kuchin2e75df8af1e2
diff --git a/lib/tasks/backup.rake b/lib/tasks/backup.rakeindex 12afbf367d1..b9d30572905 100644--- a/lib/tasks/backup.rake+++ b/lib/tasks/backup.rake@@ -95,11 +95,11 @@ namespace :backup doenddef with_config_file(config, &blk)- file = Tempfile.new('op_pg_config')- file.write "*:*:*:*:#{config[:password]}"- file.close- blk.yield file.path- file.unlink+ Tempfile.open('op_pg_config') do |file|+ file.write "*:*:*:*:#{config[:password]}"+ file.close+ blk.yield file.path+ endenddef sql_dump_tempfile(config)