Sha256: 799171231cc609480c36653207a3e0a93453e0899701731a85ac015c23fbd98e

Contents?: true

Size: 309 Bytes

Versions: 25

Compression:

Stored size: 309 Bytes

Contents

module Mihari
  module Middleware
    class ConnectionAdapter
      def initialize(app)
        @app = app
      end

      def call(env)
        Mihari::Database.with_db_connection do
          status, headers, body = @app.call(env)

          [status, headers, body]
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
mihari-5.2.1 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.2.0 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.1.4 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.1.3 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.1.2 lib/mihari/web/middleware/connection_adapter.rb