Skip to content

Commit

Permalink
added COVERALLS_ENDPOINT
Browse files Browse the repository at this point in the history
  • Loading branch information
nickmerwin committed Aug 15, 2014
1 parent 6678dba commit fe305be
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions lib/coveralls/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/coveralls/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Coveralls
VERSION = "0.7.0"
VERSION = "0.7.1"
end
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ def silence_stream(stream)
ensure
stream.reopen(old_stream)
end
end
end

0 comments on commit fe305be

Please sign in to comment.