kontena-plugin-shell 0.1.1 → 0.1.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: 967e712fd7d47ddba01d6c8e41f33cb1bb3633d1
4
- data.tar.gz: 53e15bb98f5835e239bfb34c72714977b208654c
3
+ metadata.gz: 224176b2e33d18439b83db9414b42880f81b3d2f
4
+ data.tar.gz: e17443d9aa7aad0903d601c396d88bee5e85a215
5
5
  SHA512:
6
- metadata.gz: bde24743050ab78b9b4e094c214819b59aaf42b8391d00ad74ad4f9a6425da064bc85452519db267d396bc859dcf746a7e526b742e64d7b75ab7e1b60da32da1
7
- data.tar.gz: e9b04faa7d31047c9adc43594651484c6e92401a545c850d83900152a5862b31a7797474c13adaafe4e00406357bb76022be9b391ac1fd38c6223724174a7541
6
+ metadata.gz: 1135d9b05e7e24d873e4b89ceed8d2de6650ee807637bc0c803c0ad2bd51cc0d20069eb9aeb7bba32cab18abad7b7a1f8d4f93b5d8fff88462e89386aa79a233
7
+ data.tar.gz: 0de7bb93ea664c32e6182c5da20abf7120a6d27e22255c301ba5c648bb231af2fb6d5963c655428cc0fd5adde12f76a820cf58397521717ddd0f7c3b69c19d1e
@@ -6,7 +6,7 @@ module Kontena::Plugin
6
6
 
7
7
  command 'do'
8
8
  description 'Run a batch of commands'
9
- help "Example:\n> batch do\n> master users ls\n> master ls\n> end"
9
+ help "Example:\n> batch do\n> master user ls\n> master ls\n> end"
10
10
  completions nil
11
11
 
12
12
  def execute
@@ -12,7 +12,7 @@ module Kontena::Plugin
12
12
  old_context = context.to_a.clone
13
13
  context.top
14
14
  session.run_command(args[1..-1].join(' '))
15
- context.concat(old_context)
15
+ context.concat(old_context) if context.empty?
16
16
  else
17
17
  context.top
18
18
  end
@@ -0,0 +1,27 @@
1
+ require 'kontena/plugin/shell/command'
2
+
3
+ module Kontena::Plugin
4
+ module Shell
5
+ class EnvCommand < Command
6
+ command 'env'
7
+ description 'Show or set environment variables'
8
+ help "Use 'env' to display all environment variables.\n" +
9
+ "Use 'env HOME' to display the value of $HOME.\n" +
10
+ "Use 'env KONTENA_URL=https://foo.example.com' to set an environment variable."
11
+ completions -> (context, tokens, word) { ENV.keys.select { |k| k.start_with?(word) } }
12
+
13
+ def execute
14
+ if args[1] && args[1].include?('=')
15
+ var, val = args[1].split('=', 2)
16
+ ENV[var]=val
17
+ Kontena::Cli::Config.reset_instance
18
+ elsif args[1]
19
+ puts ENV[args[1]]
20
+ else
21
+ puts ENV.map {|k,v| "#{k}=#{v}"}.join("\n")
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+
@@ -21,7 +21,11 @@ module Kontena::Plugin
21
21
  end
22
22
 
23
23
  def execute
24
- cmd.run([])
24
+ if cmd.subcommand_name && cmd.subcommand_name == 'shell'
25
+ puts Kontena.pastel.red("Already running inside KOSH")
26
+ else
27
+ cmd.run([])
28
+ end
25
29
  rescue Clamp::HelpWanted => ex
26
30
  unless args.include?('--help') || args.include?('-h')
27
31
  context.concat(args)
@@ -132,10 +132,10 @@ module Kontena::Plugin::Shell
132
132
  completion.push sub_commands
133
133
  end
134
134
  when 'master'
135
- sub_commands = %w(list use users current remove rm config cfg login logout token join audit-log init-cloud)
135
+ sub_commands = %w(list use user current remove rm config cfg login logout token join audit-log init-cloud)
136
136
  if words[1] && words[1] == 'use'
137
137
  completion.push helper.master_names
138
- elsif words[1] && words[1] == 'users'
138
+ elsif words[1] && words[1] == 'user'
139
139
  users_sub_commands = %(invite list role)
140
140
  completion.push users_sub_commands
141
141
  elsif words[1] && ['config', 'cfg'].include?(words[1])
@@ -1,7 +1,7 @@
1
1
  module Kontena
2
2
  module Plugin
