Class: Bora::Tasks
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- Bora::Tasks
- Defined in:
- lib/bora/tasks.rb
Instance Attribute Summary collapse
-
#stack_options ⇒ Object
Returns the value of attribute stack_options.
Instance Method Summary collapse
- #colorize=(value) ⇒ Object
-
#initialize(stack_name, template_uri = nil) ⇒ Tasks
constructor
A new instance of Tasks.
Constructor Details
#initialize(stack_name, template_uri = nil) ⇒ Tasks
Returns a new instance of Tasks.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/bora/tasks.rb', line 7 def initialize(stack_name, template_uri = nil) puts '--------------------------------------------------------------------------------' puts 'Bora::Tasks is deprecated. Please use YAML based configuration instead.' puts 'See http://ampedandwired.com/bora for more information.' puts '--------------------------------------------------------------------------------' @stack_name = stack_name @stack = Cfn::Stack.new(stack_name) @colorize = true @stack_options = {} within_namespace { yield self } if block_given? if template_uri raise 'You cannot specify a template in the constructor as well as in the stack_options' if @stack_options[:template_body] || @stack_options[:template_url] @stack_options[:template_body] = File.read(template_uri) elsif @stack_options[:template_url] @stack_options[:template_body] = File.read(@stack_options[:template_url]) @stack_options.delete(:template_url) end define_tasks end |
Instance Attribute Details
#stack_options ⇒ Object
Returns the value of attribute stack_options.
30 31 32 |
# File 'lib/bora/tasks.rb', line 30 def @stack_options end |
Instance Method Details
#colorize=(value) ⇒ Object
32 33 34 35 |
# File 'lib/bora/tasks.rb', line 32 def colorize=(value) @colorize = value String.disable_colorization = !@colorize end |