From 0ab3d0bdc1f2f9bc93e2c83431acf0c8877ca9ba Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Thu, 30 Jun 2022 12:58:23 +0200 Subject: [PATCH] Fix Rubocop offenses --- app/controllers/submissions_controller.rb | 2 +- app/models/runner.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/submissions_controller.rb b/app/controllers/submissions_controller.rb index c9899149..707275c2 100644 --- a/app/controllers/submissions_controller.rb +++ b/app/controllers/submissions_controller.rb @@ -40,7 +40,7 @@ class SubmissionsController < ApplicationController # zip .co file zio.put_next_entry('.co') zio.write(File.read(id_file)) - File.delete(id_file) if File.exist?(id_file) + FileUtils.rm_rf(id_file) # zip client scripts scripts_path = 'app/assets/remote_scripts' diff --git a/app/models/runner.rb b/app/models/runner.rb index 20909927..767cd8a9 100644 --- a/app/models/runner.rb +++ b/app/models/runner.rb @@ -154,13 +154,13 @@ class Runner < ApplicationRecord rescue Runner::Error # An additional error was raised during synchronization raise Runner::Error::EnvironmentNotFound.new( - "The execution environment with id #{execution_environment.id} was not found by the runner management. "\ + "The execution environment with id #{execution_environment.id} was not found by the runner management. " \ 'In addition, it could not be synced so that this probably indicates a permanent error.' ) else # No error was raised during synchronization raise Runner::Error::EnvironmentNotFound.new( - "The execution environment with id #{execution_environment.id} was not found yet by the runner management. "\ + "The execution environment with id #{execution_environment.id} was not found yet by the runner management. " \ 'It has been successfully synced now so that the next request should be successful.' ) end