Module: Jets::Builders::Util
- Included in:
- CodeBuilder, CodeSize, LambdaLayer, Md5Zip, RubyPackager
- Defined in:
- lib/jets/builders/util.rb
Instance Method Summary collapse
- #code_area ⇒ Object
-
#full(relative_path) ⇒ Object
Provide pretty clear way to desinate full path.
- #headline(message) ⇒ Object
- #sh(command) ⇒ Object
- #stage_area ⇒ Object
Instance Method Details
#code_area ⇒ Object
28 29 30 |
# File 'lib/jets/builders/util.rb', line 28 def code_area "#{stage_area}/code" end |
#full(relative_path) ⇒ Object
Provide pretty clear way to desinate full path. full(“bundled”) => /tmp/jets/demo/bundled
20 21 22 |
# File 'lib/jets/builders/util.rb', line 20 def full(relative_path) "#{Jets.build_root}/#{relative_path}" end |
#headline(message) ⇒ Object
14 15 16 |
# File 'lib/jets/builders/util.rb', line 14 def headline() puts "=> #{}".colorize(:cyan) end |
#sh(command) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/jets/builders/util.rb', line 3 def sh(command) puts "=> #{command}".colorize(:green) success = system(command) unless success puts "#{command} failed to run.".colorize(:red) puts caller[0] exit 1 end success end |
#stage_area ⇒ Object
24 25 26 |
# File 'lib/jets/builders/util.rb', line 24 def stage_area "#{Jets.build_root}/stage" end |