vagrant-commit 0.5.6 → 0.6

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
  SHA256:
3
- metadata.gz: 2cfbdc8188c8f8be3dc65e813f565193c073c27ff37af19094c8937c4a53ffb7
4
- data.tar.gz: 4ec0f10bfba013fc1364bdd0b27b49f5dc1f6fe7d86fc04f0869fac702c6bef8
3
+ metadata.gz: 3490e577682290c018ad28e96c72e9a11cd5008a5a8a1a61315cc6eb3de4e33f
4
+ data.tar.gz: 171f2b1e8d17c6160c6cb8f2d57313d1b8dedc55a7b4cee5e9992b8731fe5124
5
5
  SHA512:
6
- metadata.gz: e1a1a5dfd137c5f7476c7ff21a56ab5a19e52bdb19d2e3f51ada3effb44a30e3b3b523f1c4b5a4925a790137097bede8bdcab67eff40660fdfcc4ba053a7efe0
7
- data.tar.gz: bee875f21c3f79dd8817eabfda1b41456192530d5b48b19b7ab52b3b7204ab7227b73402dabbbaf338149bfdfed3c74a7dcdb30d6619adba6388a0a232efd5a6
6
+ metadata.gz: b15e4644c83585d77690c9ff1a946c2e57e06ef3ab526002325b3a42bb50e7a52675102280c18a317251e1e714c7fccd10333fc41202a78933a14a0761ed15f4
7
+ data.tar.gz: 1d75c04e006e0147a11140e009e3a7596f7fe5ff9db6e4e978e8f8ee541ef2a6d1f8fbd14da808f00f97f2ec54d1462ffec57ab4f9781d3192f61dcbfb351b4e
@@ -20,6 +20,8 @@ module Vagrant
20
20
  `sudo -E rm -rf #{backing}`
21
21
  end
22
22
 
23
+ # ? maybe with a config flag
24
+ # `sudo -E systemctl restart libvirtd`
23
25
 
24
26
  @app.call env
25
27
  end
@@ -57,4 +57,30 @@ module Vagrant
57
57
  end
58
58
  end
59
59
  end
60
+
61
+ module ShowInfo
62
+ class Command < Vagrant.plugin('2', :command)
63
+
64
+ def get_machine_info(machine)
65
+ {data_dir: machine.data_dir}
66
+ end
67
+
68
+ def execute
69
+ machines = {}
70
+
71
+ with_target_vms() do |machine|
72
+ machine_name = machine.name.to_s
73
+ machines[machine_name] = get_machine_info(machine)
74
+ end
75
+
76
+ if machines.length == 1
77
+ answer = machines.values[0]
78
+ else
79
+ answer = machines
80
+ end
81
+ answer = JSON.pretty_generate(answer)
82
+ @env.ui.info(answer)
83
+ end
84
+ end
85
+ end
60
86
  end
@@ -13,6 +13,11 @@ module Vagrant
13
13
  require_relative 'command'
14
14
  Vagrant::FullDestroy::Command
15
15
  end
16
+
17
+ command(:showinfo) do
18
+ require_relative 'command'
19
+ Vagrant::ShowInfo::Command
20
+ end
16
21
 
17
22
  end
18
23
  end
@@ -1,5 +1,5 @@
1
1
  module Vagrant
2
2
  module Commit
3
- VERSION = "0.5.6"
3
+ VERSION = "0.6"
4
4
  end
5
5
  end
@@ -16,4 +16,8 @@ Gem::Specification.new do |gem|
16
16
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ["lib"]
19
+
20
+ # gem.add_runtime_dependency "pry-byebug"
21
+ # gem.add_runtime_dependency "irb"
22
+
19
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-commit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: '0.6'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitalii Abetkin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-03 00:00:00.000000000 Z
11
+ date: 2019-06-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A Vagrant plugin that does qemu-img commit
14
14
  email: