Module: Legion::Data::Settings
- Defined in:
- lib/legion/data/settings.rb
Class Method Summary collapse
- .cache ⇒ Object
- .connection ⇒ Object
- .creds ⇒ Object
- .default ⇒ Object
- .migrations ⇒ Object
- .models ⇒ Object
Class Method Details
.cache ⇒ Object
53 54 55 56 57 58 59 |
# File 'lib/legion/data/settings.rb', line 53 def self.cache { connected: false, auto_enable: Legion::Settings[:cache][:connected], ttl: 60 } end |
.connection ⇒ Object
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/legion/data/settings.rb', line 32 def self.connection { log: false, log_connection_info: false, log_warn_duration: 1, sql_log_level: 'debug', max_connections: 10, preconnect: false } end |
.creds ⇒ Object
43 44 45 46 47 48 49 50 51 |
# File 'lib/legion/data/settings.rb', line 43 def self.creds { username: 'legion', password: 'legion', database: 'legion', host: '127.0.0.1', port: 3306 } end |
.default ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/legion/data/settings.rb', line 4 def self.default { connected: false, cache: cache, connection: connection, creds: creds, migrations: migrations, models: models, connect_on_start: true } end |
.migrations ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/legion/data/settings.rb', line 23 def self.migrations { continue_on_fail: false, auto_migrate: true, ran: false, version: nil } end |
.models ⇒ Object
16 17 18 19 20 21 |
# File 'lib/legion/data/settings.rb', line 16 def self.models { continue_on_load_fail: false, autoload: true } end |