mirror of
https://github.com/cliffe/BreakEscape.git
synced 2026-02-22 19:58:05 +00:00
- Create DemoUser migration for standalone development - Add DemoUser model with polymorphic games association - Add configuration system (standalone vs mounted) - Use ENV variables for configuration - current_player method supports both modes (ApplicationController) - Can run without Hacktivity for development
30 lines
568 B
Ruby
30 lines
568 B
Ruby
require "break_escape/version"
|
|
require "break_escape/engine"
|
|
|
|
module BreakEscape
|
|
class << self
|
|
attr_accessor :configuration
|
|
end
|
|
|
|
def self.configure
|
|
self.configuration ||= Configuration.new
|
|
yield(configuration) if block_given?
|
|
end
|
|
|
|
def self.standalone_mode?
|
|
configuration&.standalone_mode || false
|
|
end
|
|
|
|
class Configuration
|
|
attr_accessor :standalone_mode, :demo_user_handle
|
|
|
|
def initialize
|
|
@standalone_mode = false
|
|
@demo_user_handle = 'demo_player'
|
|
end
|
|
end
|
|
end
|
|
|
|
# Initialize with defaults
|
|
BreakEscape.configure {}
|