lib/scrutinizer/ocular/api_client.rb in scrutinizer-ocular-1.0.0 vs lib/scrutinizer/ocular/api_client.rb in scrutinizer-ocular-1.0.1

- old
+ new

@@ -24,10 +24,14 @@ disable_net_blockers! end def upload(format, data) - uri = URI.parse(@api_url + '/repositories/' + @repository_name + '/data/code-coverage') + uri_str = @api_url + '/repositories/' + @repository_name + '/data/code-coverage' + unless @access_token.nil? + uri_str += '?access_token=' + @access_token + end + uri = URI.parse(uri_str) request = Net::HTTP::Post.new(uri.request_uri) request.add_field('Content-Type', 'application/json') request.body = { :revision => @revision,