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.6.2 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.6.1 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.6.0 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.5.0 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.4.9 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.4.8 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.4.7 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.4.6 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.4.5 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.4.4 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.4.3 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.4.2 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.4.1 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.4.0 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.3.2 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.3.1 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.3.0 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.2.4 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.2.3 lib/mihari/web/middleware/connection_adapter.rb
mihari-5.2.2 lib/mihari/web/middleware/connection_adapter.rb