krates 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/kontena/cli/grids/list_command.rb +1 -1
- data/lib/kontena/cli/plugins/common.rb +1 -1
- data/lib/kontena/main_command.rb +7 -7
- data/lib/kontena/plugin_manager/common.rb +5 -5
- data/lib/kontena/plugin_manager/loader.rb +2 -2
- data/lib/kontena/plugin_manager.rb +3 -0
- data/lib/kontena/scripts/completer.rb +1 -1
- data/lib/kontena/scripts/init +4 -4
- data/lib/kontena/scripts/kontena.zsh +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa6cabddcc6f78d1e75823cf695ee9251ca73f4440d48a9910b84fea6c1d8733
|
4
|
+
data.tar.gz: 78d12360c3ef9ae63dbc5d2ab423a4cd7007f0c8c662cf50ff28ca35be666348
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25722e13781dcccf66b3d9d430347fe243702c0d3402d5a96d7844ac6289dd3bc40d28c1eca0351a1e042f833abb7cd60852f2ea3dd3b600bd07e0aff0ee3322
|
7
|
+
data.tar.gz: 73e1144d6ad7f307b371f2776458342326b890e5ab59027560f305295d038e09068c0665eddfc8c5444f74ba87fce6c2f2be707318176fa314f3d5d34e344ffc
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.6.
|
1
|
+
1.6.1
|
@@ -32,7 +32,7 @@ module Kontena::Cli::Grids
|
|
32
32
|
|
33
33
|
if gridlist.size == 0
|
34
34
|
self.verbose? && puts
|
35
|
-
puts pastel.yellow("
|
35
|
+
puts pastel.yellow("Krates Master #{config.current_master.name} doesn't have any grids yet. Create one now using 'krates grid create' command")
|
36
36
|
self.verbose? && puts
|
37
37
|
else
|
38
38
|
vputs
|
data/lib/kontena/main_command.rb
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
require 'kontena/command'
|
2
2
|
|
3
3
|
class Kontena::MainCommand < Kontena::Command
|
4
|
-
option ['-v', '--version'], :flag, "Output
|
4
|
+
option ['-v', '--version'], :flag, "Output Krates CLI version #{Kontena::Cli::VERSION}" do
|
5
5
|
build_tags = [ 'ruby' + RUBY_VERSION ]
|
6
6
|
build_tags << RUBY_PLATFORM
|
7
7
|
build_tags += ENV["KONTENA_EXTRA_BUILDTAGS"].to_s.split(',')
|
8
|
-
puts ['
|
8
|
+
puts ['krates', Kontena::Cli::VERSION, "[#{build_tags.join('+')}]"].join(' ')
|
9
9
|
exit 0
|
10
10
|
end
|
11
11
|
|
12
12
|
banner Kontena.pastel.green("Getting started:"), false
|
13
|
-
banner ' - Create a
|
13
|
+
banner ' - Create a Krates Master (see "krates plugin search" for a list of', false
|
14
14
|
banner ' provisioning plugins)', false
|
15
|
-
banner ' - Or log into an existing master, use: "
|
16
|
-
banner ' - Read more about
|
15
|
+
banner ' - Or log into an existing master, use: "krates master login <master url>"', false
|
16
|
+
banner ' - Read more about Krates at https://krates.appsters.io/docs/', false
|
17
17
|
|
18
|
-
subcommand "master", "
|
19
|
-
subcommand "cloud", "
|
18
|
+
subcommand "master", "Krates Master specific commands", load_subcommand('master_command')
|
19
|
+
subcommand "cloud", "Krates Cloud specific commands", load_subcommand('cloud_command')
|
20
20
|
subcommand "node", "Node specific commands", load_subcommand('node_command')
|
21
21
|
subcommand "grid", "Grid specific commands", load_subcommand('grid_command')
|
22
22
|
subcommand "stack", "Stack specific commands", load_subcommand('stack_command')
|
@@ -6,7 +6,7 @@ module Kontena
|
|
6
6
|
Gem.autoload :DefaultUserInteraction, 'rubygems/user_interaction'
|
7
7
|
Gem.autoload :StreamUI, 'rubygems/user_interaction'
|
8
8
|
|
9
|
-
|
9
|
+
KRATES_PLUGIN = 'krates-plugin-%s'
|
10
10
|
|
11
11
|
# @return [Boolean] is the CLI in plugin debugging mode?
|
12
12
|
def plugin_debug?
|
@@ -26,11 +26,11 @@ module Kontena
|
|
26
26
|
end
|
27
27
|
module_function :use_dummy_ui
|
28
28
|
|
29
|
-
# Prefix a plugin name into a gem name (hello to
|
29
|
+
# Prefix a plugin name into a gem name (hello to krates-plugin-hello)
|
30
30
|
def prefix(plugin_name)
|
31
|
-
return
|
32
|
-
return plugin_name if plugin_name.start_with?('
|
33
|
-
|
31
|
+
return KRATES_PLUGIN % nil if plugin_name.nil? || plugin_name.empty?
|
32
|
+
return plugin_name if plugin_name.start_with?('krates-plugin-') || plugin_name.include?('.')
|
33
|
+
KRATES_PLUGIN % plugin_name
|
34
34
|
end
|
35
35
|
module_function :prefix
|
36
36
|
|
@@ -60,8 +60,8 @@ module Kontena
|
|
60
60
|
# @param [Gem::Specification] spec
|
61
61
|
# @return [Boolean]
|
62
62
|
def spec_has_valid_dependency?(spec)
|
63
|
-
|
64
|
-
!
|
63
|
+
krates = spec.runtime_dependencies.find{ |d| d.name == CLI_GEM }
|
64
|
+
!krates.match?(CLI_GEM, MIN_CLI_VERSION)
|
65
65
|
rescue
|
66
66
|
false
|
67
67
|
end
|
@@ -9,6 +9,9 @@ module Kontena
|
|
9
9
|
|
10
10
|
# Initialize plugin manager
|
11
11
|
def init
|
12
|
+
# TODO: Figure out how to co-exist with Bundler's post_reset hook
|
13
|
+
# that restores specs captured by Bundler's closure originally
|
14
|
+
Gem.post_reset_hooks.delete_if {|h| h.to_s.match /bundler/}
|
12
15
|
ENV["GEM_HOME"] = Common.install_dir
|
13
16
|
Gem.paths = ENV
|
14
17
|
Common.use_dummy_ui unless Kontena.debug?
|
data/lib/kontena/scripts/init
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
3
|
# This file exists mostly for backwards dependency to
|
4
|
-
# allow the old "which
|
4
|
+
# allow the old "which krates && . foofoo/init"
|
5
5
|
# completion loading
|
6
|
-
|
6
|
+
_krates_complete() {
|
7
7
|
COMPREPLY=()
|
8
8
|
local word="${COMP_WORDS[COMP_CWORD]}"
|
9
|
-
local completions="$(
|
9
|
+
local completions="$(krates complete ${COMP_WORDS[*]})"
|
10
10
|
COMPREPLY=( $(compgen -W "$completions" -- "$word") )
|
11
11
|
}
|
12
12
|
|
@@ -15,4 +15,4 @@ if [ "$ZSH_VERSION" != "" ]; then
|
|
15
15
|
autoload -U +X bashcompinit && bashcompinit
|
16
16
|
fi
|
17
17
|
|
18
|
-
which
|
18
|
+
which krates > /dev/null && complete -F _krates_complete krates
|
@@ -1,11 +1,11 @@
|
|
1
|
-
#compdef
|
1
|
+
#compdef krates
|
2
2
|
#autoload
|
3
3
|
|
4
|
-
|
4
|
+
_krates() {
|
5
5
|
local -a compreply
|
6
|
-
compreply=($(
|
7
|
-
_describe -t
|
6
|
+
compreply=($(krates complete ${words[*]}))
|
7
|
+
_describe -t krates 'krates' compreply
|
8
8
|
return 0
|
9
9
|
}
|
10
10
|
|
11
|
-
|
11
|
+
_krates
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: krates
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Tsurbeleu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|