blubber 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bfbc6651558630028dc0781e75041d7ab5efc42b56a5f6ffe04089fb9013dbb4
4
- data.tar.gz: a4065995886610bb77be3d7e50905a2bd91df884609400cf0bc78773ed8d9041
3
+ metadata.gz: c9e5605e7db4c0a24f09d076e0391091c0021d106ed5570ea81e27208b1dd871
4
+ data.tar.gz: ae3d7e598c31d11819adc2f90ec198b8075161be66abe28548822c721a507305
5
5
  SHA512:
6
- metadata.gz: f5a0b108609af3b66ebe60374e7cb9d6ed2fc2044911b34140bbf09615e763567ffb693b201929a8ce28a17a71c85aa69dde6f03994653399a18c870ef967067
7
- data.tar.gz: 1f011a249675714f4a6eaa8dd8c589934fd5becfeb2efe15733ff8ade1514e2dfb63557b9e1ef0d381b81cd680dcc23ddabd51e724cecae8af954346c89776f4
6
+ metadata.gz: 716d8eae016b585e0849d7e875bdda9c9fb9fcc5c6e66e39a5eb67b6afc4a1784d415000f6f12794adfae53ca6a0fad9657df7bde575e3d23f700b558037a00a
7
+ data.tar.gz: bf3fcad9de601a384df0a38fee32ba6d0c857fcf69c9f8f378e80577f3598da565baf7e37474ea55e0ac7e1e90af04f714a7126e758f5dc0a5bad352a22e72b3
data/lib/blubber/cli.rb CHANGED
@@ -6,23 +6,6 @@ module Blubber
6
6
  class Cli < Thor
7
7
  desc 'build', 'Builds all found Docker images'
8
8
  def build
9
- # Build images
10
- images = layers.map { |layer| Flow.new(layer: layer).run }
11
-
12
- table = [set_color('Layer', :bold), set_color('Tag', :bold)]
13
- table += images.map do |(project, tags)|
14
- tags.map do |tag|
15
- [project, tag ]
16
- end
17
- end
18
-
19
- puts HighLine.new.list(table.flatten, :columns_across, 2)
20
- end
21
-
22
- no_tasks do
23
- def layers
24
- @layers ||= Dir['**/*/Dockerfile'].map { |d| File.dirname(d) }
25
- end
26
- end
9
+ Flow.build
27
10
  end
28
11
  end
data/lib/blubber/flow.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'highline'
1
2
  require 'open3'
2
3
 
3
4
  require 'blubber/builder'
@@ -5,10 +6,26 @@ require 'blubber/tagger'
5
6
 
6
7
  module Blubber
7
8
  class Flow
9
+ def self.build(layers = nil)
10
+ layers ||= Dir['**/*/Dockerfile'].map { |d| File.dirname(d) }
11
+
12
+ images = layers.map { |layer| Flow.new(layer: layer).run }
13
+
14
+ table = [set_color('Layer', :bold), set_color('Tag', :bold)]
15
+ table += images.map do |(project, tags)|
16
+ tags.map do |tag|
17
+ [project, tag ]
18
+ end
19
+ end
20
+
21
+ puts HighLine.new.list(table.flatten, :columns_across, 2)
22
+ end
23
+
8
24
  def initialize(layer:)
9
25
  @layer = layer
10
26
  end
11
27
 
28
+
12
29
  def run
13
30
  image = Builder.new(layer: layer, logger: logger).run
14
31
  return unless image[:success]
@@ -1,3 +1,3 @@
1
1
  module Blubber
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blubber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikko Kokkonen