3
3
  module Shell
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
6
6
  end
7
7
  end
@@ -0,0 +1,32 @@
1
+ module CliHelper
2
+ def self.included(base)
3
+ base.class_eval do
4
+ let(:client) { double(:client) }
5
+ let(:config) { double(:config) }
6
+
7
+ before(:each) do
8
+ allow(Kontena::Client).to receive(:new).and_return(client)
9
+ allow(Kontena::Cli::Config).to receive(:instance).and_return(config)
10
+ allow(config).to receive(:current_master).and_return(
11
+ Kontena::Cli::Config::Server.new(
12
+ name: 'testmaster',
13
+ grid: 'testgrid',
14
+ url: 'https://foo.example.com',
15
+ token: Kontena::Cli::Config::Token.new(
16
+ access_token: 'foo',
17
+ expires_at: 0
18
+ )
19
+ )
20
+ )
21
+ allow(config).to receive(:current_grid).and_return('testgrid')
22
+ allow(Dir).to receive(:home).and_return('/tmp/')
23
+ end
24
+
25
+ after(:each) do
26
+ RSpec::Mocks.space.proxy_for(File).reset
27
+ RSpec::Mocks.space.proxy_for(Kontena::Client).reset
28
+ RSpec::Mocks.space.proxy_for(Kontena::Cli::Config).reset
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,91 @@
1
+ require 'kontena/plugin/shell/command'
2
+ require 'kontena/plugin/shell/context'
3
+ require 'kontena/plugin/shell/session'
4
+
5
+ describe Kontena::Plugin::Shell::Command do
6
+ let(:subject) { Class.new(described_class) }
7
+
8
+ it 'can register commands' do
9
+ subject.class_eval do
10
+ command 'foo'
11
+ end
12
+ expect(subject.command).to eq 'foo'
13
+ expect(Kontena::Plugin::Shell.commands['foo']).to eq subject
14
+ end
15
+
16
+ it 'can register subcommands' do
17
+ subject.class_eval do
18
+ command 'foo'
19
+ subcommands self
20
+ end
21
+ expect(subject.has_subcommands?).to be_truthy
22
+ expect(subject.subcommands['foo']).to eq subject
23
+ end
24
+
25
+ it 'can define a description' do
26
+ subject.class_eval do
27
+ description 'foo'
28
+ end
29
+ expect(subject.description).to eq 'foo'
30
+ end
31
+
32
+ it 'can define help text' do
33
+ subject.class_eval do
34
+ help 'foo'
35
+ end
36
+ expect(subject.help).to eq 'foo'
37
+ end
38
+
39
+ it 'can define completions' do
40
+ subject.class_eval do
41
+ completions 'foo', 'bar'
42
+ end
43
+ expect(subject.completions).to eq ['foo', 'bar']
44
+ end
45
+
46
+ describe '#run' do
47
+ let(:command_class) {
48
+ klass = Class.new(Kontena::Plugin::Shell::Command)
49
+ klass.class_exec do
50
+ subcommand = Class.new(Kontena::Plugin::Shell::SubCommand)
51
+ subcommand.class_exec do
52
+ command 'bar'
53
+ def execute
54
+ args.last
55
+ end
56
+ end
57
+ command 'foo'
58
+ subcommands subcommand
59
+ def execute
60
+ end
61
+ end
62
+ klass
63
+ }
64
+
65
+ it 'changes context if subcommands exist but none given' do
66
+ context = Kontena::Plugin::Shell::Context.new(nil)
67
+ command_instance = command_class.new(context, ['foo'])
68
+ command_instance.run
69
+ expect(context.to_s).to eq 'foo'
70
+ end
71
+
72
+ it 'runs a subcommand if exists' do
73
+ command_instance = command_class.new([], ['foo', 'bar', 'test'])
74
+ expect(command_instance.run).to eq 'test'
75
+ end
76
+
77
+ it 'outputs an error if subcommand is unknown' do
78
+ command_instance = command_class.new([], ['foo', 'bra', 'test'])
79
+ expect{command_instance.run}.to output(/Unknown/).to_stdout
80
+ end
81
+
82
+ it 'rescues exceptions and prints out the message' do
83
+ command_class.class_exec do
84
+ instance_variable_set :@subcommands, []
85
+ end
86
+ command_instance = command_class.new([], ['foo'])
87
+ expect(command_instance).to receive(:execute).and_raise(StandardError, 'fooerror')
88
+ expect{command_instance.run}.to output(/fooerror/).to_stdout
89
+ end
90
+ end
91
+ end
@@ -0,0 +1,10 @@
1
+ describe Kontena::Plugin::Shell::BatchDoCommand do
2
+
3
+ context 'with args' do
4
+ it 'runs a batch of commands' do
5
+ allow(ENV).to receive(:[]=).with('DEBUG', 'true').and_return(nil)
6
+ allow(ENV).to receive(:delete).with('DEBUG').and_return(nil)
7
+ described_class.new([], ['do', 'debug', 'off;', 'debug', 'on'])
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,22 @@
1
+ describe Kontena::Plugin::Shell::ContextTopCommand do
2
+ it 'goes to top in context' do
3
+ context = Kontena::Plugin::Shell::Context.new(['foo', 'bar'])
4
+ described_class.new(context, ['/']).run
5
+ expect(context.to_s).to eq ''
6
+ end
7
+
8
+ it 'runs commands under top context if passed and keeps current context' do
9
+ session = Kontena::Plugin::Shell::Session.new(['foo', 'bar'])
10
+ expect(session).to receive(:run_command).with('dog cat').and_return(true)
11
+ described_class.new(session.context, ['/', 'dog', 'cat'], session).run
12
+ expect(session.context.to_s).to eq 'foo bar'
13
+ end
14
+
15
+ it 'runs commands under top context and changes to that context if it changes context' do
16
+ session = Kontena::Plugin::Shell::Session.new(['foo', 'bar'])
17
+ expect(session).to receive(:run_command).with('dog cat') { session.context.context=['dog', 'cat'] }
18
+ described_class.new(session.context, ['/', 'dog', 'cat'], session).run
19
+ expect(session.context.to_s).to eq 'dog cat'
20
+ end
21
+ end
22
+
@@ -0,0 +1,7 @@
1
+ describe Kontena::Plugin::Shell::ContextUpCommand do
2
+ it 'goes up in context' do
3
+ context = Kontena::Plugin::Shell::Context.new(['foo', 'bar'])
4
+ described_class.new(context, ['..']).run
5
+ expect(context.to_s).to eq 'foo'
6
+ end
7
+ end
@@ -0,0 +1,50 @@
1
+ describe Kontena::Plugin::Shell::DebugCommand do
2
+
3
+ context 'without args' do
4
+ it 'displays the current state of debug when debug is on' do
5
+ expect(ENV).to receive(:[]).with('DEBUG').and_return('true')
6
+ expect{described_class.new([], ['debug']).run}.to output(/Debug.*on/).to_stdout
7
+ end
8
+ it 'displays the current state of debug when debug is off' do
9
+ expect(ENV).to receive(:[]).with('DEBUG').and_return(nil)
10
+ expect{described_class.new([], ['debug']).run}.to output(/Debug.*off/).to_stdout
11
+ end
12
+ end
13
+
14
+ context 'enabling' do
15
+ it 'sets debug to true with "true"' do
16
+ expect(ENV).to receive(:[]=).with('DEBUG', 'true').and_return(nil)
17
+ expect{described_class.new([], ['debug', 'true']).run}.to output(/Debug/).to_stdout
18
+ end
19
+
20
+ it 'sets debug to true with "1"' do
21
+ expect(ENV).to receive(:[]=).with('DEBUG', 'true').and_return(nil)
22
+ expect{described_class.new([], ['debug', '1']).run}.to output(/Debug/).to_stdout
23
+ end
24
+
25
+ it 'sets debug to true with "on"' do
26
+ expect(ENV).to receive(:[]=).with('DEBUG', 'true').and_return(nil)
27
+ expect{described_class.new([], ['debug', 'on']).run}.to output(/Debug/).to_stdout
28
+ end
29
+
30
+ it 'sets debug to api with "api"' do
31
+ expect(ENV).to receive(:[]=).with('DEBUG', 'api').and_return(nil)
32
+ expect{described_class.new([], ['debug', 'api']).run}.to output(/Debug/).to_stdout
33
+ end
34
+ end
35
+
36
+ context 'disabling' do
37
+ it 'sets debug off with "false"' do
38
+ expect(ENV).to receive(:delete).with('DEBUG').and_return(nil)
39
+ expect{described_class.new([], ['debug', 'false']).run}.to output(/Debug/).to_stdout
40
+ end
41
+ it 'sets debug off with "off"' do
42
+ expect(ENV).to receive(:delete).with('DEBUG').and_return(nil)
43
+ expect{described_class.new([], ['debug', 'off']).run}.to output(/Debug/).to_stdout
44
+ end
45
+ it 'sets debug off with "0"' do
46
+ expect(ENV).to receive(:delete).with('DEBUG').and_return(nil)
47
+ expect{described_class.new([], ['debug', '0']).run}.to output(/Debug/).to_stdout
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,26 @@
1
+ require 'kontena/cli/config'
2
+
3
+ describe Kontena::Plugin::Shell::EnvCommand do
4
+ context 'no args' do
5
+ it 'displays current environment' do
6
+ expect{described_class.new([], ['env']).run}.to output(/[A-Z]+=.+?\n/).to_stdout
7
+ end
8
+ end
9
+
10
+ context 'env variable name arg' do
11
+ it 'displays requested environment variable value' do
12
+ expect(ENV).to receive(:[]).with('FOO').and_return("bar")
13
+ expect{described_class.new([], ['env', 'FOO']).run}.to output(/^bar$/m).to_stdout
14
+ end
15
+
16
+ end
17
+
18
+ context 'setting env variable' do
19
+ it 'sets env variable and reloads config' do
20
+ expect(ENV).to receive(:[]=).with('FOO', 'bar').and_return(true)
21
+ expect(Kontena::Cli::Config).to receive(:reset_instance)
22
+ described_class.new([], ['env', 'FOO=bar']).run
23
+ end
24
+ end
25
+ end
26
+
@@ -0,0 +1,5 @@
1
+ describe Kontena::Plugin::Shell::ExitCommand do
2
+ it 'exits cleanly' do
3
+ expect{described_class.new([], []).run}.to raise_error(SystemExit).and output(/Bye/).to_stdout
4
+ end
5
+ end
@@ -0,0 +1,13 @@
1
+ describe Kontena::Plugin::Shell::HelpCommand do
2
+ it 'displays help for kontena commands' do
3
+ expect{described_class.new([], ['help', 'grid', 'ls']).run}.to output(/Usage.*OPTIONS/m).to_stdout
4
+ end
5
+
6
+ it 'displays help for kosh commands' do
7
+ expect{described_class.new([], ['help', 'debug']).run}.to output(/toggle/m).to_stdout
8
+ end
9
+
10
+ it 'displays help for current context' do
11
+ expect{described_class.new(Kontena::Plugin::Shell::Context.new('master user'), ['help']).run}.to output(/SUBCOMMAND.*invite.*list.*/m).to_stdout
12
+ end
13
+ end
@@ -0,0 +1,30 @@
1
+ describe Kontena::Plugin::Shell::KontenaCommand do
2
+ context '#run' do
3
+ it 'should be able to run kontena commands' do
4
+ expect{described_class.new([], ['version', '--cli']).run}.to output(/cli:/).to_stdout
5
+ end
6
+
7
+ it 'should not run a shell inside a shell' do
8
+ expect{described_class.new([], ['shell']).run}.to output(/Already/).to_stdout
9
+ end
10
+
11
+ it 'should switch context if a command with subcommands is run without args' do
12
+ context = Kontena::Plugin::Shell::Context.new(nil)
13
+ described_class.new(context, ['master', 'user']).run
14
+ expect(context.to_s).to eq 'master user'
15
+ end
16
+ end
17
+
18
+ context 'completions' do
19
+ it 'should be able to complete kontena commands' do
20
+ expect(described_class.completions.first.call([], ['master', 'user'], 'l')).to include('invite', 'list')
21
+ end
22
+
23
+ end
24
+
25
+ context 'help' do
26
+ it 'should be able to get help for kontena commands' do
27
+ expect(described_class.help.call([], ['master', 'user'])).to match(/SUBCOMMAND.*invite.*list/m)
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,52 @@
1
+ require 'kontena/plugin/shell/context'
2
+
3
+ describe Kontena::Plugin::Shell::Context do
4
+
5
+ let(:subject) { described_class.new(nil) }
6
+
7
+ it 'creates an empty context' do
8
+ expect(subject.context).to be_empty
9
+ end
10
+
11
+ it 'creates a tokenized context from string' do
12
+ expect(described_class.new('foo "bar baz"').context).to eq(['foo', 'bar baz'])
13
+ end
14
+
15
+ it 'creates a tokenized context from an array' do
16
+ expect(described_class.new(['foo', 'bar']).context).to eq(['foo', 'bar'])
17
+ end
18
+
19
+ describe '#up' do
20
+ it 'goes up' do
21
+ subject.concat(['foo', 'bar'])
22
+ subject.up
23
+ expect(subject.to_s).to eq 'foo'
24
+ end
25
+ end
26
+
27
+ describe '#top' do
28
+ it 'clears the context' do
29
+ subject.concat(['foo', 'bar'])
30
+ subject.top
31
+ expect(subject.to_s).to eq ''
32
+ end
33
+ end
34
+
35
+ describe '#concat' do
36
+ it 'adds to the context' do
37
+ subject.concat(['foo', 'bar'])
38
+ expect(subject.to_s).to eq 'foo bar'
39
+ end
40
+
41
+ it 'only adds everything up to an option' do
42
+ subject.concat(['foo', 'bar', '--help'])
43
+ expect(subject.to_s).to eq 'foo bar'
44
+ end
45
+
46
+ it 'only adds everything up to --' do
47
+ subject.concat(['foo', 'bar', '--', 'bar'])
48
+ expect(subject.to_s).to eq 'foo bar'
49
+ end
50
+ end
51
+ end
52
+
@@ -0,0 +1,14 @@
1
+ require 'kontena/plugin/shell/session'
2
+ require 'kontena/plugin/shell/context'
3
+
4
+ describe Kontena::Plugin::Shell::Session do
5
+ include CliHelper
6
+
7
+ let(:context) { spy(Kontena::Plugin::Shell::Context.new(nil)) }
8
+ let(:subject) { described_class.new(context) }
9
+
10
+ it 'runs commands' do
11
+ expect(Readline).to receive(:readline).and_return('exit')
12
+ expect{subject.run}.to output(/Bye/).to_stdout.and raise_error(SystemExit)
13
+ end
14
+ end
@@ -0,0 +1,23 @@
1
+ require 'kontena_cli'
2
+ require 'kontena_cli_plugin'
3
+
4
+ RSpec.configure do |config|
5
+ config.expect_with :rspec do |expectations|
6
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
7
+ end
8
+
9
+ config.mock_with :rspec do |mocks|
10
+ mocks.verify_partial_doubles = true
11
+ end
12
+
13
+ config.filter_run :focus
14
+ config.run_all_when_everything_filtered = true
15
+ config.disable_monkey_patching!
16
+ config.expose_dsl_globally = true
17
+ #config.warnings = true
18
+ config.default_formatter = 'doc' if config.files_to_run.one?
19
+ config.order = :random
20
+ Kernel.srand config.seed
21
+ end
22
+
23
+ require_relative 'helpers/cli_helper'
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kontena-plugin-shell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.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: 2017-04-24 00:00:00.000000000 Z
11
+ date: 2017-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kontena-cli
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.0.rc1
19
+ version: '1.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.0.rc1
26
+ version: '1.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -74,15 +74,10 @@ executables:
74
74
  extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
