Sha256: 971d7dba1a0a79df27852ae258cb3013ef688376a8be22cff5e351a4195915fa

Contents?: true

Size: 314 Bytes

Versions: 6

Compression:

Stored size: 314 Bytes

Contents

require 'nyauth/nyan'

module Nyauth
  class Middleware
    def initialize(app)
      @app = app
    end

    def call(env)
      return @app.call(env) if env['nyauth']

      env['nyauth'] = Nyauth::Nyan.new(env)
      Nyauth::Nyan.run_callback env['nyauth'] do
        @app.call(env)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
nyauth-0.7.2 lib/nyauth/middleware.rb
nyauth-0.7.1 lib/nyauth/middleware.rb
nyauth-0.7.0 lib/nyauth/middleware.rb
nyauth-0.6.2 lib/nyauth/middleware.rb
nyauth-0.6.1 lib/nyauth/middleware.rb
nyauth-0.6.0 lib/nyauth/middleware.rb