Permalink
Browse files

Revert "Adding in test middleware for #2445"

This reverts commit e416856.
  • Loading branch information...
Tim Olsen
Tim Olsen committed Nov 5, 2012
1 parent 0029bcc commit f76f805819789c0c048799022816d813721206cc
Showing with 0 additions and 44 deletions.
  1. +0 −44 lib/rack/mongoid/middleware/streaming/identity_map.rb
@@ -1,44 +0,0 @@
-# encoding: utf-8
-module Rack
- module Mongoid
- module Middleware
- module Streaming
-
- # This middleware contains the behaviour needed to properly use the
- # identity map in Rack based applications.
- class IdentityMap
-
- # Initialize the new middleware.
- #
- # @example Init the middleware.
- # IdentityMap.new(app)
- #
- # @param [ Object ] app The application.
- #
- # @since 2.1.0
- def initialize(app)
- @app = app
- end
-
- # Make the request with the provided environment.
- #
- # @example Make the request.
- # identity_map.call(env)
- #
- # @param [ Object ] env The environment.
- #
- # @return [ Array ] The status, headers, and response.
- #
- # @since 2.1.0
- def call(env)
- response = @app.call(env)
- response[2] = ::Rack::BodyProxy.new(response[2]) do
- ::Mongoid::IdentityMap.clear
- end
- response
- end
- end
- end
- end
- end
-end

0 comments on commit f76f805

Please sign in to comment.