kontena-cli 1.4.0.pre10 → 1.4.0.pre11

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
  SHA1:
3
- metadata.gz: cf9375a2a08c843570d3497ffba6f5c9c08d8b26
4
- data.tar.gz: 763a11db98a1dbeca9a8958b740335ed39154081
3
+ metadata.gz: 6243212ae3157790b6220f240a7b1984fca05f64
4
+ data.tar.gz: 56f06d70b780d78960cba3984c7261d268d1d3fa
5
5
  SHA512:
6
- metadata.gz: 7c169207ab0236f40286ae58719ab514820fb29adf76e60c095fbd8c657216e5beb4ffa908d151c0069cc80a9d8dc24cafbc5659bfeec97206f2d1669f209148
7
- data.tar.gz: a2f237a79e37feb732263998d04012b8e54c3c35d9ea9266ee76784866de0fbef45703ed57f1ecf80ec2d81f2fc3a21d29fad074b5a9daf8552324e3c6b793d2
6
+ metadata.gz: 58da1ecc9ff8b5be1caf94b45235e16e0342b858f49c4c2cbb5073aa4412474ffdcb0ace8aa0920a97f4b9a4deedf9c9bcff1282d84ae749c734b33ee2abe8f6
7
+ data.tar.gz: a699ec0cdc8abe7e95f1ad4d0d56109d1245a428f40b060c265145216583a2f2f578eb2eb544442dd3b64826243c6c59668267702a86ec9107bb94aff00ed423
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.0.pre10
1
+ 1.4.0.pre11
@@ -150,8 +150,8 @@ module Kontena::Cli::Stacks
150
150
  end
151
151
 
152
152
  unless changes.added_stacks.empty?
153
- puts pastel.red("These new stack dependencies #{will} be installed:")
154
- changes.added_stacks.each { |stack| puts pastel.red("- #{stack}") }
153
+ puts pastel.green("These new stack dependencies #{will} be installed:")
154
+ changes.added_stacks.each { |stack| puts pastel.green("- #{stack}") }
155
155
  puts
156
156
  end
157
157
 
@@ -36,7 +36,8 @@ module Kontena
36
36
  end
37
37
 
38
38
  def print_table(array, fields = nil, &block)
39
- puts generate_table(array, fields, &block)
39
+ output = generate_table(array, fields, &block)
40
+ puts output unless output.strip.empty?
40
41
  end
41
42
  end
42
43
 
@@ -68,7 +69,7 @@ module Kontena
68
69
 
69
70
  def render
70
71
  if data.empty?
71
- fields.map(&method(:format_header_item)).join(' ')
72
+ fields.size > 1 ? fields.map(&method(:format_header_item)).join(' ') : ''
72
73
  else
73
74
  table.render(render_mode, render_options).gsub(/\s+$/, '')
74
75
  end
@@ -1,5 +1,6 @@
1
1
  name "kontena-cli"
2
- license "Apache 2.0"
2
+ license "Apache-2.0"
3
+ skip_transitive_dependency_licensing true # XXX: assumes bundler is installed within build
3
4
  default_version File.read('../VERSION').strip
4
5
  source path: "./wrappers"
5
6
  dependency "ruby"
@@ -51,6 +51,10 @@ describe Kontena::Cli::TableGenerator do
51
51
  ]).without_header
52
52
  end
53
53
 
54
+ it 'outputs nothing when table with no data and only one field' do
55
+ expect{subject.print_table({}, ['a'])}.to output(/\A\z/).to_stdout
56
+ end
57
+
54
58
  it 'tries to read the fields from #fields method when none given' do
55
59
  expect(subject).to receive(:fields).and_return(['a', 'b'])
56
60
  expect{subject.print_table(data)}.to output_table([
data/tasks/release.rake CHANGED
@@ -1,16 +1,33 @@
1
1
  namespace :release do
2
2
  VERSION = Gem::Version.new(File.read('VERSION').strip)
3
+ DEB_NAME = 'kontena-cli'
3
4
  DOCKER_NAME = 'kontena/cli'
4
5
  if VERSION.prerelease?
5
6
  DOCKER_VERSIONS = ['edge']
7
+ DEB_COMPONENT = 'edge'
6
8
  else
7
9
  DOCKER_VERSIONS = ['latest', VERSION.to_s.match(/(\d+\.\d+)/)[1]]
10
+ DEB_COMPONENT = 'main'
11
+ end
12
+
13
+ desc 'Setup omnibus'
14
+ task :setup_omnibus do
15
+ Dir.chdir('omnibus') do
16
+ sh("bundle install --binstubs")
17
+ end
8
18
  end
9
19
 
10
20
  desc 'Build all'
11
21
  task :build => [:build_docker] do
12
22
  end
13
23
 
24
+ desc 'Build omnibus package'
25
+ task :build_omnibus do
26
+ Dir.chdir('omnibus') do
27
+ sh("bin/omnibus build kontena --log-level info")
28
+ end
29
+ end
30
+
14
31
  desc 'Build docker images'
15
32
  task :build_docker do
16
33
  sh("docker rmi #{DOCKER_NAME}:#{VERSION} || true")
@@ -32,4 +49,14 @@ namespace :release do
32
49
  sh("docker push #{DOCKER_NAME}:#{v}")
33
50
  end
34
51
  end
52
+
53
+ desc 'Upload ubuntu packages'
54
+ task :push_omnibus_ubuntu do
55
+ rev = ENV['REV'] || '1'
56
+ repo = ENV['REPO'] || 'ubuntu'
57
+ arch = ENV['ARCH'] || 'amd64'
58
+ deb = "./omnibus/pkg/#{DEB_NAME}_*_#{arch}.deb"
59
+
60
+ sh("curl --netrc -T #{deb} 'https://api.bintray.com/content/kontena/#{repo}/#{DEB_NAME}/#{VERSION}/pool/#{DEB_COMPONENT}/k/#{DEB_NAME}-#{VERSION}-#{rev}~xenial.deb;deb_distribution=xenial;deb_component=#{DEB_COMPONENT};deb_architecture=#{arch};publish=1'")
61
+ end
35
62
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kontena-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0.pre10
4
+ version: 1.4.0.pre11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kontena, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-29 00:00:00.000000000 Z
11
+ date: 2017-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler