vagrant-hvinfo 0.1.0 → 0.1.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 +4 -4
- data/Gemfile +2 -0
- data/README.md +14 -1
- data/lib/command.rb +3 -2
- data/vagrant-hvinfo.gemspec +12 -1
- metadata +9 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b2b16b11c81149bbff0b9d2f3f276063726abc9
|
4
|
+
data.tar.gz: a7a018caa0362ae7a29cc7316347041da1412b5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e159e12477709b98fb635938c0cfe5769696e3f2a8f19ac647eb9d1e8bb0ca8c4bf8d40e6dd84810db8ff795a12a52afa233d3328988fedd225f0cc906e95d0
|
7
|
+
data.tar.gz: 3c476b4e661753f47cb5f4fd4c848c5341fb12e930df157495da60e2fdfe3c630a4155191c07d555afc2636c11e0219145888fee76bd4581545733bf463b5d47
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
1
|
# vagrant-hvinfo plugin
|
2
2
|
|
3
|
-
|
3
|
+
This plugin prints information about Hyper-V virtual machines managed by vagrant in JSON format.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
```
|
7
|
+
# vagrant plugin install vagrant-hvinfo
|
8
|
+
```
|
9
|
+
|
10
|
+
## Usage
|
11
|
+
```
|
12
|
+
# vagrant hvinfo [output.json]
|
13
|
+
```
|
14
|
+
|
15
|
+
where output.json is the file to write to. If no file is specified the information is printed to stdout.
|
16
|
+
|
data/lib/command.rb
CHANGED
@@ -53,12 +53,13 @@ module VagrantPlugins
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
+
json_pretty = JSON.pretty_generate(vagrant_vms.values)
|
56
57
|
if argv.length == 0
|
57
|
-
puts
|
58
|
+
puts json_pretty
|
58
59
|
else
|
59
60
|
begin
|
60
61
|
file = File.open(argv[0], "w")
|
61
|
-
file.write(
|
62
|
+
file.write(json_pretty)
|
62
63
|
rescue IOError => e
|
63
64
|
puts "Failed to write results to file #{argv[0]}, error: #{e.inspect}"
|
64
65
|
rescue Errno::ENOENT => e
|
data/vagrant-hvinfo.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'vagrant-hvinfo'
|
3
|
-
spec.version = '0.1.
|
3
|
+
spec.version = '0.1.2'
|
4
4
|
spec.authors = ['Zhansong Li']
|
5
5
|
spec.email = ['lizhansong@hvariant.com']
|
6
6
|
spec.summary = 'Vagrant plugin for displaying information about Hyper-V VMs'
|
@@ -9,5 +9,16 @@ Gem::Specification.new do |spec|
|
|
9
9
|
|
10
10
|
spec.files = `git ls-files -z`.split("\x0")
|
11
11
|
spec.require_paths = ['lib']
|
12
|
+
|
13
|
+
spec.metadata = {
|
14
|
+
"homepage_uri" => 'https://github.com/hvariant/vagrant-hvinfo',
|
15
|
+
"source_code_uri" => 'https://github.com/hvariant/vagrant-hvinfo',
|
16
|
+
}
|
17
|
+
|
18
|
+
spec.required_ruby_version = '>= 2.3.3'
|
19
|
+
|
20
|
+
spec.requirements << 'vagrant'
|
21
|
+
spec.requirements << 'Powershell v3 or newer'
|
22
|
+
spec.requirements << 'Hyper-V'
|
12
23
|
end
|
13
24
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-hvinfo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zhansong Li
|
@@ -29,7 +29,9 @@ files:
|
|
29
29
|
homepage: https://github.com/hvariant/vagrant-hvinfo
|
30
30
|
licenses:
|
31
31
|
- MIT
|
32
|
-
metadata:
|
32
|
+
metadata:
|
33
|
+
homepage_uri: https://github.com/hvariant/vagrant-hvinfo
|
34
|
+
source_code_uri: https://github.com/hvariant/vagrant-hvinfo
|
33
35
|
post_install_message:
|
34
36
|
rdoc_options: []
|
35
37
|
require_paths:
|
@@ -38,13 +40,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
38
40
|
requirements:
|
39
41
|
- - ">="
|
40
42
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
43
|
+
version: 2.3.3
|
42
44
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
43
45
|
requirements:
|
44
46
|
- - ">="
|
45
47
|
- !ruby/object:Gem::Version
|
46
48
|
version: '0'
|
47
|
-
requirements:
|
49
|
+
requirements:
|
50
|
+
- vagrant
|
51
|
+
- Powershell v3 or newer
|
52
|
+
- Hyper-V
|
48
53
|
rubyforge_project:
|
49
54
|
rubygems_version: 2.5.2
|
50
55
|
signing_key:
|