File: phony_session.rb

package info (click to toggle)
ruby-omniauth 1.3.1-1%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 324 kB
  • sloc: ruby: 1,896; makefile: 3
file content (15 lines) | stat: -rw-r--r-- 268 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module OmniAuth
  module Test
    class PhonySession
      def initialize(app)
        @app = app
      end

      def call(env)
        @session ||= (env['rack.session'] || {})
        env['rack.session'] = @session
        @app.call(env)
      end
    end
  end
end