Sha256: 76ed4c86b3f55e8c606b11648fe5669d7716a0e4594d752c7e6f5dee7227483d
Contents?: true
Size: 587 Bytes
Versions: 12
Compression:
Stored size: 587 Bytes
Contents
module ShopifyApp class InMemorySessionStore class EnvironmentError < StandardError; end def self.retrieve(id) repo[id] end def self.store(session, *args) id = SecureRandom.uuid repo[id] = session id end def self.clear @@repo = nil end def self.repo if Rails.env.production? raise EnvironmentError.new("Cannot use InMemorySessionStore in a Production environment. \ Please initialize ShopifyApp with a model that can store and retrieve sessions") end @@repo ||= {} end end end
Version data entries
12 entries across 12 versions & 1 rubygems