Module: Travis::Database

Defined in:
lib/travis/database.rb

Class Method Summary collapse

Class Method Details

.connectObject



7
8
9
10
11
12
# File 'lib/travis/database.rb', line 7

def connect
  ActiveRecord::Base.default_timezone = :utc
  ActiveRecord::Base.logger = Travis.logger
  ActiveRecord::Base.configurations = { env => Travis.config.database }
  ActiveRecord::Base.establish_connection(env)
end

.envObject



14
15
16
# File 'lib/travis/database.rb', line 14

def env
  Travis.config.env
end