Merge branch 'ps-ember-update' of github.com:travis-ci/travis-web into ps-ember-update
This commit is contained in:
commit
7220dcf83b
|
@ -156,14 +156,14 @@ class Travis::Web::App
|
||||||
Rack::Mime.mime_type File.extname(file)
|
Rack::Mime.mime_type File.extname(file)
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_config(string, options = {})
|
def set_config(string, opts = {})
|
||||||
string.gsub! %r(<meta (rel|name)="travis\.([^"]*)" (href|value)="([^"]*)"[^>]*>) do
|
string.gsub! %r(<meta (rel|name)="travis\.([^"]*)" (href|value)="([^"]*)"[^>]*>) do
|
||||||
%(<meta #{$1}="travis.#{$2}" #{$3}="#{options[$2.to_sym] || $4}">)
|
%(<meta #{$1}="travis.#{$2}" #{$3}="#{options[$2.to_sym] || $4}">)
|
||||||
end
|
end
|
||||||
|
|
||||||
string.gsub! %r{(src|href)="(?:\/?)((styles|scripts)\/[^"]*)"} do
|
string.gsub! %r{(src|href)="(?:\/?)((styles|scripts)\/[^"]*)"} do
|
||||||
if options[:custom_branch]
|
if opts[:custom_branch]
|
||||||
url = "https://s3.amazonaws.com/travis-web-production/assets/#{options[:custom_branch]}/#{$2}"
|
url = "https://s3.amazonaws.com/travis-web-production/assets/#{opts[:custom_branch]}/#{$2}"
|
||||||
%(#$1="#{url}")
|
%(#$1="#{url}")
|
||||||
else
|
else
|
||||||
%(#$1="/#{version}/#$2")
|
%(#$1="/#{version}/#$2")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user