Skip to content

Commit 4474f71

Browse files
committed
refactor(style): fix regex literal and spacing to satisfy rubocop
- switch regex to %r{[^/]+} per Style/RegexpLiteral - remove extra spacing before `do` per Layout/ExtraSpacing
1 parent deea2ef commit 4474f71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/api/scorm_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def stream_file_from_zip(zip_path, file_path)
5454
end
5555

5656
# NOTE: allow '.' in username; without this Rails/Grape treats '.' as format.
57-
get '/scorm/:task_def_id/:username/:auth_token/*file_path', requirements: { username: /[^\/]+/ } do
57+
get '/scorm/:task_def_id/:username/:auth_token/*file_path', requirements: { username: %r{[^/]+} } do
5858
task_def = TaskDefinition.find(params[:task_def_id])
5959

6060
unless authorise? current_user, task_def.unit, :get_unit

0 commit comments

Comments
 (0)