Sha256: 03bc70c60ee27d16a6266ac4e5efd14367c9c2832e0b177b38864f555a3597b3
Contents?: true
Size: 1.27 KB
Versions: 3
Compression:
Stored size: 1.27 KB
Contents
$:.unshift(File.dirname(__FILE__)) module Rubber VERSION = File.read(File.join(File.dirname(__FILE__), '..', 'VERSION')).chomp def self.initialize(project_root, project_env) return if defined?(RUBBER_ROOT) && defined?(RUBBER_ENV) Object.const_set('RUBBER_ENV', project_env) Object.const_set('RUBBER_ROOT', project_root) # pull in basic rails env. rubber only needs RAILS_ROOT and RAILS_ENV. # We actually do NOT want the entire rails environment because it # complicates bootstrap (i.e. can't run config to create db because full # rails env needs db to exist as some plugin accesses model or something) rails_boot_file = File.join(RUBBER_ROOT, 'config', 'boot') require(rails_boot_file) if File.exists? rails_boot_file if defined?(RAILS_DEFAULT_LOGGER) && RAILS_DEFAULT_LOGGER Object.const_set('LOGGER', RAILS_DEFAULT_LOGGER) else Object.const_set('LOGGER', Logger.new($stdout)) LOGGER.level = Logger::INFO LOGGER.formatter = lambda {|severity, time, progname, msg| "Rubber[%s]: %s\n" % [severity, msg.to_s.lstrip]} end end end require 'rubber/configuration' require 'rubber/environment' require 'rubber/generator' require 'rubber/instance' require 'rubber/util' require 'rubber/cloud' require 'rubber/dns'
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
sml-rubber-0.9.3 | lib/rubber.rb |
sml-rubber-0.9.4 | lib/rubber.rb |
sml-rubber-0.9.5 | lib/rubber.rb |