Skip to content

Commit

Permalink
Rubocop nitpicking
Browse files Browse the repository at this point in the history
Co-authored-by: Robert-Anthony Lee-Faison <leefaisonr@users.noreply.github.com>
  • Loading branch information
hectorcorrea and leefaisonr committed Jun 3, 2024
1 parent c6e4caf commit 350cba6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/services/s3_query_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def client_s3_empty_files(reload: false, bucket_name: self.bucket_name, prefix:
end
@client_s3_empty_files ||= begin
files_and_directories = get_s3_objects(bucket_name:, prefix:)
files_and_directories.select { |object| object.empty? }
files_and_directories.select(&:empty?)
end
end

Expand Down
6 changes: 3 additions & 3 deletions spec/services/s3_query_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@
"snapshot_id" => snapshot.id, "upload_status" => "complete", "user_id" => user.id },
{ "checksum" => "abc123etagetag", "filename" => "10.34770/pe9w-x904/#{work.id}/SCoData_combined_v1_2020-07_datapackage.json",
"snapshot_id" => snapshot.id, "upload_status" => "complete", "user_id" => user.id },
{"checksum" => "abc123etagetag", "filename" => "10.34770/pe9w-x904/#{work.id}/a_directory/",
"snapshot_id" => snapshot.id, "upload_status"=>"complete", "user_id" => user.id }
{ "checksum" => "abc123etagetag", "filename" => "10.34770/pe9w-x904/#{work.id}/a_directory/",
"snapshot_id" => snapshot.id, "upload_status" => "complete", "user_id" => user.id }
])
end
context "the copy fails for some reason" do
Expand Down Expand Up @@ -775,7 +775,7 @@

describe "#client_s3_empty_files" do
let(:fake_aws_client) { double(Aws::S3::Client) }
let(:s3_size2) { 0 } # forces file SCoData_combined_v1_2020-07_datapackage.json to be zero length
let(:s3_size2) { 0 } # forces file SCoData_combined_v1_2020-07_datapackage.json to be zero length

before do
s3_query_service.stub(:client).and_return(fake_aws_client)
Expand Down

0 comments on commit 350cba6

Please sign in to comment.