Sha256: 0b1128965c9b6c89445f80e68bda405dcd6265467f3b8d9d5f924ba1509167b7
Contents?: true
Size: 580 Bytes
Versions: 35
Compression:
Stored size: 580 Bytes
Contents
module ShopifyApp class InMemorySessionStore class EnvironmentError < StandardError; end def self.retrieve(id) repo[id] end def self.store(session) 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
35 entries across 35 versions & 1 rubygems