class Lightning::DatabaseDetails

Public Class Methods

basic() click to toggle source
# File lib/framework/db.rb, line 23
def self.basic
    return {
        adapter:  'mysql2',
        host:     self.database_host,
        username: self.database_user,
        password: self.database_pass
    }
end
database_host() click to toggle source
# File lib/framework/db.rb, line 7
def self.database_host
    ENV['DATABASE_HOST'] || 'localhost'
end
database_name() click to toggle source
# File lib/framework/db.rb, line 3
def self.database_name
    ENV['DATABASE_NAME']
end
database_pass() click to toggle source
# File lib/framework/db.rb, line 15
def self.database_pass
    ENV['DATABASE_PASS'] || ''
end
database_user() click to toggle source
# File lib/framework/db.rb, line 11
def self.database_user
    ENV['DATABASE_USER']
end
default_charset() click to toggle source
# File lib/framework/db.rb, line 19
def self.default_charset
    'utf8mb4'
end
full() click to toggle source
# File lib/framework/db.rb, line 32
def self.full
    basic.merge(database: self.database_name)
end