kontena-cli 1.2.0.rc1 → 1.2.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/kontena-cli.gemspec +1 -0
- data/lib/kontena/cli/cloud/login_command.rb +1 -0
- data/lib/kontena/cli/common.rb +2 -2
- data/lib/kontena/cli/containers/exec_command.rb +0 -2
- data/lib/kontena/cli/containers/list_command.rb +0 -2
- data/lib/kontena/cli/containers/logs_command.rb +0 -1
- data/lib/kontena/cli/services/link_command.rb +0 -1
- data/lib/kontena/cli/services/unlink_command.rb +0 -1
- data/lib/kontena/cli/subcommand_loader.rb +1 -0
- data/lib/kontena/cli/version_command.rb +1 -1
- data/lib/kontena/cli/volumes/list_command.rb +6 -5
- data/lib/kontena/client.rb +4 -7
- data/lib/kontena/command.rb +6 -2
- data/lib/kontena/main_command.rb +1 -7
- data/lib/kontena/scripts/completer.rb +15 -0
- data/lib/kontena/stacks_client.rb +1 -1
- data/lib/kontena_cli.rb +8 -8
- data/spec/kontena/cli/app/deploy_command_spec.rb +0 -1
- data/spec/kontena/cli/app/logs_command_spec.rb +0 -1
- data/spec/kontena/cli/containers/list_command_spec.rb +0 -1
- data/spec/kontena/cli/containers/logs_command_spec.rb +0 -1
- data/spec/kontena/cli/services/secrets/link_command_spec.rb +0 -1
- data/spec/kontena/cli/services/secrets/unlink_command_spec.rb +0 -1
- data/spec/kontena/cli/services/update_command_spec.rb +0 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 916851395849968592a3880129bc0a0b0bbfc364
|
4
|
+
data.tar.gz: 0f69d57751a082bd8749a81c71a035725ab88287
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d880cca2f0f153718ec34096d9c4586753b90bf25c78b3b4e72cb07637234aee9afdb318d978585bebeefe86af6478f6dd5c900530b433ebce3aa4c9065d743e
|
7
|
+
data.tar.gz: fe3b778aa2fc733953c6b6e43bd5050e6aa2512bc11233df5be747af261e4d55ea55653b8b5f9150491cf9a0320c220d4da156eed3db5e6b00a7168b6ef3b63e
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.0.
|
1
|
+
1.2.0.rc2
|
data/kontena-cli.gemspec
CHANGED
data/lib/kontena/cli/common.rb
CHANGED
@@ -9,12 +9,13 @@ module Kontena::Cli::Volumes
|
|
9
9
|
requires_current_master_token
|
10
10
|
|
11
11
|
def execute
|
12
|
+
require 'tty-table'
|
13
|
+
|
12
14
|
volumes = client.get("volumes/#{current_grid}")['volumes']
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
end
|
15
|
+
table = TTY::Table.new ['NAME', 'SCOPE', 'DRIVER', 'CREATED AT'], volumes.map { |volume|
|
16
|
+
[volume['name'], volume['scope'], volume['driver'], volume['created_at']]
|
17
|
+
}
|
18
|
+
puts table.render(:basic)
|
18
19
|
end
|
19
20
|
|
20
21
|
end
|
data/lib/kontena/client.rb
CHANGED
@@ -6,12 +6,9 @@ require 'socket'
|
|
6
6
|
require 'openssl'
|
7
7
|
require 'uri'
|
8
8
|
require 'time'
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
require_relative 'cli/config'
|
13
|
-
rescue LoadError
|
14
|
-
end
|
9
|
+
require 'kontena/errors'
|
10
|
+
require 'kontena/cli/version'
|
11
|
+
require 'kontena/cli/config'
|
15
12
|
|
16
13
|
module Kontena
|
17
14
|
class Client
|
@@ -61,7 +58,7 @@ module Kontena
|
|
61
58
|
ssl_verify_peer: ignore_ssl_errors? ? false : true
|
62
59
|
}
|
63
60
|
if ENV["DEBUG"]
|
64
|
-
|
61
|
+
require 'kontena/debug_instrumentor'
|
65
62
|
excon_opts[:instrumentor] = Kontena::DebugInstrumentor
|
66
63
|
end
|
67
64
|
|
data/lib/kontena/command.rb
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
require 'clamp'
|
2
|
-
|
2
|
+
require 'kontena/cli/subcommand_loader'
|
3
|
+
require 'kontena/cli/common'
|
4
|
+
require 'kontena/util'
|
5
|
+
require 'kontena/cli/bytes_helper'
|
6
|
+
require 'kontena/cli/grid_options'
|
3
7
|
|
4
8
|
class Kontena::Command < Clamp::Command
|
5
9
|
|
@@ -225,4 +229,4 @@ class Kontena::Command < Clamp::Command
|
|
225
229
|
end
|
226
230
|
end
|
227
231
|
|
228
|
-
|
232
|
+
require 'kontena/callback'
|
data/lib/kontena/main_command.rb
CHANGED
@@ -1,10 +1,4 @@
|
|
1
|
-
require '
|
2
|
-
require_relative 'cli/common'
|
3
|
-
require_relative 'util'
|
4
|
-
require_relative 'command'
|
5
|
-
require_relative 'callback'
|
6
|
-
require_relative 'cli/bytes_helper'
|
7
|
-
require_relative 'cli/grid_options'
|
1
|
+
require 'kontena/command'
|
8
2
|
|
9
3
|
class Kontena::MainCommand < Kontena::Command
|
10
4
|
include Kontena::Util
|
@@ -86,11 +86,26 @@ class Helper
|
|
86
86
|
[]
|
87
87
|
end
|
88
88
|
|
89
|
+
def subcommand_tree(cmd = nil, base = nil)
|
90
|
+
puts "#{cmd} ".strip
|
91
|
+
if base.has_subcommands?
|
92
|
+
base.recognised_subcommands.each do |sc|
|
93
|
+
subcommand_tree("#{cmd} #{sc.names.first}", sc.subcommand_class)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
89
97
|
end
|
90
98
|
|
91
99
|
helper = Helper.new
|
92
100
|
|
93
101
|
words = ARGV
|
102
|
+
|
103
|
+
if words.first == '--subcommand-tree'
|
104
|
+
require 'kontena/main_command'
|
105
|
+
helper.subcommand_tree("kontena", Kontena::MainCommand)
|
106
|
+
exit 0
|
107
|
+
end
|
108
|
+
|
94
109
|
words.delete_at(0)
|
95
110
|
|
96
111
|
completion = []
|
data/lib/kontena_cli.rb
CHANGED
@@ -108,11 +108,11 @@ require 'ruby_dig'
|
|
108
108
|
require 'shellwords'
|
109
109
|
require "safe_yaml"
|
110
110
|
SafeYAML::OPTIONS[:default_mode] = :safe
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
111
|
+
require 'kontena/cli/version'
|
112
|
+
require 'kontena/cli/common'
|
113
|
+
require 'kontena/command'
|
114
|
+
require 'kontena/client'
|
115
|
+
require 'kontena/stacks_cache'
|
116
|
+
require 'kontena/plugin_manager'
|
117
|
+
require 'kontena/main_command'
|
118
|
+
require 'kontena/cli/spinner'
|
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.2.0.
|
4
|
+
version: 1.2.0.rc2
|
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-04-
|
11
|
+
date: 2017-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -192,6 +192,20 @@ dependencies:
|
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: 4.0.0
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: tty-table
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - "~>"
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: 0.8.0
|
202
|
+
type: :runtime
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - "~>"
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: 0.8.0
|
195
209
|
description: Command-line client for the Kontena container and microservices platform
|
196
210
|
email:
|
197
211
|
- info@kontena.io
|