Skip to content

Commit

Permalink
APPEALS-42711 changed names of classes and methods to fix code climat…
Browse files Browse the repository at this point in the history
…e issue
  • Loading branch information
minhazur9 committed Mar 29, 2024
1 parent 7d86c07 commit 3d4325f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/controllers/hearings/transcription_files_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Hearings::TranscriptionFilesController < ApplicationController

# Downloads file and sends to user's local computer
def download_transcription_file
tmp_location = file.fetch_from_s3
tmp_location = file.download_file_from_s3
File.open(tmp_location, "r") { |stream| send_data stream.read, filename: file.file_name }
file.clean_up_tmp_location
end
Expand Down
4 changes: 2 additions & 2 deletions app/jobs/hearings/fetch_webex_recordings_list_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def perform
response = fetch_recordings_list
topics = response.topics
topic_num = 0
response.ids.each do |n|
Hearings::FetchWebexRecordingsDetailsJob.perform_later(id: n, topic: topics[topic_num])
response.ids.each do |id|
Hearings::FetchWebexRecordingsDetailsJob.perform_later(id: id, topic: topics[topic_num])
topic_num += 1
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/hearings/transcription_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class TranscriptionFile < CaseflowRecord

# Purpose: Fetches file from S3
# Return: The temporary save location of the file
def fetch_from_s3
def download_file_from_s3
S3Service.fetch_file(aws_link, tmp_location)
tmp_location
end
Expand Down
2 changes: 1 addition & 1 deletion spec/models/hearings/transcription_file_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

describe "model functions" do
it "downloading a file" do
expect(uploaded_file.fetch_from_s3).to eq("#{Rails.root}/tmp/transcription_files/vtt/transcript.vtt")
expect(uploaded_file.download_file_from_s3).to eq("#{Rails.root}/tmp/transcription_files/vtt/transcript.vtt")
end

it "uploading a file" do
Expand Down

0 comments on commit 3d4325f

Please sign in to comment.