kontena-cli 1.4.1 → 1.4.2.pre1

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
  SHA256:
3
- metadata.gz: bc0cf4ef083034fa04ac4aa59f3bb9f68c9e40563be4df65d04a0217f0b3bff7
4
- data.tar.gz: 5fcf144a8abf539375293ac36567eed95fc223da3d39a3508cd41577afa02c10
3
+ metadata.gz: 1d83ecd393990f31582a50935e3f654d2bb80d800f5b5d196aa3dd37fb8384fb
4
+ data.tar.gz: '06882cc66e76fea42a919d1d8b3df32980f3f28bd20e5f72252f14ccb2537cb0'
5
5
  SHA512:
6
- metadata.gz: fa5c614ad23023920eec81cf0713a2dd57cd540768810a673d561f492dc66b6372f79aa8273021d1f5132cc19447f723cbfa6c3ace67fac841d7e250e24522ad
7
- data.tar.gz: 480e8ff9ce1ec2cf247a311e6cf31ce574d6c956ea64bd6309cc9193694a46aadc23c9f5f65d8acd8fdf74bb0f940df367a5bad5d85ba8dbc97502355e9365de
6
+ metadata.gz: 7cb24f24e500a85564e50180cdf1f846f168320aafb4c612df7c112dcf8b090e3d085d0933550d080629743f97988a8ece671d4d11ca1df89a3c8ca1d113a42c
7
+ data.tar.gz: 4a3bd5066d50938bcd3dba051f4a61cfdf89e7cad81af0eb01a2297c3027db3aafd45ee773d9da33681cbffa6ab550ba2ef6bfcd650139337f83c25fac488043
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.1
1
+ 1.4.2.pre1
@@ -22,7 +22,7 @@ module Kontena::Cli::Certificate
22
22
  end
23
23
 
24
24
  def ask_continue
25
- puts "By registering, you agree on Let's Encrypt Terms of Service: https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf"
25
+ puts "By registering, you agree on Let's Encrypt Terms of Service: https://letsencrypt.org/documents/2017.11.15-LE-SA-v1.2.pdf"
26
26
  exit_with_error "Registration canceled!" unless prompt.yes?("Continue?")
27
27
  true
28
28
  end
@@ -9,13 +9,14 @@ module Kontena::Cli::Stacks
9
9
  deployment = client.get("stacks/#{deployment['stack_id']}/deploys/#{deployment['id']}")
10
10
  end
11
11
  if deployment['state'] == 'error'
12
+ puts "Stack deploy failed"
12
13
  deployment['service_deploys'].each do |service_deploy|
13
14
  if service_deploy['state'] == 'error'
14
- puts " #{service_deploy['reason']}"
15
+ puts " - #{service_deploy['reason']}"
15
16
  end
16
17
  end
17
18
 
18
- raise 'deploy failed'
19
+ abort
19
20
  end
20
21
  end
21
22
 
@@ -32,7 +32,7 @@ module Kontena::Cli::Volumes
32
32
  end
33
33
 
34
34
  def parse_driver_opts
35
- driver_opt_list.map{|opt| opt.split '='}.to_h
35
+ driver_opt_list.map{ |opt| opt.split('=', 2) }.to_h
36
36
  end
37
37
 
38
38
  def create_volume(volume)
@@ -43,6 +43,6 @@ describe Kontena::Cli::Stacks::DeployCommand do
43
43
  })
44
44
  expect(subject).to receive(:sleep).once
45
45
 
46
- expect{subject.run(['test-stack'])}.to exit_with_error.and output(/deploy failed/).to_stderr
46
+ expect{subject.run(['test-stack'])}.to exit_with_error.and output(/Stack deploy failed/).to_stdout
47
47
  end
48
48
  end
@@ -0,0 +1,17 @@
1
+ require 'kontena/cli/volumes/create_command'
2
+
3
+ describe Kontena::Cli::Volumes::CreateCommand do
4
+ let(:subject) { described_class.new("kontena") }
5
+
6
+ describe '#parse_driver_opts' do
7
+ it 'parses driver opts' do
8
+ allow(subject).to receive(:driver_opt_list).and_return([
9
+ 'foo=bar',
10
+ 'o=addr=XXX.XXX.XXX.XXX,rw,nfsvers=3,nolock,proto=udp,port=2049'
11
+ ])
12
+ opts = subject.parse_driver_opts
13
+ expect(opts['foo']).to eq('bar')
14
+ expect(opts['o']).to eq('addr=XXX.XXX.XXX.XXX,rw,nfsvers=3,nolock,proto=udp,port=2049')
15
+ end
16
+ end
17
+ end
data/spec/spec_helper.rb CHANGED
@@ -27,7 +27,8 @@ RSpec.configure do |config|
27
27
  # --seed 1234
28
28
  config.order = 'random'
29
29
  config.before(:each) do
30
- allow(Dir).to receive(:home).and_return('/tmp/')
30
+ @_temp_home_dir = Dir.mktmpdir
31
+ allow(Dir).to receive(:home).and_return(@_temp_home_dir)
31
32
  allow(ENV).to receive(:[]).with(anything).and_call_original
32
33
  allow(ENV).to receive(:[]).with('DEBUG').and_call_original
33
34
  Kontena::Cli::Config.reset_instance
@@ -41,7 +42,7 @@ RSpec.configure do |config|
41
42
  config.after(:each) do
42
43
  RSpec::Mocks.space.proxy_for(File).reset
43
44
  RSpec::Mocks.space.proxy_for(Kontena::Cli::Config).reset
44
- File.unlink(Kontena::Cli::Config.default_config_filename) if File.exist?(Kontena::Cli::Config.default_config_filename)
45
+ FileUtils.remove_entry @_temp_home_dir if @_temp_home_dir
45
46
  end
46
47
 
47
48
  config.around(:each) do |example|
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.4.1
4
+ version: 1.4.2.pre1
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-11-24 00:00:00.000000000 Z
11
+ date: 2017-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -654,6 +654,7 @@ files:
654
654
  - spec/kontena/cli/vault/update_command_spec.rb
655
655
  - spec/kontena/cli/vault/write_command_spec.rb
656
656
  - spec/kontena/cli/version_command_spec.rb
657
+ - spec/kontena/cli/volumes/create_command_spec.rb
657
658
  - spec/kontena/cli/volumes/list_command_spec.rb
658
659
  - spec/kontena/cli/vpn/create_command_spec.rb
659
660
  - spec/kontena/client_spec.rb
@@ -691,12 +692,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
691
692
  version: 2.1.0
692
693
  required_rubygems_version: !ruby/object:Gem::Requirement
693
694
  requirements:
694
- - - ">="
695
+ - - ">"
695
696
  - !ruby/object:Gem::Version
696
- version: '0'
697
+ version: 1.3.1
697
698
  requirements: []
698
699
  rubyforge_project:
699
- rubygems_version: 2.7.2
700
+ rubygems_version: 2.7.3
700
701
  signing_key:
701
702
  specification_version: 4
702
703
  summary: Kontena command line tool
@@ -827,6 +828,7 @@ test_files:
827
828
  - spec/kontena/cli/vault/update_command_spec.rb
828
829
  - spec/kontena/cli/vault/write_command_spec.rb
829
830
  - spec/kontena/cli/version_command_spec.rb
831
+ - spec/kontena/cli/volumes/create_command_spec.rb
830
832
  - spec/kontena/cli/volumes/list_command_spec.rb
831
833
  - spec/kontena/cli/vpn/create_command_spec.rb
832
834
  - spec/kontena/client_spec.rb