Sha256: 2f83ffb4c5ba24c00f0eb673b09db6ff48d1f792cbd39995909c0fb3bc87a2b8

Contents?: true

Size: 645 Bytes

Versions: 18

Compression:

Stored size: 645 Bytes

Contents

require 'pact/mock_service/request_handlers/base_administration_request_handler'

module Pact
  module MockService
    module RequestHandlers

      class SessionDelete < BaseAdministrationRequestHandler

        attr_accessor :session

        def initialize name, logger, session
          super name, logger
          @session = session
        end

        def request_path
          '/session'
        end

        def request_method
          'DELETE'
        end

        def respond env
          session.clear_all
          logger.info "Cleared session"
          [200, {}, ['Cleared session']]
        end

      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
pact-mock_service-2.2.0 lib/pact/mock_service/request_handlers/session_delete.rb
pact-mock_service-2.1.1.pre.alpha.2 lib/pact/mock_service/request_handlers/session_delete.rb
pact-mock_service-2.1.0 lib/pact/mock_service/request_handlers/session_delete.rb
pact-mock_service-2.0.1 lib/pact/mock_service/request_handlers/session_delete.rb
pact-mock_service-2.0.0 lib/pact/mock_service/request_handlers/session_delete.rb
pact-mock_service-1.2.0 lib/pact/mock_service/request_handlers/session_delete.rb
pact-mock_service-1.1.0 lib/pact/mock_service/request_handlers/session_delete.rb
pact-mock_service-1.0.0 lib/pact/mock_service/request_handlers/session_delete.rb
pact-mock_service-0.12.1 lib/pact/mock_service/request_handlers/session_delete.rb
pact-mock_service-0.12.0 lib/pact/mock_service/request_handlers/session_delete.rb
pact-mock_service-0.11.0 lib/pact/mock_service/request_handlers/session_delete.rb
pact-mock_service-0.10.2 lib/pact/mock_service/request_handlers/session_delete.rb
pact-mock_service-0.10.1 lib/pact/mock_service/request_handlers/session_delete.rb
pact-mock_service-0.10.0 lib/pact/mock_service/request_handlers/session_delete.rb
pact-mock_service-0.9.0 lib/pact/mock_service/request_handlers/session_delete.rb
pact-mock_service-0.8.2 lib/pact/mock_service/request_handlers/session_delete.rb
pact-mock_service-0.8.1 lib/pact/mock_service/request_handlers/session_delete.rb
pact-mock_service-0.8.0 lib/pact/mock_service/request_handlers/session_delete.rb