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: 6d5a721d54bc2daeefb2c5dbc4ccf1ca355ff222
4
- data.tar.gz: 7b1cc51fb6c04cc4b2b04e76bfcba5998c8bbf76
3
+ metadata.gz: 967e712fd7d47ddba01d6c8e41f33cb1bb3633d1
4
+ data.tar.gz: 53e15bb98f5835e239bfb34c72714977b208654c
5
5
  SHA512:
6
- metadata.gz: 802471cb8eb0346b3dc1f23efadbc9af7be1ca4a2f3608ece513baac12de91b7e1247c8826fbf79fba11460df53b0cbbe6c84162fa2ee7e74421c96e0981d42f
7
- data.tar.gz: a5e48aeaf533f687afa45814caa4911481da5737692ecb11db86e8e34af522c7c6118ea8dfea73b79a709621f8232b270ad4aa92bb564c4ae1600dad3ed079de
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 deploy', 'stacks validate', 'stacks upgrade'
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
@@ -1,7 +1,7 @@
1
1
  module Kontena
2
2
  module Plugin
3
3
  module Shell
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
6
6
  end
7
7
  end
@@ -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.0
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-21 00:00:00.000000000 Z
11
+ date: 2017-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kontena-cli