VagrantHyperV 0.0.1

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.
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format specdoc
2
+ --color
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in VagrantHyperV.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Ezekiel Smithburg
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # VagrantHyperV
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'VagrantHyperV'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install VagrantHyperV
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'VagrantHyperV/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "VagrantHyperV"
8
+ gem.version = VagrantHyperV::VERSION
9
+ gem.authors = ["Ezekiel Smithburg"]
10
+ gem.email = ["tehgeekmeister@gmail.com"]
11
+ gem.description = %q{This is a HyperV provider for vagrant.}
12
+ gem.summary = %q{This is a HyperV provider for vagrant.}
13
+ gem.homepage = ""
14
+ gem.license = "MIT"
15
+
16
+ gem.files = `git ls-files`.split($/)
17
+ gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
+ gem.require_paths = ["lib"]
20
+
21
+ gem.add_development_dependency "rake"
22
+ end
@@ -0,0 +1,3 @@
1
+ module VagrantHyperV
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,11 @@
1
+ require "VagrantHyperV/version"
2
+
3
+ module VagrantHyperV
4
+ class VagrantHyperV < Vagrant.plugin("2")
5
+ name "VagrantHyperV"
6
+ provider "vagrant_hyperv" do
7
+ require_relative "provider"
8
+ provider
9
+ end
10
+ end
11
+ end
data/lib/provider.rb ADDED
@@ -0,0 +1,60 @@
1
+ class Provider < Vagrant.plugin(2, :provider)
2
+ # Initialize the provider to represent the given machine.
3
+ #
4
+ # @param [Vagrant::Machine] machine The machine that this provider
5
+ # is responsible for.
6
+ def initialize(machine)
7
+ end
8
+
9
+ # This should return an action callable for the given name.
10
+ #
11
+ # @param [Symbol] name Name of the action.
12
+ # @return [Object] A callable action sequence object, whether it
13
+ # is a proc, object, etc.
14
+ def action(name)
15
+ nil
16
+ end
17
+
18
+ # This method is called if the underying machine ID changes. Providers
19
+ # can use this method to load in new data for the actual backing
20
+ # machine or to realize that the machine is now gone (the ID can
21
+ # become `nil`). No parameters are given, since the underlying machine
22
+ # is simply the machine instance given to this object. And no
23
+ # return value is necessary.
24
+ def machine_id_changed
25
+ end
26
+
27
+ # This should return a hash of information that explains how to
28
+ # SSH into the machine. If the machine is not at a point where
29
+ # SSH is even possible, then `nil` should be returned.
30
+ #
31
+ # The general structure of this returned hash should be the
32
+ # following:
33
+ #
34
+ # {
35
+ # :host => "1.2.3.4",
36
+ # :port => "22",
37
+ # :username => "mitchellh",
38
+ # :private_key_path => "/path/to/my/key"
39
+ # }
40
+ #
41
+ # **Note:** Vagrant only supports private key based authentication,
42
+ # mainly for the reason that there is no easy way to exec into an
43
+ # `ssh` prompt with a password, whereas we can pass a private key
44
+ # via commandline.
45
+ #
46
+ # @return [Hash] SSH information. For the structure of this hash
47
+ # read the accompanying documentation for this method.
48
+ def ssh_info
49
+ nil
50
+ end
51
+
52
+ # This should return the state of the machine within this provider.
53
+ # The state must be an instance of {MachineState}. Please read the
54
+ # documentation of that class for more information.
55
+ #
56
+ # @return [MachineState]
57
+ def state
58
+ nil
59
+ end
60
+ end
@@ -0,0 +1,9 @@
1
+ describe VagrantHyperV do
2
+ it 'should have a version number' do
3
+ VagrantHyperV::VERSION.should_not be_nil
4
+ end
5
+
6
+ it 'should do something useful' do
7
+ false.should be_true
8
+ end
9
+ end
@@ -0,0 +1,2 @@
1
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
+ require 'VagrantHyperV'
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: VagrantHyperV
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Ezekiel Smithburg
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-07-28 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ description: This is a HyperV provider for vagrant.
31
+ email:
32
+ - tehgeekmeister@gmail.com
33
+ executables: []
34
+ extensions: []
35
+ extra_rdoc_files: []
36
+ files:
37
+ - .gitignore
38
+ - .rspec
39
+ - Gemfile
40
+ - LICENSE.txt
41
+ - README.md
42
+ - Rakefile
43
+ - VagrantHyperV.gemspec
44
+ - lib/VagrantHyperV.rb
45
+ - lib/VagrantHyperV/version.rb
46
+ - lib/provider.rb
47
+ - spec/VagrantHyperV_spec.rb
48
+ - spec/spec_helper.rb
49
+ homepage: ''
50
+ licenses:
51
+ - MIT
52
+ post_install_message:
53
+ rdoc_options: []
54
+ require_paths:
55
+ - lib
56
+ required_ruby_version: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ required_rubygems_version: !ruby/object:Gem::Requirement
63
+ none: false
64
+ requirements:
65
+ - - ! '>='
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ requirements: []
69
+ rubyforge_project:
70
+ rubygems_version: 1.8.24
71
+ signing_key:
72
+ specification_version: 3
73
+ summary: This is a HyperV provider for vagrant.
74
+ test_files:
75
+ - spec/VagrantHyperV_spec.rb
76
+ - spec/spec_helper.rb