lib/google/cloud/bigquery/service.rb in google-cloud-bigquery-1.45.0 vs lib/google/cloud/bigquery/service.rb in google-cloud-bigquery-1.46.0

- old
+ new

@@ -39,19 +39,30 @@ attr_accessor :credentials # @private attr_reader :retries, :timeout, :host + # @private + def universe_domain + service.universe_domain + end + ## # Creates a new Service instance. - def initialize project, credentials, retries: nil, timeout: nil, host: nil, quota_project: nil + def initialize project, credentials, + retries: nil, + timeout: nil, + host: nil, + quota_project: nil, + universe_domain: nil @project = project @credentials = credentials @retries = retries @timeout = timeout @host = host @quota_project = quota_project + @universe_domain = universe_domain end def service return mocked_service if mocked_service @service ||= begin @@ -67,9 +78,10 @@ "gl-ruby/#{RUBY_VERSION} gccl/#{Google::Cloud::Bigquery::VERSION}" service.request_options.query ||= {} service.request_options.query["prettyPrint"] = false service.request_options.quota_project = @quota_project if @quota_project service.authorization = @credentials.client + service.universe_domain = @universe_domain service.root_url = host if host service end end attr_accessor :mocked_service