mirror of
https://github.com/openSUSE/osem.git
synced 2026-04-27 18:36:00 -04:00
16 lines
428 B
Ruby
16 lines
428 B
Ruby
# Load the rails application
|
|
require File.expand_path('../application', __FILE__)
|
|
|
|
# Load the configuration file
|
|
path = Rails.root.join("config", "config.yml")
|
|
begin
|
|
CONFIG = YAML.load_file(path)[Rails.env]
|
|
rescue Exception
|
|
puts "Error while parsing config file #{path}"
|
|
CONFIG = Hash.new
|
|
end
|
|
|
|
# Initialize the rails application
|
|
Osem::Application.initialize!
|
|
Osem::Application.config.secret_keybase = CONFIG['secret_key']
|