Apply automatic rubocop fixes

This commit is contained in:
Sebastian Serth
2021-05-14 10:51:44 +02:00
parent fe4000916c
commit 6cbecb5b39
440 changed files with 2705 additions and 1853 deletions

View File

@@ -1 +1,3 @@
# frozen_string_literal: true
json.extract! @file, :id, :name_with_extension

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
json.array!(@comments) do |comment|
json.extract! comment, :id, :user_id, :file_id, :row, :column, :text, :username, :date, :updated, :editable
json.url comment_url(comment, format: :json)

View File

@@ -1 +1,3 @@
# frozen_string_literal: true
json.extract! @comment, :id, :user_id, :file_id, :row, :column, :text, :created_at, :updated_at

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
json.set! :files do
json.array! @exercise.files.visible, :content, :id
end

View File

@@ -1 +1,3 @@
# frozen_string_literal: true
json.extract! @file_type, :id, :name, :editor_mode, :file_extension, :executable, :renderable, :binary

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
json.set! :files do
json.array! @exercise.files.visible, :content, :id
end

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
json.array!(@request_for_comments) do |request_for_comment|
json.extract! request_for_comment, :id, :user_id, :exercise_id, :file_id, :user_type
json.url request_for_comment_url(request_for_comment, format: :json)

View File

@@ -1 +1,3 @@
# frozen_string_literal: true
json.extract! @request_for_comment, :id, :user_id, :exercise_id, :file_id, :created_at, :updated_at, :user_type, :solved

View File

@@ -1,7 +1,10 @@
# frozen_string_literal: true
json.extract! @submission, :id, :files
json.download_url download_submission_path(@submission, format: :json)
json.score_url score_submission_path(@submission, format: :json)
json.download_file_url download_file_submission_path(@submission, 'a.', format: :json).gsub(/a\.\.json$/, '{filename}.json')
json.download_file_url download_file_submission_path(@submission, 'a.', format: :json).gsub(/a\.\.json$/,
'{filename}.json')
json.render_url render_submission_path(@submission, 'a.', format: :json).gsub(/a\.\.json$/, '{filename}.json')
json.run_url run_submission_path(@submission, 'a.', format: :json).gsub(/a\.\.json$/, '{filename}.json')
json.test_url test_submission_path(@submission, 'a.', format: :json).gsub(/a\.\.json$/, '{filename}.json')