Module: Rebi
- Extended by:
- Rebi
- Included in:
- Rebi
- Defined in:
- lib/rebi.rb,
lib/rebi/error.rb,
lib/rebi/config.rb,
lib/rebi/version.rb,
lib/rebi/erb_helper.rb,
lib/rebi/zip_helper.rb,
lib/rebi/application.rb,
lib/rebi/environment.rb,
lib/rebi/config_environment.rb
Defined Under Namespace
Classes: Application, Config, ConfigEnvironment, Environment, ErbHelper, Error, ZipHelper
Constant Summary
collapse
- COLORS =
[:red, :green, :yellow, :blue, :magenta, :cyan, :white]
- VERSION =
'0.1.7'
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#config_file ⇒ Object
Returns the value of attribute config_file.
30
31
32
|
# File 'lib/rebi.rb', line 30
def config_file
@config_file
end
|
Instance Method Details
#app ⇒ Object
41
42
43
|
# File 'lib/rebi.rb', line 41
def app
return Rebi::Application.get_or_create_application(config.app_name)
end
|
#client(c = nil) ⇒ Object
37
38
39
|
# File 'lib/rebi.rb', line 37
def client c=nil
@@client = c || Aws::ElasticBeanstalk::Client.new
end
|
#colorize_prefix(prefix) ⇒ Object
59
60
61
62
63
64
|
# File 'lib/rebi.rb', line 59
def colorize_prefix(prefix)
h = prefix.chars.inject(0) do |m, c|
m + c.ord
end
return ColorizedString[prefix].colorize(COLORS[h % COLORS.count])
end
|
#config {|Rebi::Config.instance| ... } ⇒ Object
45
46
47
48
|
# File 'lib/rebi.rb', line 45
def config
yield Rebi::Config.instance if block_given?
return Rebi::Config.instance
end
|
#log(mes, prefix = nil) ⇒ Object
54
55
56
|
# File 'lib/rebi.rb', line 54
def log mes, prefix=nil
puts "#{prefix ? "#{colorize_prefix(prefix)}: " : ""}#{mes}"
end
|
#reload! ⇒ Object
50
51
52
|
# File 'lib/rebi.rb', line 50
def reload!
config.reload!
end
|
#root ⇒ Object
33
34
35
|
# File 'lib/rebi.rb', line 33
def root
Dir.pwd
end
|