Redirect to full amazon url

Amazon can't work properly with SSL and CNAME for subdomains. For now we
can use full amazon url.
This commit is contained in:
Piotr Sarnacki 2013-01-28 03:43:24 +01:00
parent 31371686c9
commit a565522f41
2 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ class Travis::Api::App
end
def archive_url(path)
"https://#{hostname('archive')}#{path}"
"https://s3.amazonaws.com/#{hostname('archive')}#{path}"
end
def hostname(name)

View File

@ -29,7 +29,7 @@ describe 'Jobs' do
it 'redirects to archive' do
job.log.update_attributes!(content: 'the log', archived_at: Time.now, archive_verified: true)
response = get "/jobs/#{job.id}/log.txt", {}, headers
response.should redirect_to("https://archive.travis-ci.org/jobs/#{job.id}/log.txt")
response.should redirect_to("https://s3.amazonaws.com/archive.travis-ci.org/jobs/#{job.id}/log.txt")
end
end
@ -37,7 +37,7 @@ describe 'Jobs' do
it 'redirects to archive' do
job.log.destroy
response = get "/jobs/#{job.id}/log.txt", {}, headers
response.should redirect_to("https://archive.travis-ci.org/jobs/#{job.id}/log.txt")
response.should redirect_to("https://s3.amazonaws.com/archive.travis-ci.org/jobs/#{job.id}/log.txt")
end
end
end