Skip to content
This repository
branch: master
Akzhan Abdulin akzhan
file 43 lines (37 sloc) 1.332 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
$:.unshift(File.expand_path(File.dirname(__FILE__)))
$:.unshift(File.expand_path(File.dirname(__FILE__) + '/lib'))
$:.unshift(File.expand_path(File.dirname(__FILE__) + '/yard/lib'))
$:.unshift(File.expand_path(File.dirname(__FILE__) + '/../yard/lib'))

require 'rubygems'
require 'bundler/setup'
require 'yaml'
require 'yard'
require 'yard-sd'
require 'yard-rails'
require 'yard-kramdown'
require 'yard-redcarpet-ext'

YARD::Server::Adapter.setup
YARD::Templates::Engine.register_template_path(File.dirname(__FILE__) + '/templates')

def __p(*extra)
  file = extra.last == :file
  extra.pop if file
  path = File.join(File.dirname(__FILE__), *extra)
  FileUtils.mkdir_p(path) unless File.exists?(path) || file
  path
end

CONFIG_PATH = __p('config')
STATIC_PATH = __p('public')
REPOS_PATH = __p('repos/github')
REMOTE_GEMS_PATH = __p('repos/gems')
STDLIB_PATH = __p('repos/stdlib')
FEATURED_PATH = __p('repos/featured')
TMP_PATH = __p('tmp')
DATA_PATH = __p('data')
TEMPLATES_PATH = __p('templates')
CONFIG_FILE = __p('config', 'config.yaml', :file)
REMOTE_GEMS_FILE = __p('data', 'remote_gems', :file)
RECENT_SQL_FILE = __p('data', 'recent.sqlite', :file)

require_relative 'lib/helpers'
require_relative 'lib/cache'
require_relative 'lib/configuration'

$CONFIG = Configuration.load
Something went wrong with that request. Please try again.