- - ".gitignore"
78
77
  - ".rspec"
79
- - ".travis.yml"
80
- - Gemfile
81
78
  - LICENSE.txt
82
79
  - README.md
83
80
  - bin/kosh
84
- - kontena-plugin-shell.gemspec
85
- - kosh.gif
86
81
  - lib/kontena/plugin/shell.rb
87
82
  - lib/kontena/plugin/shell/callbacks/stack_file.rb
88
83
  - lib/kontena/plugin/shell/command.rb
@@ -91,6 +86,7 @@ files:
91
86
  - lib/kontena/plugin/shell/commands/context_top.rb
92
87
  - lib/kontena/plugin/shell/commands/context_up.rb
93
88
  - lib/kontena/plugin/shell/commands/debug.rb
89
+ - lib/kontena/plugin/shell/commands/env.rb
94
90
  - lib/kontena/plugin/shell/commands/exit.rb
95
91
  - lib/kontena/plugin/shell/commands/help.rb
96
92
  - lib/kontena/plugin/shell/commands/kontena.rb
@@ -100,6 +96,19 @@ files:
100
96
  - lib/kontena/plugin/shell/shell_command.rb
101
97
  - lib/kontena/plugin/shell/version.rb
102
98
  - lib/kontena_cli_plugin.rb
