Module: Rubber
- Defined in:
- lib/rubber.rb,
lib/rubber.rb,
lib/rubber/dns.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, 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
40
41
42
|
# File 'lib/rubber.rb', line 40
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
|
# 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))
rails_boot_file = File.join(RUBBER_ROOT, 'config', 'boot.rb')
require(rails_boot_file) if File.exists? rails_boot_file
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
48
49
50
|
# File 'lib/rubber.rb', line 48
def self.logger
@@logger
end
|
.root ⇒ Object
36
37
38
|
# File 'lib/rubber.rb', line 36
def self.root
@@root
end
|
.version ⇒ Object
44
45
46
|
# File 'lib/rubber.rb', line 44
def self.version
@@version
end
|