lib/configuration.rb in materialist-3.8.2 vs lib/configuration.rb in materialist-3.8.3
- old
+ new
@@ -1,7 +1,5 @@
-require 'routemaster/api_client'
-
module Materialist
class << self
def configuration
@configuration ||= Configuration.new
end
@@ -19,12 +17,15 @@
attr_accessor :topics, :sidekiq_options, :api_client, :metrics_client, :notice_error
def initialize
@topics = []
@sidekiq_options = {}
- @api_client = Routemaster::APIClient.new(response_class: ::Routemaster::Responses::HateoasResponse)
@metrics_client = NullMetricsClient
@notice_error = nil
+ end
+
+ def api_client
+ @api_client || (raise StandardError.new('missing HTTP client'))
end
class NullMetricsClient
def self.increment(_, tags:); end
def self.histogram(_, _v, tags:); end