vagrant-k3s 0.1.9 → 0.2.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: 531c149dd6d0de6d655a35127b1b11389333d977f31c3387771728cc7ee11872
4
- data.tar.gz: 2ea19543b1648df95f4924d218d1324a21b3cf3c5a1f3fe02d17f4046f568540
3
+ metadata.gz: 6fc69e7c04289cb8d32593223a3f2975e2fb43d4b85717a9afd0c5ad24263a03
4
+ data.tar.gz: 4a609ac40596eddb8082b6aca606adf6a6232f4ff7d2d5af3fc1fabf2c4fb95a
5
5
  SHA512:
6
- metadata.gz: a551fa11676834e4008941fa0a4074efbc319dd41e9a56ee6523ba37097e3e843eec8a755a77005f608dcfe4ee695eb4b60d2c740f5ec77aabbebbcbf7db0e8c
7
- data.tar.gz: f47aecb283dd1c526ffd72b0e334b733f42b808a859e402608a96b87fff0c902a5d2ca421daae81748a898d37426bd078bace6e8dd686500e8eb2b296aa7285c
6
+ metadata.gz: cf7132f0b03ea59c94ee00c182625b7990b370bce7c099a4dfe93afb1a2d6994c5c277f4c6023a9d84241d4612c4ee5a5cde8d41b00760ef2e423e833b02ca12
7
+ data.tar.gz: 11b15d3bb242e9227f5f5d281cb96d4930031243df9d578d64ea57a2cbbc393fa9b2cd876b57f7d6f5199dc008c19c8e920f1209f9d00b0a9acc98fdfaea390f
data/Gemfile.lock CHANGED
@@ -33,7 +33,7 @@ GIT
33
33
  PATH
34
34
  remote: .
35
35
  specs:
36
- vagrant-k3s (0.1.8)
36
+ vagrant-k3s (0.2.0)
37
37
 
38
38
  GEM
39
39
  remote: https://rubygems.org/
@@ -57,6 +57,10 @@ module VagrantPlugins
57
57
  # @return [Boolean]
58
58
  attr_accessor :skip_start
59
59
 
60
+ # Defaults to false
61
+ # @return [Boolean]
62
+ attr_accessor :skip_complete
63
+
60
64
  # # INSTALL_K3S_BIN_DIR
61
65
  # # @return [String]
62
66
  # attr_accessor :install_bin_dir
@@ -109,6 +113,7 @@ module VagrantPlugins
109
113
  @env_path = UNSET_VALUE
110
114
  @installer_url = UNSET_VALUE
111
115
  @skip_start = UNSET_VALUE
116
+ @skip_complete = UNSET_VALUE
112
117
  end
113
118
 
114
119
  def finalize!
@@ -123,6 +128,7 @@ module VagrantPlugins
123
128
  @env_path = DEFAULT_ENV_PATH if @env_path == UNSET_VALUE
124
129
  @installer_url = DEFAULT_INSTALLER_URL if @installer_url == UNSET_VALUE
125
130
  @skip_start = false if @skip_start == UNSET_VALUE
131
+ @skip_complete = false if @skip_complete == UNSET_VALUE
126
132
 
127
133
  if @args && args_valid?
128
134
  @args = @args.is_a?(Array) ? @args.map { |a| a.to_s } : @args.to_s
@@ -79,6 +79,19 @@ module VagrantPlugins
79
79
  outputs.values.map(&:close)
80
80
  end
81
81
 
82
+ @machine.ui.info "HELP #{config.skip_complete} ..."
83
+ if not config.skip_complete
84
+ outputs, handler = build_outputs
85
+ begin
86
+ @machine.ui.info 'Enabling K3s autocompletion ...'
87
+ @machine.communicate.sudo("k3s completion -i bash", error_key: :ssh_bad_exit_status_muted, &handler)
88
+ rescue Vagrant::Errors::VagrantError => e
89
+ @machine.ui.detail "#{e.extra_data[:stderr].chomp}", :color => :yellow
90
+ ensure
91
+ outputs.values.map(&:close)
92
+ end
93
+ end
94
+
82
95
  begin
83
96
  exe = "k3s"
84
97
  @machine.ui.info 'Checking the K3s version ...'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module VagrantPlugins
4
4
  module K3s
5
- VERSION = '0.1.9'
5
+ VERSION = '0.2.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-k3s
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Nola
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-07-14 00:00:00.000000000 Z
12
+ date: 2024-02-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake