Sha256: 7444d1fc337f82e4f4d0d5c1be9fc49cb3c259bda896c9d86bb016e829069670
Contents?: true
Size: 747 Bytes
Versions: 16
Compression:
Stored size: 747 Bytes
Contents
require File.dirname(__FILE__) + '/active_wrapper/gems' ActiveWrapper::Gems.activate %w(activerecord) require 'active_record' require 'fileutils' require 'logger' require 'yaml' $:.unshift File.dirname(__FILE__) + '/active_wrapper' require 'db' require 'log' module ActiveWrapper class <<self def setup(options={}) env = ENV['RACK_ENV'] || ENV['RAILS_ENV'] || ENV['MERB_ENV'] || 'development' options = { :base => File.dirname($0), :env => options[:env] || env, :log => options[:env] || env }.merge(options.reject { |k, v| v.nil? }) db = Db.new(options) log = Log.new(options) [ db, log ] end end end ActiveRecord::Base.default_timezone = :utc
Version data entries
16 entries across 16 versions & 3 rubygems