Sha256: e151baf5fce36d86ac983adc9fc2c6cebb015ecfd076c6376d82c2eec7ddd4a8

Contents?: true

Size: 872 Bytes

Versions: 3

Compression:

Stored size: 872 Bytes

Contents

require 'cramp'
require 'thin'
require 'bundler'
require 'http_router'
require 'async-rack'
require 'virtus'
require 'active_support/json'

module Termvana
  class Application

    def self.root(path = nil)
      @_root ||= File.expand_path(File.dirname(__FILE__))
      path ? File.join(@_root, path.to_s) : @_root
    end

    def self.env
      @_env ||= (ENV['RACK_ENV'] || 'development')
    end

    def self.routes
      @_routes ||= eval(File.read("#{root}/config/routes.rb"))
    end

    # Initialize the application
    def self.initialize!
    end

  end
end

# Preload application classes
Dir["#{File.expand_path(File.dirname(__FILE__))}/app/models/*.rb"].each {|f| require f}
Dir["#{File.expand_path(File.dirname(__FILE__))}/app/command_processor.rb"].each {|f| require f}
Dir["#{File.expand_path(File.dirname(__FILE__))}/app/**/*.rb"].each {|f| require f}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
termvana-0.2.0.beta3 lib/termvana/application.rb
termvana-0.2.0.beta2 lib/termvana/application.rb
termvana-0.2.0.beta1 lib/termvana/application.rb