default to running against api.travis-ci.org

This commit is contained in:
Konstantin Haase 2012-09-23 10:53:00 +02:00
parent 275f4f0caa
commit 5b092e9ec4

View File

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