Sha256: 0aa49838f0549bc5e4a450574977c5f866f9e6fc653862852f0f99b563719cfe

Contents?: true

Size: 506 Bytes

Versions: 53

Compression:

Stored size: 506 Bytes

Contents

# WARNING - This really only works for development, see README for more details
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")
    end
    @@repo ||= {}
  end
end

Version data entries

53 entries across 53 versions & 3 rubygems

Version Path
shopify_app-7.4.0 lib/shopify_app/in_memory_session_store.rb
shopify_app-7.3.0 lib/shopify_app/in_memory_session_store.rb
shopify_app-7.2.11 lib/shopify_app/in_memory_session_store.rb
shopify_app-7.2.10 lib/shopify_app/in_memory_session_store.rb
shopify_app-7.2.9 lib/shopify_app/in_memory_session_store.rb
shopify_app-7.2.8 lib/shopify_app/in_memory_session_store.rb
shopify_app-7.2.7 lib/shopify_app/in_memory_session_store.rb
shopify_app-7.2.6 lib/shopify_app/in_memory_session_store.rb
shopify_app-7.2.5 lib/shopify_app/in_memory_session_store.rb
shopify_app-7.2.3 lib/shopify_app/in_memory_session_store.rb
intercom-app-0.2.6 lib/intercom-app/in_memory_session_store.rb
intercom-app-0.2.5 lib/intercom-app/in_memory_session_store.rb
intercom-app-0.2.4 lib/intercom-app/in_memory_session_store.rb
intercom-app-0.2.3 lib/intercom-app/in_memory_session_store.rb
intercom-app-0.2.2 lib/intercom-app/in_memory_session_store.rb
shopify_app-7.2.0 lib/shopify_app/in_memory_session_store.rb
intercom-app-0.2.1 lib/intercom-app/in_memory_session_store.rb
intercom-app-0.2.0 lib/intercom-app/in_memory_session_store.rb
shopify_app-7.1.1 lib/shopify_app/in_memory_session_store.rb
shopify_app-7.1.0 lib/shopify_app/in_memory_session_store.rb