Module: Defaults
- Defined in:
- lib/defaults.rb
Overview
Defines all CONSTANTS for Gamekey.
Constant Summary collapse
- PORT =
Default port number
8080- STORAGE =
Default storage file
"gamekey.json"- DB =
Initial storage content
{ service: "Gamekey", storage: SecureRandom.uuid, version: "0.0.2", users: [], games: [], gamestates: [] }
- CRYPTOHASH =
Used crpyto hash function
Digest::SHA256.new
- TESTHOST =
Default test host of gamekey service
"http://localhost:#{PORT}"- VALID_EMAIL_REGEX =
Regular Expression to validate Email adresses
/\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i- VALID_URL_REGEX =
Regular Expression to validate http and https uris adresses
/\A#{URI::regexp(['http', 'https'])}\z/- TESTHASH =
A Test hash for testing gamestate handling
{ 'this' => 'is', 'a' => ['simple', 'test'] }
- TESTLIST =
A Test list for testing gamestate handling
['This', 'is', 'a', 'Test']