Sha256: 9df18e3005f3d1cb6e113e9de593fb5a680f3833baff576b3034e9299a105054

Contents?: true

Size: 674 Bytes

Versions: 1

Compression:

Stored size: 674 Bytes

Contents

require 'railstar/engine'
require 'railstar/code_holder'
require 'railstar/helper'
ActionView::Base.send(:include, Railstar::Helper)

module Railstar
  def self.env
    @env ||= load_env
  end

  def self.load_env
    puts "################# LOAD railstar.yml #################"
    if File.exist?(file = File.join(Rails.root.to_s, 'config', 'railstar.yml'))
      rs = YAML.load_file(file)
      (rs["default"] || {}).merge(rs[Rails.env] || {})
    else
      {}
    end
  end

  def self.code_dir
    self.root + "/../resources/code"
  end

  def self.root
    RAILSTAR_ROOT
  end
end

C = Railstar::CodeHolder.new
RAILSTAR_ROOT = File.expand_path(File.dirname(__FILE__))

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
railstar-0.0.8 lib/railstar.rb