lib/bolt_server/file_cache.rb in bolt-1.30.0 vs lib/bolt_server/file_cache.rb in bolt-1.30.1

- old
+ new

@@ -81,11 +81,11 @@ req = Net::HTTP::Get.new(uri) begin client.request(req) do |resp| if resp.code != "200" - msg = "Failed to download task: #{resp.body}" + msg = "Failed to download file: #{resp.body}" @logger.warn resp.body raise Error, msg end resp.read_body do |chunk| file.write(chunk) @@ -94,11 +94,11 @@ rescue StandardError => e if e.is_a?(Bolt::Error) raise e else @logger.warn e - raise Error, "Failed to download task: #{e.message}" + raise Error, "Failed to download file: #{e.message}" end end ensure file.close end @@ -155,10 +155,10 @@ def update_file(file_data) sha = file_data['sha256'] file_dir = create_cache_dir(file_data['sha256']) file_path = File.join(file_dir, File.basename(file_data['filename'])) if check_file(file_path, sha) - @logger.debug("Using prexisting task file: #{file_path}") + @logger.debug("Using prexisting file: #{file_path}") return file_path end @logger.debug("Queueing download for: #{file_path}") serial_execute { download_file(file_path, sha, file_data['uri']) }