Sha256: 9b9f1e3a8895453851339c8c5044d147053bb74f20f22fc23d4d56b8c426c057

Contents?: true

Size: 1.24 KB

Versions: 1

Compression:

Stored size: 1.24 KB

Contents

module Legion
  module Data
    module Settings
      def self.default
        {
          connected:  false,
          cache:      cache,
          connection: connection,
          creds:      creds,
          migrations: migrations,
          models:     models

        }
      end

      def self.models
        {
          continue_on_load_fail: false,
          autoload:              true
        }
      end

      def self.migrations
        {
          continue_on_fail: false,
          auto_migrate:     true,
          ran:              false,
          version:          nil
        }
      end

      def self.connection
        {
          log:                 false,
          log_connection_info: false,
          log_warn_duration:   1,
          sql_log_level:       'debug',
          max_connections:     32
        }
      end

      def self.creds
        {
          username: 'legion',
          password: 'legion',
          database: 'legion',
          host:     '127.0.0.1',
          port:     3306,
          debug:    false
        }
      end

      def self.cache
        {
          connected:   false,
          auto_enable: Legion::Settings[:cache][:connected],
          ttl:         60
        }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
legion-data-0.2.0 lib/legion/data/settings.rb