99
+ - spec/helpers/cli_helper.rb
100
+ - spec/kontena/plugin/shell/command_spec.rb
101
+ - spec/kontena/plugin/shell/commands/batch_do_spec.rb
102
+ - spec/kontena/plugin/shell/commands/context_top_spec.rb
103
+ - spec/kontena/plugin/shell/commands/context_up_spec.rb
104
+ - spec/kontena/plugin/shell/commands/debug_spec.rb
105
+ - spec/kontena/plugin/shell/commands/env_spec.rb
106
+ - spec/kontena/plugin/shell/commands/exit_spec.rb
107
+ - spec/kontena/plugin/shell/commands/help_spec.rb
108
+ - spec/kontena/plugin/shell/commands/kontena_spec.rb
109
+ - spec/kontena/plugin/shell/context_spec.rb
110
+ - spec/kontena/plugin/shell/session_spec.rb
111
+ - spec/spec_helper.rb
103
112
  homepage: https://github.com/kontena/kontena-plugin-shell
104
113
  licenses:
105
114
  - Apache-2.0
@@ -120,8 +129,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
129
  version: '0'
121
130
  requirements: []
122
131
  rubyforge_project:
123
- rubygems_version: 2.4.5
132
+ rubygems_version: 2.4.8
124
133
  signing_key:
