kontena-plugin-shell 0.1.0 → 0.1.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 967e712fd7d47ddba01d6c8e41f33cb1bb3633d1
|
4
|
+
data.tar.gz: 53e15bb98f5835e239bfb34c72714977b208654c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bde24743050ab78b9b4e094c214819b59aaf42b8391d00ad74ad4f9a6425da064bc85452519db267d396bc859dcf746a7e526b742e64d7b75ab7e1b60da32da1
|
7
|
+
data.tar.gz: e9b04faa7d31047c9adc43594651484c6e92401a545c850d83900152a5862b31a7797474c13adaafe4e00406357bb76022be9b391ac1fd38c6223724174a7541
|
@@ -5,12 +5,12 @@ module Kontena
|
|
5
5
|
module Callbacks
|
6
6
|
class StackFile < Kontena::Callback
|
7
7
|
|
8
|
-
matches_commands 'stacks install', 'stacks
|
8
|
+
matches_commands 'stacks install', 'stacks validate', 'stacks upgrade'
|
9
9
|
|
10
10
|
def before
|
11
11
|
Kontena::Cli::Stacks::YAML::Reader.class_eval do
|
12
12
|
def self.new(*args)
|
13
|
-
if args.first == 'kontena.yml'
|
13
|
+
if args.first == 'kontena.yml' && !File.exist?('kontena.yml')
|
14
14
|
@tempfile = Tempfile.new('kontena.yml')
|
15
15
|
@tempfile.write(Kontena.prompt.multiline("Enter or paste a stack YAML").join)
|
16
16
|
@tempfile.close
|
@@ -46,6 +46,9 @@ module Kontena::Plugin
|
|
46
46
|
system('stty', stty_save) if stty_save
|
47
47
|
end
|
48
48
|
|
49
|
+
# Hook stack command kontena.yml content prompting
|
50
|
+
require 'kontena/plugin/shell/callbacks/stack_file'
|
51
|
+
|
49
52
|
Readline.completion_proc = Proc.new do |word|
|
50
53
|
line = Readline.line_buffer
|
51
54
|
tokens = line.shellsplit
|
data/lib/kontena_cli_plugin.rb
CHANGED
@@ -6,6 +6,5 @@ require 'kontena_cli' unless Object.const_defined?(:Kontena) && Kontena.const_de
|
|
6
6
|
|
7
7
|
require 'kontena/plugin/shell'
|
8
8
|
require 'kontena/plugin/shell/shell_command'
|
9
|
-
require 'kontena/plugin/shell/callbacks/stack_file'
|
10
9
|
|
11
10
|
Kontena::MainCommand.register("shell", "Kontena shell", Kontena::Plugin::Shell::ShellCommand)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kontena-plugin-shell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
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-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kontena-cli
|