diff --git a/lib/coveralls/api.rb b/lib/coveralls/api.rb index e5906510..27deefa5 100644 --- a/lib/coveralls/api.rb +++ b/lib/coveralls/api.rb @@ -4,9 +4,15 @@ class API require 'multi_json' require 'rest_client' - API_HOST = ENV['COVERALLS_DEVELOPMENT'] ? "localhost:3000" : "coveralls.io" - API_PROTOCOL = ENV['COVERALLS_DEVELOPMENT'] ? "http" : "https" - API_DOMAIN = "#{API_PROTOCOL}://#{API_HOST}" + if ENV['COVERALLS_ENDPOINT'] + API_HOST = ENV['COVERALLS_ENDPOINT'] + API_DOMAIN = ENV['COVERALLS_ENDPOINT'] + else + API_HOST = ENV['COVERALLS_DEVELOPMENT'] ? "localhost:3000" : "coveralls.io" + API_PROTOCOL = ENV['COVERALLS_DEVELOPMENT'] ? "http" : "https" + API_DOMAIN = "#{API_PROTOCOL}://#{API_HOST}" + end + API_BASE = "#{API_DOMAIN}/api/v1" def self.post_json(endpoint, hash) diff --git a/lib/coveralls/version.rb b/lib/coveralls/version.rb index d70c6281..bc020861 100644 --- a/lib/coveralls/version.rb +++ b/lib/coveralls/version.rb @@ -1,3 +1,3 @@ module Coveralls - VERSION = "0.7.0" + VERSION = "0.7.1" end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 86ce8011..33528b5c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -73,4 +73,4 @@ def silence_stream(stream) ensure stream.reopen(old_stream) end -end \ No newline at end of file +end