Module: Rubber
- Defined in:
- lib/rubber.rb,
lib/rubber.rb,
lib/rubber/dns.rb,
lib/rubber/tag.rb,
lib/rubber/util.rb,
lib/rubber/cloud.rb,
lib/rubber/railtie.rb,
lib/rubber/dns/base.rb,
lib/rubber/instance.rb,
lib/rubber/cloud/aws.rb,
lib/rubber/generator.rb,
lib/rubber/cloud/base.rb,
lib/rubber/dns/dyndns.rb,
lib/rubber/dns/zerigo.rb,
lib/rubber/dns/nettica.rb,
lib/rubber/environment.rb,
lib/rubber/configuration.rb
Defined Under Namespace
Modules: Cloud, Configuration, Dns, Tag, Util
Classes: Railtie
Constant Summary
collapse
- @@version =
File.read(File.join(File.dirname(__FILE__), '..', 'VERSION')).chomp
Class Method Summary
collapse
Class Method Details
.env ⇒ Object
42
43
44
|
# File 'lib/rubber.rb', line 42
def self.env
@@env
end
|
.initialize(project_root, project_env) ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/rubber.rb', line 7
def self.initialize(project_root, project_env)
return if defined?(RUBBER_ROOT) && defined?(RUBBER_ENV)
@@root = project_root
@@env = project_env
Object.const_set('RUBBER_ENV', project_env)
Object.const_set('RUBBER_ROOT', File.expand_path(project_root))
if ! defined?(Rails) && ! Rubber::Util::is_bundler?
rails_boot_file = File.join(RUBBER_ROOT, 'config', 'boot.rb')
require(rails_boot_file) if File.exists? rails_boot_file
end
if defined?(Rails.logger) && Rails.logger
@@logger = Rails.logger
else
@@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
Object.const_set('RUBBER_CONFIG', self.config)
Object.const_set('RUBBER_INSTANCES', self.instances)
end
|
.logger ⇒ Object
50
51
52
|
# File 'lib/rubber.rb', line 50
def self.logger
@@logger
end
|
.root ⇒ Object
38
39
40
|
# File 'lib/rubber.rb', line 38
def self.root
@@root
end
|
.version ⇒ Object
46
47
48
|
# File 'lib/rubber.rb', line 46
def self.version
@@version
end
|