Sha256: a656f7091e50b1a125dec00ef2d1ff7e052dbe88a5639de26093dcff6a0e5033

Contents?: true

Size: 813 Bytes

Versions: 3

Compression:

Stored size: 813 Bytes

Contents

# Environment prepares and assembles your app ($LOAD_PATH, plugins and config files)

# 
# Support
# 
require 'crystal/support'

# config
[  
  'config',
].each{|f| require "crystal/environment/#{f}"}

module Crystal
  VERSION = '0.0.1'
end

# environment
[  
  'logger',
  'environment',
  'files_helper'
].each{|f| require "crystal/environment/#{f}"}
Crystal::Environment.inherit Crystal::FilesHelper


# 
# Runtime initialization
# 
crystal do
  register :config do
    config = Crystal::Config.new.set!(:root => $APP_DIR)
    config.load_app_config!    
    config
  end

  register :environment do
    Crystal::Environment.new  
  end
end

# 
# Handy mehtods 
# 
module Crystal
  class << self
    inject(
      :config => :config,
      :environment => :environment,
      :logger => :logger
    )
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
crystal-0.0.13 lib/crystal/environment.rb
crystal-0.0.12 lib/crystal/environment.rb
crystal_ext-0.0.11 lib/crystal/environment.rb