vagrant-hvinfo 0.1.0 → 0.1.2

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
  SHA1:
3
- metadata.gz: 312a031bc37938d42595aa565bb7ca183b4c9c20
4
- data.tar.gz: a24bd31a3e4a4f0088153dc76ccaa4bb69bb70fc
3
+ metadata.gz: 2b2b16b11c81149bbff0b9d2f3f276063726abc9
4
+ data.tar.gz: a7a018caa0362ae7a29cc7316347041da1412b5c
5
5
  SHA512:
6
- metadata.gz: 4dbbf037e8883ad7fc35ef29201ad663b2b28db0d111f8925a53068b301f70cb66fbe428e3f4fdaccce691948b9737c1d647c868f83a175de43bc56e8bb83d69
7
- data.tar.gz: f4fb11f2ed0cccea51a570c7d69d2fe9dec13387b37c37baee6b46187ec95e77c5560fb86453fb9c14031f33a3ba6a164fd801758915e0a8bf7abb76ef3e7578
6
+ metadata.gz: 7e159e12477709b98fb635938c0cfe5769696e3f2a8f19ac647eb9d1e8bb0ca8c4bf8d40e6dd84810db8ff795a12a52afa233d3328988fedd225f0cc906e95d0
7
+ data.tar.gz: 3c476b4e661753f47cb5f4fd4c848c5341fb12e930df157495da60e2fdfe3c630a4155191c07d555afc2636c11e0219145888fee76bd4581545733bf463b5d47
data/Gemfile CHANGED
@@ -1,5 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
 
3
+ ruby '>= 2.3.3'
4
+
3
5
  group :development do
4
6
  gem 'vagrant', git: 'https://github.com/hashicorp/vagrant.git', :tag => 'v2.2.1'
5
7
  end
data/README.md CHANGED
@@ -1,3 +1,16 @@
1
1
  # vagrant-hvinfo plugin
2
2
 
3
- WIP
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 vagrant_vms.values.inspect
58
+ puts json_pretty
58
59
  else
59
60
  begin
60
61
  file = File.open(argv[0], "w")
61
- file.write(vagrant_vms.values.inspect)
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'vagrant-hvinfo'
3
- spec.version = '0.1.0'
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.0
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: '0'
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: