VagrantHyperV 0.0.4 → 0.0.5.pre

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/Gemfile CHANGED
@@ -2,3 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in VagrantHyperV.gemspec
4
4
  gemspec
5
+
6
+ gem 'vagrant', github: 'mitchellh/vagrant'
data/README.md CHANGED
@@ -1,29 +1,10 @@
1
1
  # VagrantHyperV
2
2
 
3
- TODO: Write a gem description
3
+ This is a Vagrant plugin that will hopefully become a HyperV provider. It doesn't do anything useful yet, but it can be installed in Vagrant already, if you feel like that for some reason.
4
4
 
5
- ## Installation
5
+ Installation Instructions
6
+ =========================
6
7
 
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
8
+ ```
9
+ vagrant plugin install VagrantHyperV
10
+ ```
data/Rakefile CHANGED
@@ -1 +1,7 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec) do |t|
5
+ t.rspec_opts = %w(--format documentation --colour)
6
+ end
7
+ task :default => :spec
@@ -4,19 +4,23 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'VagrantHyperV/version'
5
5
 
6
6
  Gem::Specification.new do |gem|
7
- gem.name = "VagrantHyperV"
7
+ gem.name = 'VagrantHyperV'
8
8
  gem.version = VagrantHyperV::VERSION
9
- gem.authors = ["Ezekiel Smithburg"]
10
- gem.email = ["tehgeekmeister@gmail.com"]
9
+ gem.authors = ['Ezekiel Smithburg']
10
+ gem.email = ['tehgeekmeister@gmail.com']
11
11
  gem.description = %q{This is a HyperV provider for vagrant. It doesn't quite work yet.}
12
12
  gem.summary = %q{This is a HyperV provider for vagrant.}
13
- gem.homepage = ""
14
- gem.license = "MIT"
13
+ gem.homepage = ''
14
+ gem.license = 'MIT'
15
15
 
16
16
  gem.files = `git ls-files`.split($/)
17
17
  gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
18
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
- gem.require_paths = ["lib"]
19
+ gem.require_paths = ['lib']
20
20
 
21
- gem.add_development_dependency "rake"
21
+ gem.add_development_dependency 'rake'
22
+ gem.add_development_dependency 'rspec'
23
+ gem.add_development_dependency 'rspec-mocks'
24
+
25
+ gem.add_dependency 'vagrant', '>= 1.2'
22
26
  end
@@ -1,3 +1,3 @@
1
1
  module VagrantHyperV
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5.pre"
3
3
  end
data/lib/VagrantHyperV.rb CHANGED
@@ -1,10 +1,11 @@
1
- require "VagrantHyperV/version"
1
+ require 'VagrantHyperV/version'
2
+ require 'vagrant'
2
3
 
3
4
  module VagrantHyperV
4
- class VagrantHyperV < Vagrant.plugin("2")
5
- name "VagrantHyperV"
6
- provider "vagrant_hyperv" do
7
- require_relative "provider"
5
+ class VagrantHyperV < Vagrant.plugin('2')
6
+ name 'VagrantHyperV'
7
+ provider 'vagrant_hyperv' do
8
+ require_relative 'provider'
8
9
  Provider
9
10
  end
10
11
  end
data/lib/action.rb ADDED
@@ -0,0 +1,2 @@
1
+ class Action
2
+ end
data/lib/provider.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  class Provider < Vagrant.plugin(2, :provider)
2
- name "vagrant_hyperv"
3
2
  # Initialize the provider to represent the given machine.
4
3
  #
5
4
  # @param [Vagrant::Machine] machine The machine that this provider
@@ -13,7 +12,11 @@ class Provider < Vagrant.plugin(2, :provider)
13
12
  # @return [Object] A callable action sequence object, whether it
14
13
  # is a proc, object, etc.
15
14
  def action(name)
16
- nil
15
+ puts "#{name} was called"
16
+ case name
17
+ when :up then ->(a) {self.action :start}
18
+ when :start then ->(a) {}
19
+ end
17
20
  end
18
21
 
19
22
  # This method is called if the underying machine ID changes. Providers
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+
3
+ describe Action do
4
+ subject {Action}
5
+
6
+ it {should respond_to(:action_boot)}
7
+ it {should respond_to(:action_halt)}
8
+ it {should respond_to(:action_up)}
9
+ it {should respond_to(:action_destroy)}
10
+ it {should respond_to(:action_package)}
11
+ it {should respond_to(:action_resume)}
12
+ it {should respond_to(:action_ssh)}
13
+ it {should respond_to(:action_ssh_run)}
14
+ it {should respond_to(:action_reload)}
15
+ it {should respond_to(:action_provision)}
16
+ it {should respond_to(:action_destroy)}
17
+ end
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+
3
+ describe Provider do
4
+ # This should be passed something like a machine, but since such functionality isn't implemented yet,
5
+ # let's leave it this way to force revisiting it later.
6
+ subject {Provider.new(Object.new)}
7
+
8
+ it {should respond_to(:action)}
9
+ it {should respond_to(:machine_id_changed)}
10
+ it {should respond_to(:ssh_info)}
11
+ it {should respond_to(:state)}
12
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,2 +1,4 @@
1
1
  $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
2
  require 'VagrantHyperV'
3
+ require 'Provider'
4
+ require 'Action'
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: VagrantHyperV
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
5
- prerelease:
4
+ version: 0.0.5.pre
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ezekiel Smithburg
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-28 00:00:00.000000000 Z
12
+ date: 2013-07-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -27,6 +27,54 @@ dependencies:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rspec
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rspec-mocks
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: vagrant
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '1.2'
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '1.2'
30
78
  description: This is a HyperV provider for vagrant. It doesn't quite work yet.
31
79
  email:
32
80
  - tehgeekmeister@gmail.com
@@ -43,8 +91,11 @@ files:
43
91
  - VagrantHyperV.gemspec
44
92
  - lib/VagrantHyperV.rb
45
93
  - lib/VagrantHyperV/version.rb
94
+ - lib/action.rb
46
95
  - lib/provider.rb
47
96
  - spec/VagrantHyperV_spec.rb
97
+ - spec/action_spec.rb
98
+ - spec/provider_spec.rb
48
99
  - spec/spec_helper.rb
49
100
  homepage: ''
50
101
  licenses:
@@ -61,16 +112,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
61
112
  version: '0'
62
113
  segments:
63
114
  - 0
64
- hash: -3287142401896672191
115
+ hash: 1903684159918265511
65
116
  required_rubygems_version: !ruby/object:Gem::Requirement
66
117
  none: false
67
118
  requirements:
68
- - - ! '>='
119
+ - - ! '>'
69
120
  - !ruby/object:Gem::Version
70
- version: '0'
71
- segments:
72
- - 0
73
- hash: -3287142401896672191
121
+ version: 1.3.1
74
122
  requirements: []
75
123
  rubyforge_project:
76
124
  rubygems_version: 1.8.24
@@ -79,4 +127,6 @@ specification_version: 3
79
127
  summary: This is a HyperV provider for vagrant.
80
128
  test_files:
81
129
  - spec/VagrantHyperV_spec.rb
130
+ - spec/action_spec.rb
131
+ - spec/provider_spec.rb
82
132
  - spec/spec_helper.rb