Class: Blubber::Flow
- Inherits:
-
Object
- Object
- Blubber::Flow
- Defined in:
- lib/blubber/flow.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(layer:) ⇒ Flow
constructor
A new instance of Flow.
- #run ⇒ Object
Constructor Details
#initialize(layer:) ⇒ Flow
Returns a new instance of Flow.
24 25 26 |
# File 'lib/blubber/flow.rb', line 24 def initialize(layer:) @layer = layer end |
Class Method Details
.build(layers = nil) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/blubber/flow.rb', line 9 def self.build(layers = nil) layers ||= Dir['**/*/Dockerfile'].map { |d| File.dirname(d) } images = layers.map { |layer| Flow.new(layer: layer).run } table = [HighLine.color('Layer', :bold), HighLine.color('Tag', :bold)] table += images.map do |(project, )| .map do |tag| [project, tag ] end end puts HighLine.new.list(table.flatten, :columns_across, 2) end |