125
134
  specification_version: 4
126
135
  summary: Kontena interactive shell plugin
127
- test_files: []
136
+ test_files:
137
+ - ".rspec"
data/.gitignore DELETED
@@ -1,16 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- /coverage/
11
- *.gem
12
- .ruby-version
13
- .ruby-gemset
14
- .rvmrc
15
- .env
16
- .rspec-local
data/.travis.yml DELETED
@@ -1,16 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.1.10
4
- - 2.2.6
5
- - 2.3.3
6
- - 2.4.1
7
- env:
8
- - secure: "kvAs0Ys79sVx24cxuhJW1L4ABkemMCD2G767e8Vjp8VAbmgJBOiD+hU11ADe5/1ZDrDZ5NVsTqucVI4lyLohLzLU61AwQsgpNPcsBtBqhHvWdYnTVZhRz7v9xirXa3heS/jbxJxrWBgCRdgBLj1xWBHhQALJSDynKtqm5HbDOrfsB621KQ+WsunU5swou+cxKTye3nJZVDABaH8w8qFEJ0aUkeqNT2O4Tfgbr3reu6DQGKBpBuuSAzlwW1SFjaosW2Yedp+hpRgm1j9HHbao7i8dqv3BXckeMbEv4DUCWQqOWOsj62izTMDRqULNxxU547MPG9O7sq+yW4eC6B9SV4PqyCLeZVpRAgbz/u6YQmRLCquOyoWfaEKzWkC3kqmzn84K83qbvYW7GgG9p/JOCmFXb+StyvORV8LL6iB/D/W2oII3PTG7Mtj+6yRdzRGenYWY95LOTrR78VsCEy6iuAsnwsGKJmsiW/n7Yapgqf6mFwSvCJnMe0/POioo//TkuSSc7smGWQkLOatut0CNBaceFABMRRip4xGE8LUt1j7ql0qDOVoReqKe0XzaNuDi+Eu9cPL1cCSC4g1MWxFWsprYudaiHVY+k3F4nEsV+Mivms8uck2ae+Wv4blY2F5yX7VUP/F/nY57VIaTWbo4y8+TegNNTt6BiqAEF8cI8B4="
9
- cache: bundler
10
- script: bundle install && bundle exec rspec spec/
11
- deploy:
12
- provider: rubygems
13
- api_key: $GEM_TOKEN
14
- gem: kontena-plugin-shell
15
- on:
16
- tags: true
data/Gemfile DELETED
@@ -1,8 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- group :development do
6
- gem 'byebug'
7
- gem 'rspec'
8
- end
@@ -1,26 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib/', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
-
5
- require 'kontena/plugin/shell/version'
6
-
7
- Gem::Specification.new do |spec|
8
- spec.name = "kontena-plugin-shell"
9
- spec.version = Kontena::Plugin::Shell::VERSION
10
- spec.authors = ["Kontena, Inc."]
11
- spec.email = ["info@kontena.io"]
12
-
13
- spec.summary = "Kontena interactive shell plugin"
14
- spec.description = "Interactive shell for Kontena CLI aka KOSH"
15
- spec.homepage = "https://github.com/kontena/kontena-plugin-shell"
16
- spec.license = "Apache-2.0"
17
-
18
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|\.gif)/}) }
19
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
- spec.require_paths = ["lib"]
21
-
22
- spec.add_runtime_dependency 'kontena-cli', '>= 1.0.0.rc1'
23
- spec.add_development_dependency "bundler", "~> 1.11"
24
- spec.add_development_dependency "rake", "~> 10.0"
25
- spec.add_development_dependency "rspec", "~> 3.5"
26
- end
data/kosh.gif DELETED
Binary file