From a565522f41348ebde62590d211d7028f1ce6b474 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Mon, 28 Jan 2013 03:43:24 +0100 Subject: [PATCH] Redirect to full amazon url Amazon can't work properly with SSL and CNAME for subdomains. For now we can use full amazon url. --- lib/travis/api/app/endpoint/jobs.rb | 2 +- spec/integration/v2/jobs_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/travis/api/app/endpoint/jobs.rb b/lib/travis/api/app/endpoint/jobs.rb index 288c6bb9..b5a6d410 100644 --- a/lib/travis/api/app/endpoint/jobs.rb +++ b/lib/travis/api/app/endpoint/jobs.rb @@ -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) diff --git a/spec/integration/v2/jobs_spec.rb b/spec/integration/v2/jobs_spec.rb index 847e56f5..fa617d15 100644 --- a/spec/integration/v2/jobs_spec.rb +++ b/spec/integration/v2/jobs_spec.rb @@ -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