Sha256: bfccb68c987ccdd95398f564bb7e142635d25d06c16caa107459f0ced4b46807

Contents?: true

Size: 1.28 KB

Versions: 24

Compression:

Stored size: 1.28 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', File.expand_path(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

24 entries across 24 versions & 4 rubygems

Version Path
sml-rubber-0.9.10 lib/rubber.rb
sml-rubber-0.9.11 lib/rubber.rb
sml-rubber-0.9.13 lib/rubber.rb
sml-rubber-0.9.6 lib/rubber.rb
sml-rubber-0.9.7 lib/rubber.rb
sml-rubber-0.9.8 lib/rubber.rb
sml-rubber-0.9.9 lib/rubber.rb
wr0ngway-rubber-1.0.0 lib/rubber.rb
wr0ngway-rubber-1.0.1 lib/rubber.rb
axtro-rubber-1.0.2.8 lib/rubber.rb
axtro-rubber-1.0.2.7 lib/rubber.rb
rubber-1.1.5 lib/rubber.rb
rubber-1.1.4 lib/rubber.rb
rubber-1.1.3 lib/rubber.rb
rubber-1.1.2 lib/rubber.rb
rubber-1.1.1 lib/rubber.rb
rubber-1.1.0 lib/rubber.rb
axtro-rubber-1.0.2.6 lib/rubber.rb
axtro-rubber-1.0.2.5 lib/rubber.rb
axtro-rubber-1.0.2.4 lib/rubber.rb