Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spool submission report fix #1881

Merged
merged 2 commits into from
Apr 24, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
use integer for presigned_url
  • Loading branch information
lihanli committed Apr 24, 2018
commit b5bbe68dfb743e8d387704db93643db318b822c4
2 changes: 1 addition & 1 deletion lib/reports/uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def get_s3_link(report_file)
s3_resource = new_s3_resource
obj = s3_resource.bucket(s3_bucket).object("#{SecureRandom.uuid}.csv")
obj.upload_file(report_file, content_type: 'text/csv')
obj.presigned_url(:get, expires_in: 1.week)
obj.presigned_url(:get, expires_in: 1.week.to_i)
end
end
end
2 changes: 1 addition & 1 deletion spec/support/aws_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def stub_reports_s3(filename)
expect(s3).to receive(:bucket).once.with('bucket').and_return(bucket)
expect(bucket).to receive(:object).once.with("#{uuid}.csv").and_return(obj)
expect(obj).to receive(:upload_file).once.with(filename, content_type: 'text/csv')
expect(obj).to receive(:presigned_url).once.with(:get, expires_in: 1.week).and_return(url)
expect(obj).to receive(:presigned_url).once.with(:get, expires_in: 1.week.to_i).and_return(url)

yield

Expand Down