k8sflow 0.12.0 → 0.12.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe138974923c31af7ba91c03df92e17cc81177be
4
- data.tar.gz: 038750df85f202b69a429b791b5c4df0a236c725
3
+ metadata.gz: 3d511f36f3f927c609c9faa3c22063c9fec510a9
4
+ data.tar.gz: eb0ed71a7af6fc36d8bd05b9ccd52f584aba5635
5
5
  SHA512:
6
- metadata.gz: 73003a7f4c67b31ac43839211e8c43b01cea661b1dbefca53d7519a71bfb022ca64768b990c48ecf7c4e0ad451ccc38e226f3d454040c7a6dce5a514b6dd82d7
7
- data.tar.gz: d05d5e563948faeb5b0f8070b54636c1fd6247348ed5e15f161e9e4852e7f496608998da32f05c498e9be25a046da09f040e8167784f01518bb05874865302e3
6
+ metadata.gz: d609c04cb0d88dfde632838216b4aee1cbfe970e0c2f16be9489cd3ce72b5ae5f7d950f55878e2f00531a7d4aa9cac10a2da5e0124ed131bb9ee82cb4d1215c0
7
+ data.tar.gz: 70c22a1c8a3e9e7e76a761c6090b1f3e7e1640c624afcfaf7b45b8c1690361b3ba4e784fafa1e2546772668623dee93080a5ad58680160953312ed271252904b
@@ -5,7 +5,7 @@ module K8sflow
5
5
  description: 'Mange docker image and run'
6
6
 
7
7
  option :registry, '-r', '--registry DOCKER_REPO', 'Docker registry to pull/fetch images'
8
- option :docker_api, "-H", "--host host", "docker api endpoint", default: "unix://"
8
+ option :docker_api, "-H", "--host host", "docker api endpoint", default: "unix:///var/run/docker.sock"
9
9
  option :tag, '-t', '--tag TAG', "Image tag", default: 'latest'
10
10
 
11
11
  end
@@ -56,7 +56,7 @@ $ k8sflow run -t 2.10 -p 3000:3000 'run server -p 3000'
56
56
 
57
57
  def env_vars(options)
58
58
  envs = {}
59
- if options.has_key?(:envs)
59
+ if options.key?(:envs)
60
60
  options[:envs].each do |e|
61
61
  sp = e.split("=")
62
62
  key = sp[0..-2].join("=")
@@ -65,11 +65,13 @@ $ k8sflow run -t 2.10 -p 3000:3000 'run server -p 3000'
65
65
  end
66
66
  end
67
67
 
68
- if options.has_key?(:varager_api) && options[:varager_api] != nil
68
+ if options.key?(:varager_api) && !options[:varager_api].empty?
69
69
  uri = options[:varager_api]
70
70
  token = options[:varager_token]
71
- client = K8sflow::Utils::Varager.new(token, uri)
72
- envs.merge!(client.envs(options[:app], false))
71
+ if uri && token
72
+ client = K8sflow::Utils::Varager.new(token, uri)
73
+ envs.merge!(client.envs(options[:app], false))
74
+ end
73
75
  end
74
76
  pp envs
75
77
  return envs
@@ -100,8 +102,8 @@ $ k8sflow run -t 2.10 -p 3000:3000 'run server -p 3000'
100
102
  container.start
101
103
  puts "container created with id: #{container.id}"
102
104
  if !options[:detach]
103
- puts "docker -H #{Docker.url} attach #{container.id}"
104
- exec("docker -H #{Docker.url} attach #{container.id}")
105
+ puts "docker -H #{::Docker.url} attach #{container.id}"
106
+ exec("docker -H #{::Docker.url} attach #{container.id}")
105
107
  end
106
108
  end
107
109
 
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  module K8sflow
3
- VERSION = '0.12.0'
3
+ VERSION = '0.12.2'
4
4
  VERSION_NAMES = {1 => 'France II',
5
5
  2 => 'R.C. Rickmers',
6
6
  3 => 'Thomas W. Lawson',
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: k8sflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antoine Legrand