vagrant-xhyve 0.1.0.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.
- checksums.yaml +7 -0
- data/.gitignore +22 -0
- data/.rspec +1 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +13 -0
- data/LICENSE +9 -0
- data/README.md +140 -0
- data/Rakefile +22 -0
- data/example_box/README.md +31 -0
- data/example_box/initrd.gz +0 -0
- data/example_box/metadata.json +3 -0
- data/example_box/vmlinuz +0 -0
- data/lib/vagrant-xhyve/action/boot.rb +142 -0
- data/lib/vagrant-xhyve/action/import.rb +59 -0
- data/lib/vagrant-xhyve/action/is_created.rb +18 -0
- data/lib/vagrant-xhyve/action/is_stopped.rb +18 -0
- data/lib/vagrant-xhyve/action/message_already_created.rb +16 -0
- data/lib/vagrant-xhyve/action/message_not_created.rb +16 -0
- data/lib/vagrant-xhyve/action/message_will_not_destroy.rb +16 -0
- data/lib/vagrant-xhyve/action/read_ssh_info.rb +33 -0
- data/lib/vagrant-xhyve/action/read_state.rb +43 -0
- data/lib/vagrant-xhyve/action/stop_instance.rb +45 -0
- data/lib/vagrant-xhyve/action/terminate_instance.rb +47 -0
- data/lib/vagrant-xhyve/action/timed_provision.rb +21 -0
- data/lib/vagrant-xhyve/action/wait_for_state.rb +41 -0
- data/lib/vagrant-xhyve/action.rb +193 -0
- data/lib/vagrant-xhyve/config.rb +66 -0
- data/lib/vagrant-xhyve/errors.rb +19 -0
- data/lib/vagrant-xhyve/plugin.rb +73 -0
- data/lib/vagrant-xhyve/provider.rb +50 -0
- data/lib/vagrant-xhyve/util/timer.rb +17 -0
- data/lib/vagrant-xhyve/util/vagrant-xhyve.rb +50 -0
- data/lib/vagrant-xhyve/version.rb +5 -0
- data/lib/vagrant-xhyve.rb +18 -0
- data/locales/en.yml +83 -0
- data/spec/spec_helper.rb +1 -0
- data/spec/vagrant-xhyve/config_spec.rb +33 -0
- data/templates/metadata.json.erb +3 -0
- data/templates/vagrant-aws_package_Vagrantfile.erb +5 -0
- data/vagrant-xhyve.gemspec +60 -0
- metadata +158 -0
@@ -0,0 +1,33 @@
|
|
1
|
+
require "vagrant-xhyve/config"
|
2
|
+
require 'rspec/its'
|
3
|
+
|
4
|
+
# remove deprecation warnings
|
5
|
+
# (until someone decides to update the whole spec file to rspec 3.4)
|
6
|
+
RSpec.configure do |config|
|
7
|
+
# ...
|
8
|
+
config.mock_with :rspec do |c|
|
9
|
+
c.syntax = [:should, :expect]
|
10
|
+
end
|
11
|
+
config.expect_with :rspec do |c|
|
12
|
+
c.syntax = [:should, :expect]
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe VagrantPlugins::XHYVE::Config do
|
17
|
+
let(:instance) { described_class.new }
|
18
|
+
|
19
|
+
before :each do
|
20
|
+
ENV.stub(:[] => nil)
|
21
|
+
end
|
22
|
+
|
23
|
+
describe "defaults" do
|
24
|
+
subject do
|
25
|
+
instance.tap do |o|
|
26
|
+
o.finalize!
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
its("memory") { should.to_s == "1024" }
|
31
|
+
its("cpus") { should == 1 }
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
$:.unshift File.expand_path("../lib", __FILE__)
|
2
|
+
require "vagrant-xhyve/version"
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "vagrant-xhyve"
|
6
|
+
s.version = VagrantPlugins::XHYVE::VERSION
|
7
|
+
s.platform = Gem::Platform::RUBY
|
8
|
+
s.license = "MIT"
|
9
|
+
s.authors = "Patrick Armstrong"
|
10
|
+
s.email = "pat@oldpatricka.com"
|
11
|
+
s.homepage = "http://github.com/oldpatricka/vagrant-xhyve"
|
12
|
+
s.summary = "Enables Vagrant to manage machines in xhyve."
|
13
|
+
s.description = "Enables Vagrant to manage machines in xhyve."
|
14
|
+
|
15
|
+
s.required_rubygems_version = ">= 1.3.6"
|
16
|
+
s.rubyforge_project = "vagrant-xhyve"
|
17
|
+
|
18
|
+
s.add_runtime_dependency "xhyve-ruby", ">= 0.0.6"
|
19
|
+
s.add_runtime_dependency "iniparse", "~> 1.4", ">= 1.4.2"
|
20
|
+
|
21
|
+
s.add_development_dependency "rake"
|
22
|
+
# rspec 3.4 to mock File
|
23
|
+
s.add_development_dependency "rspec", "~> 3.4"
|
24
|
+
s.add_development_dependency "rspec-its"
|
25
|
+
|
26
|
+
# The following block of code determines the files that should be included
|
27
|
+
# in the gem. It does this by reading all the files in the directory where
|
28
|
+
# this gemspec is, and parsing out the ignored files from the gitignore.
|
29
|
+
# Note that the entire gitignore(5) syntax is not supported, specifically
|
30
|
+
# the "!" syntax, but it should mostly work correctly.
|
31
|
+
root_path = File.dirname(__FILE__)
|
32
|
+
all_files = Dir.chdir(root_path) { Dir.glob("**/{*,.*}") }
|
33
|
+
all_files.reject! { |file| [".", ".."].include?(File.basename(file)) }
|
34
|
+
gitignore_path = File.join(root_path, ".gitignore")
|
35
|
+
gitignore = File.readlines(gitignore_path)
|
36
|
+
gitignore.map! { |line| line.chomp.strip }
|
37
|
+
gitignore.reject! { |line| line.empty? || line =~ /^(#|!)/ }
|
38
|
+
|
39
|
+
unignored_files = all_files.reject do |file|
|
40
|
+
# Ignore any directories, the gemspec only cares about files
|
41
|
+
next true if File.directory?(file)
|
42
|
+
|
43
|
+
# Ignore any paths that match anything in the gitignore. We do
|
44
|
+
# two tests here:
|
45
|
+
#
|
46
|
+
# - First, test to see if the entire path matches the gitignore.
|
47
|
+
# - Second, match if the basename does, this makes it so that things
|
48
|
+
# like '.DS_Store' will match sub-directories too (same behavior
|
49
|
+
# as git).
|
50
|
+
#
|
51
|
+
gitignore.any? do |ignore|
|
52
|
+
File.fnmatch(ignore, file, File::FNM_PATHNAME) ||
|
53
|
+
File.fnmatch(ignore, File.basename(file), File::FNM_PATHNAME)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
s.files = unignored_files
|
58
|
+
s.executables = unignored_files.map { |f| f[/^bin\/(.*)/, 1] }.compact
|
59
|
+
s.require_path = 'lib'
|
60
|
+
end
|
metadata
ADDED
@@ -0,0 +1,158 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vagrant-xhyve
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0.pre
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Patrick Armstrong
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-04-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: xhyve-ruby
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.0.6
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.0.6
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: iniparse
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.4'
|
34
|
+
- - '>='
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 1.4.2
|
37
|
+
type: :runtime
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '1.4'
|
44
|
+
- - '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 1.4.2
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rake
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
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
|
+
requirements:
|
58
|
+
- - '>='
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rspec
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ~>
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '3.4'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ~>
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '3.4'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: rspec-its
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - '>='
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - '>='
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
description: Enables Vagrant to manage machines in xhyve.
|
90
|
+
email: pat@oldpatricka.com
|
91
|
+
executables: []
|
92
|
+
extensions: []
|
93
|
+
extra_rdoc_files: []
|
94
|
+
files:
|
95
|
+
- CHANGELOG.md
|
96
|
+
- example_box/initrd.gz
|
97
|
+
- example_box/metadata.json
|
98
|
+
- example_box/README.md
|
99
|
+
- example_box/vmlinuz
|
100
|
+
- Gemfile
|
101
|
+
- lib/vagrant-xhyve/action/boot.rb
|
102
|
+
- lib/vagrant-xhyve/action/import.rb
|
103
|
+
- lib/vagrant-xhyve/action/is_created.rb
|
104
|
+
- lib/vagrant-xhyve/action/is_stopped.rb
|
105
|
+
- lib/vagrant-xhyve/action/message_already_created.rb
|
106
|
+
- lib/vagrant-xhyve/action/message_not_created.rb
|
107
|
+
- lib/vagrant-xhyve/action/message_will_not_destroy.rb
|
108
|
+
- lib/vagrant-xhyve/action/read_ssh_info.rb
|
109
|
+
- lib/vagrant-xhyve/action/read_state.rb
|
110
|
+
- lib/vagrant-xhyve/action/stop_instance.rb
|
111
|
+
- lib/vagrant-xhyve/action/terminate_instance.rb
|
112
|
+
- lib/vagrant-xhyve/action/timed_provision.rb
|
113
|
+
- lib/vagrant-xhyve/action/wait_for_state.rb
|
114
|
+
- lib/vagrant-xhyve/action.rb
|
115
|
+
- lib/vagrant-xhyve/config.rb
|
116
|
+
- lib/vagrant-xhyve/errors.rb
|
117
|
+
- lib/vagrant-xhyve/plugin.rb
|
118
|
+
- lib/vagrant-xhyve/provider.rb
|
119
|
+
- lib/vagrant-xhyve/util/timer.rb
|
120
|
+
- lib/vagrant-xhyve/util/vagrant-xhyve.rb
|
121
|
+
- lib/vagrant-xhyve/version.rb
|
122
|
+
- lib/vagrant-xhyve.rb
|
123
|
+
- LICENSE
|
124
|
+
- locales/en.yml
|
125
|
+
- Rakefile
|
126
|
+
- README.md
|
127
|
+
- spec/spec_helper.rb
|
128
|
+
- spec/vagrant-xhyve/config_spec.rb
|
129
|
+
- templates/metadata.json.erb
|
130
|
+
- templates/vagrant-aws_package_Vagrantfile.erb
|
131
|
+
- vagrant-xhyve.gemspec
|
132
|
+
- .gitignore
|
133
|
+
- .rspec
|
134
|
+
homepage: http://github.com/oldpatricka/vagrant-xhyve
|
135
|
+
licenses:
|
136
|
+
- MIT
|
137
|
+
metadata: {}
|
138
|
+
post_install_message:
|
139
|
+
rdoc_options: []
|
140
|
+
require_paths:
|
141
|
+
- lib
|
142
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - '>='
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '0'
|
147
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - '>='
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: 1.3.6
|
152
|
+
requirements: []
|
153
|
+
rubyforge_project: vagrant-xhyve
|
154
|
+
rubygems_version: 2.0.14.1
|
155
|
+
signing_key:
|
156
|
+
specification_version: 4
|
157
|
+
summary: Enables Vagrant to manage machines in xhyve.
|
158
|
+
test_files: []
|