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 3d4325f commit 9c296c0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 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.download_file_from_s3
tmp_location = file.fetch_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
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 download_file_from_s3
def fetch_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.download_file_from_s3).to eq("#{Rails.root}/tmp/transcription_files/vtt/transcript.vtt")
expect(uploaded_file.fetch_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 9c296c0

Please sign in to comment.