tmplog) Breacan.access_token = '#{SLACK_ACCESS_TOKEN}' arg = { channels: ENV['RAKE_NOTIFY_TO'] || '#minne_dev', file: Faraday::UploadIO.new(tmplog.path, 'text/plain'), filename: "#{File.basename(task.name)}_#{Time.now.strftime('%Y%m%d%H%M%S')}.log" } Breacan.files_upload(arg) end