fix endpoint logic

This commit is contained in:
Konstantin Haase 2012-09-22 16:50:40 +02:00
parent d1255d9230
commit dca8fbf8b0

View File

@ -4,7 +4,7 @@ require 'travis/api/app'
env, api_endpoint, client_endpoint, run_api, watch = ENV.values_at('RACK_ENV', 'API_ENDPOINT', 'CLIENT_ENDPOINT', 'RUN_API', 'WATCH', 'DEFLATE')
env ||= "development"
endpoint ||= "https://api.#{Travis.config.host}" if env == "production"
api_endpoint ||= "https://api.#{Travis.config.host}" if env == "production"
run_api ||= ["development", "test"].include? env
api_endpoint ||= "/api" if run_api and run_api != '0'
client_endpoint ||= "/"