vidar 0.8.2 → 0.9.0

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: 33c6520a9ed73273478c25d35cad43d5efd3ab267792cfe060ecc1a11bcf6b35
4
- data.tar.gz: 1a964a1b01c7b2995e565c52742384b5dadce9f1b0b3721cd38fbaac5871254a
3
+ metadata.gz: 15dd45da7e16f58b688350d8767d8445b674c7173b2f01c46f788cc9b79b2d0f
4
+ data.tar.gz: 469802aede88c5d866e18c689309b96f94d34d06176bed6f2918fac0409f304c
5
5
  SHA512:
6
- metadata.gz: 5355d26007de445626c0ff60e92ee09941138e0b7a3ea69e3c1c635c24e66ab49639773a8d78bc550ed4d2f14c52f37a3dfd8241649d7906f59d640206c4b6d5
7
- data.tar.gz: 17cd01e50418e19badccf8587d1d35a6b221052368169c8bbc0cd2411d8389da42849b6965965aa6f8bec622ac103deb5ec6aa2702c481c9e036f545fafe70be
6
+ metadata.gz: fdb7dddf5d6e845358ae7fb475023e3adf5569c833c6e797c195d14c6a12cf6f55b173632b6c84800e12331800f7521e294b9b23a827e34c73ba7ec4477f75a6
7
+ data.tar.gz: b00c62880fe67ed0ea65a1c24b849a6cb7feb8b6565c57496b8a918b6bc85ab6a56fb6f4ca1edfccb0182c40d7a1adbdcb43a65348200ae409055b2b8509f30c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vidar (0.8.2)
4
+ vidar (0.9.0)
5
5
  colorize
6
6
  faraday
7
7
  thor (~> 0.20)
@@ -19,14 +19,14 @@ GEM
19
19
  jaro_winkler (1.5.4)
20
20
  method_source (0.9.2)
21
21
  multipart-post (2.1.1)
22
- parallel (1.18.0)
22
+ parallel (1.19.0)
23
23
  parser (2.6.5.0)
24
24
  ast (~> 2.4.0)
25
25
  pry (0.12.2)
26
26
  coderay (~> 1.1.0)
27
27
  method_source (~> 0.9.0)
28
28
  rainbow (3.0.0)
29
- rake (13.0.0)
29
+ rake (13.0.1)
30
30
  rspec (3.9.0)
31
31
  rspec-core (~> 3.9.0)
32
32
  rspec-expectations (~> 3.9.0)
@@ -47,7 +47,7 @@ GEM
47
47
  rainbow (>= 2.2.2, < 4.0)
48
48
  ruby-progressbar (~> 1.7)
49
49
  unicode-display_width (>= 1.4.0, < 1.7)
50
- rubocop-performance (1.5.0)
50
+ rubocop-performance (1.5.1)
51
51
  rubocop (>= 0.71.0)
52
52
  ruby-progressbar (1.10.1)
53
53
  thor (0.20.3)
data/README.md CHANGED
@@ -56,6 +56,8 @@ deployments:
56
56
  compose_file: docker-compose.ci.yml
57
57
  # default_branch, optional, default value: master
58
58
  default_branch: dev
59
+ # console_command, optional, default value: bin/console
60
+ console_command: rake console
59
61
  ```
60
62
 
61
63
  ## Usage
@@ -78,6 +80,8 @@ Available commands are:
78
80
 
79
81
  `vidar kube_exec --name=web --command='bin/console'` - execute given command (`/bin/ssh` by default) inside the first pod with given name (all pods by default).
80
82
 
83
+ `vidar console --name=web` - execute console command (`bin/console` by default) inside the first pod with given name (all pods by default).
84
+
81
85
  ## Contributing
82
86
 
83
87
  Bug reports and pull requests are welcome on GitHub at https://github.com/RenoFi/vidar. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
data/lib/vidar/cli.rb CHANGED
@@ -138,7 +138,7 @@ module Vidar
138
138
  end
139
139
  end
140
140
 
141
- desc "kube_exec", "Execute given command in running pod"
141
+ desc "kube_exec", "Execute given command in the first running pod"
142
142
  method_option :command, default: "/bin/sh"
143
143
  method_option :name, required: false
144
144
  def kube_exec
@@ -164,5 +164,12 @@ module Vidar
164
164
  Run.kubectl("exec -it #{container.pod_name} -- #{options[:command]}")
165
165
  end
166
166
  end
167
+
168
+ desc "console", "Execute console command in the first running pod"
169
+ method_option :command, required: false
170
+ method_option :name, required: false
171
+ def console
172
+ invoke :kube_exec, name: options[:name], command: options[:command] || Config.get!(:kubectl_context)
173
+ end
167
174
  end
168
175
  end
data/lib/vidar/config.rb CHANGED
@@ -9,6 +9,7 @@ module Vidar
9
9
  revision: -> { `git rev-parse HEAD`.strip },
10
10
  revision_name: -> { `git show --pretty=format:"%s (%h)" -s HEAD`.strip },
11
11
  kubectl_context: -> { `kubectl config current-context`.strip },
12
+ console_command: -> { "bin/console" },
12
13
  }.freeze
13
14
 
14
15
  class << self
data/lib/vidar/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Vidar
2
- VERSION = '0.8.2'.freeze
2
+ VERSION = '0.9.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vidar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krzysztof Knapik
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-11-06 00:00:00.000000000 Z
12
+ date: 2019-11-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colorize