Fix code style to reduce errors in RubyMine
This commit is contained in:
@ -43,6 +43,7 @@ class DockerClient
|
|||||||
module_name: File.basename(filename, File.extname(filename)).underscore
|
module_name: File.basename(filename, File.extname(filename)).underscore
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
private :command_substitutions
|
private :command_substitutions
|
||||||
|
|
||||||
def self.config
|
def self.config
|
||||||
@ -136,6 +137,7 @@ class DockerClient
|
|||||||
rescue Docker::Error::NotFoundError => error
|
rescue Docker::Error::NotFoundError => error
|
||||||
Rails.logger.info('create_workspace_files: Rescued from Docker::Error::NotFoundError: ' + error.to_s)
|
Rails.logger.info('create_workspace_files: Rescued from Docker::Error::NotFoundError: ' + error.to_s)
|
||||||
end
|
end
|
||||||
|
|
||||||
private :create_workspace_files
|
private :create_workspace_files
|
||||||
|
|
||||||
def create_workspace_file(options = {})
|
def create_workspace_file(options = {})
|
||||||
@ -144,6 +146,7 @@ class DockerClient
|
|||||||
file.write(options[:file].content)
|
file.write(options[:file].content)
|
||||||
file.close
|
file.close
|
||||||
end
|
end
|
||||||
|
|
||||||
private :create_workspace_file
|
private :create_workspace_file
|
||||||
|
|
||||||
def create_workspace_files_transmit(container, submission)
|
def create_workspace_files_transmit(container, submission)
|
||||||
@ -386,6 +389,7 @@ class DockerClient
|
|||||||
def local_file_path(options = {})
|
def local_file_path(options = {})
|
||||||
File.join(self.class.local_workspace_path(options[:container]), options[:file].path || '', options[:file].name_with_extension)
|
File.join(self.class.local_workspace_path(options[:container]), options[:file].path || '', options[:file].name_with_extension)
|
||||||
end
|
end
|
||||||
|
|
||||||
private :local_file_path
|
private :local_file_path
|
||||||
|
|
||||||
def self.local_workspace_path(container)
|
def self.local_workspace_path(container)
|
||||||
@ -420,6 +424,7 @@ class DockerClient
|
|||||||
DockerContainerPool.return_container(container, execution_environment)
|
DockerContainerPool.return_container(container, execution_environment)
|
||||||
container.status = :returned
|
container.status = :returned
|
||||||
end
|
end
|
||||||
|
|
||||||
#private :return_container
|
#private :return_container
|
||||||
|
|
||||||
def send_command(command, container, &block)
|
def send_command(command, container, &block)
|
||||||
@ -445,7 +450,9 @@ class DockerClient
|
|||||||
kill_container(container)
|
kill_container(container)
|
||||||
{status: :timeout}
|
{status: :timeout}
|
||||||
end
|
end
|
||||||
|
|
||||||
private :send_command
|
private :send_command
|
||||||
|
|
||||||
class Error < RuntimeError; end
|
class Error < RuntimeError;
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user