kontena-cli 0.13.1 → 0.13.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
  SHA1:
3
- metadata.gz: e55086d010057020f3ca0f1f231d3ecba03243c9
4
- data.tar.gz: 75d347e6eabe1d16ae02957768904504869e0ecd
3
+ metadata.gz: 8b177f038fa7dd2ab7f6b85d2abb943e9a2a8a80
4
+ data.tar.gz: 3cfb2f749727eb8509a101bc5996025a337fadb0
5
5
  SHA512:
6
- metadata.gz: 3bce60a7e390caf0281deb92eb581cf4ee4b1fd42172cf7efa18b95c89f96e89dd0d9fbde4d49c24a501c9632a17ef854c4995b71344d488f271208ad04c1a70
7
- data.tar.gz: 2fb5f2287f85e6fdedb2f79e4b25a32eebc085ba2d256b2ac1f46d6fbb4bf7d96c073a8d669f6034c78db8bf930a7c1c84d787c6929aa182cd197c734883453b
6
+ metadata.gz: fd7052c779057a9f34228d0c2f0e9d48b010a7f52d393771490de6581a8906b5ab7ab9c9a817d369adf64b0dd6c15f713f12e52b5f434e75d5615a81fd15285d
7
+ data.tar.gz: 27e68f0dd1b1dcdaae5c88247be9d932df5a68ff2083f236ef1f705a1b78c741b3475e7b012a72e7d4cf2f8658c49cf4de9842d3d595f841f599d1dff6d27352
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.13.1
1
+ 0.13.2
data/bin/kontena CHANGED
@@ -70,12 +70,12 @@ rescue Excon::Errors::SocketError => exc
70
70
  else
71
71
  abort(exc.message)
72
72
  end
73
+ rescue Kontena::Errors::StandardError => exc
74
+ raise exc if ENV['DEBUG']
75
+ abort(exc.message)
73
76
  rescue => exc
74
- if ENV['DEBUG']
75
- raise exc
76
- else
77
- puts "Kontena error: #{exc.message}"
78
- puts "Rerun the command with environment DEBUG=true set to get full the exception"
79
- abort()
80
- end
77
+ raise exc if ENV['DEBUG']
78
+ $stderr.puts "Kontena error: #{exc.message}"
79
+ $stderr.puts "Rerun the command with environment DEBUG=true set to get the full exception"
80
+ abort
81
81
  end
@@ -47,7 +47,7 @@ module Kontena::Cli::Apps
47
47
  options = {}
48
48
  options[:force] = true if force_deploy?
49
49
  deploy_service(token, name, options)
50
- print "deploying #{name.sub("#{service_prefix}-", '').colorize(:cyan)}"
50
+ print "deploying #{unprefixed_name(name).colorize(:cyan)}"
51
51
  unless async?
52
52
  wait_for_deploy_to_finish(token, service['id'])
53
53
  else
@@ -112,6 +112,16 @@ module Kontena::Cli::Apps
112
112
  deploy_queue.find {|service| service['name'] == prefixed_name(name)} != nil
113
113
  end
114
114
 
115
+ #
116
+ # @param [String] name
117
+ def unprefixed_name(name)
118
+ if service_prefix.empty?
119
+ name
120
+ else
121
+ name.sub("#{service_prefix}-", '')
122
+ end
123
+ end
124
+
115
125
  # @param [Hash] options
116
126
  def merge_env_vars(options)
117
127
  return unless options['env_file']
@@ -13,7 +13,7 @@ module Kontena::Cli::Master::Users
13
13
  begin
14
14
  data = { email: email }
15
15
  response = client(token).post('users', data)
16
- puts "Invitation send to #{email}"
16
+ puts "Invited #{email} (no email gets sent)"
17
17
  rescue
18
18
  puts "Failed to invite #{email}".colorize(:red)
19
19
  puts exc.message
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: 0.13.1
4
+ version: 0.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kontena, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-19 00:00:00.000000000 Z
11
+ date: 2016-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler