cs_comments_service/config/application.rb

13 строки
335 B
Ruby

env_index = ARGV.index("-e")
env_arg = ARGV[env_index + 1] if env_index
env = env_arg || ENV["SINATRA_ENV"] || "development"
module CommentService
class << self; attr_accessor :config; end
end
CommentService.config = YAML.load_file("config/application.yml")
Mongoid.load!("config/mongoid.yml")
Mongoid.logger.level = Logger::INFO