lib/staccato/rack.rb in staccato-rack-0.4.2 vs lib/staccato/rack.rb in staccato-rack-0.4.3

- old
+ new

@@ -1,11 +1,11 @@ require 'logger' require 'rack/request' require 'staccato' require 'staccato/rack/version' -require 'staccato/rack/faraday_http_adapter' +require 'staccato/rack/faraday_async_http_adapter' require 'staccato/rack/page_view' module Staccato module Rack # middleware @@ -17,10 +17,10 @@ def initialize(app, tracking_id, options = {}) @app = app @tracking_id = tracking_id @logger = options[:logger] @default_tracker = Staccato.tracker(tracking_id) do |c| - c.adapter = FaradayHttpAdaper.new(@logger) unless tracking_id == nil + c.adapter = FaradayAsyncHttpAdaper.new(@logger) unless tracking_id.nil? end end def call(env) env['staccato.pageview'] = PageView.new.tap { |p| p.logger = @logger }