Skip to content

Commit 22e5f33

Browse files
committed
Update langs version to 0.39.1
1 parent 62ad8ee commit 22e5f33

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

app/background_tasks/rust_langs_downloader_task.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'rust_langs_cli_executor'
44

55
class RustLangsDownloaderTask
6-
@@rust_langs_version = '0.17.2.18'
6+
@@rust_langs_version = '0.39.1'
77

88
def initialize
99
end

app/controllers/full_zip_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def index
88
authorize! :download, submission
99
exercise = submission.exercise
1010
base_name = "#{submission.user.login}-#{exercise.name}-#{submission.id}"
11-
data = SubmissionPackager.new.get_full_zip(submission, base_name)
11+
data = SubmissionPackager.new.get_full_zip(submission)
1212
send_data(data, filename: "#{base_name}_full.zip")
1313
end
1414
end

lib/rust_langs_cli_executor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
module RustLangsCliExecutor
88
def self.prepare_submission(clone_path, output_path, submission_path, extra_params = {}, config = {})
99
command = "#{self.langs_executable_path}/current prepare-submission --clone-path '#{clone_path}' --output-path '#{output_path}' --submission-path '#{submission_path}'"
10-
command = command + " --top-level-dir-name '#{config[:toplevel_dir_name]}'" if !!config[:toplevel_dir_name]
10+
command = command + " --no-archive-prefix" if config[:no_archive_prefix]
1111
command = command + " --stub-zip-path '#{config[:tests_from_stub]}'" if !!config[:tests_from_stub]
1212
command = command + " --output-format '#{config[:format]}'" if !!config[:format]
1313
extra_params.each do |k, v|

lib/submission_packager.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ class SubmissionPackager
2222
# (as is usually the case).
2323
# - no_tmc_run: does not include the tmc-run file
2424
# - format: may be set to :zip to get a zip file. Defaults to :tar.
25-
# - toplevel_dir_name: if present, the zip or tar is made such that
26-
# there is a toplevel directory with this name
2725

28-
def get_full_zip(submission, toplevel_dir_name)
26+
def get_full_zip(submission)
2927
Dir.mktmpdir do |tmpdir|
3028
zip_path = "#{tmpdir}/submission.zip"
3129
return_zip_path = "#{tmpdir}/submission_to_be_returned.zip"
@@ -35,7 +33,7 @@ def get_full_zip(submission, toplevel_dir_name)
3533
RustLangsCliExecutor.prepare_submission(submission.exercise.clone_path, return_zip_path, zip_path, submission.params,
3634
tests_from_stub: submission.exercise.stub_zip_file_path,
3735
format: :zip,
38-
toplevel_dir_name: toplevel_dir_name)
36+
no_archive_prefix: true)
3937
end
4038
rescue Timeout::Error
4139
Rails.logger.error("RustLangsCliExecutor.prepare_submission timed out after #{SUBMISSION_PACKAGING_TIMEOUT_SECONDS} seconds for submission #{submission.id} in SubmissionPackager")

0 commit comments

Comments
 (0)