vagrant-guests-openbsd 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +1 -0
- data/README.md +10 -2
- data/lib/vagrant-guests-openbsd/cap/change_host_name.rb +14 -0
- data/lib/vagrant-guests-openbsd/cap/configure_networks.rb +26 -0
- data/lib/vagrant-guests-openbsd/cap/halt.rb +16 -0
- data/lib/vagrant-guests-openbsd/cap/mount_nfs_folder.rb +14 -0
- data/lib/vagrant-guests-openbsd/guest.rb +2 -49
- data/lib/vagrant-guests-openbsd/plugin.rb +22 -15
- data/spec/cap/change_host_name.rb +21 -0
- data/spec/cap/configure_networks.rb +29 -0
- data/spec/cap/halt.rb +11 -0
- data/spec/cap/mount_nfs_folder.rb +19 -0
- data/spec/guest_spec.rb +5 -65
- data/spec/plugin_spec.rb +20 -7
- data/spec/spec_helper.rb +12 -0
- data/vagrant-guests-openbsd.gemspec +1 -1
- metadata +19 -24
- data/lib/vagrant-guests-openbsd/config.rb +0 -15
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MDYxZThhM2MyNjExMTJlYWY5MTQ5YTAxNGJmYWI4M2E2ZWM2MzA5Zg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ODk5NzQ2NTVmYjI2ZTE0YjFjYmIxMDYzMGY1NGQzY2JmMzgyZDk5MQ==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NTI2M2M3YzgxYjlmYmFkMWNlMjZiZDkxMDA2ZGExYTQ4ODNhZjFiOGUzZDU0
|
10
|
+
OTEzN2JlODAxN2UzNGEwNTUxMjBkYjUwMjNhMzU2MzJmY2UzNTI1NTFjMjBh
|
11
|
+
MjZhNjZlZTcyNmZjMmZjMTg0ZDMzYmEzMDg3YTQ5NmQ1NjczOWM=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YmJmMDgzZGRlNmU5MGMzZGIwYzQzYWI1ODQxMTE5NDk3ZWQwZTAzOTZkMWMw
|
14
|
+
YTBjNjlmNzk1ZWFiY2UzOWQ1YzljNGRjZjhiMzgzY2MxMDNmNTI0M2ZlZGZl
|
15
|
+
MDQ5ODM5NmZkOTNmMTYwNjRlZTVhZGY2YmY5OTI4YzIzZjM2ZTM=
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# vagrant-guests-openbsd
|
4
4
|
|
5
|
-
Vagrant 1.1 has a
|
5
|
+
Vagrant >= 1.1 has a built-in OpenBSD plugin but the plugin lacks multiple network and nfs mount support.
|
6
6
|
|
7
7
|
This plugins allows you to run OpenBSD under vagrant until Vagrant merges this changes.
|
8
8
|
|
@@ -22,9 +22,17 @@ Add this line to your Vagrantfile:
|
|
22
22
|
config.vm.network :private_network, ip: "192.168.67.10", netmask: "255.255.255.0"
|
23
23
|
# If you want to mount folders with nfs
|
24
24
|
config.vm.synced_folder "../", "/vagrant", :nfs => true
|
25
|
+
# If you want not to mount any folders, set :disabled => true
|
26
|
+
config.vm.synced_folder "../", "/vagrant", :disabled => true
|
25
27
|
|
26
28
|
# other config
|
27
29
|
# ...
|
28
30
|
end
|
29
31
|
|
30
|
-
You shoud use ':openbsd\_v2' for 'config.vm.guest' to avoid name conflict with
|
32
|
+
You shoud use ':openbsd\_v2' for 'config.vm.guest' to avoid name conflict with built-in plugin.
|
33
|
+
|
34
|
+
# ChangeLog
|
35
|
+
|
36
|
+
## 0.0.3 (2013-08-03)
|
37
|
+
|
38
|
+
* Add Vagrant 1.2.7 support
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module GuestOpenBSD
|
3
|
+
module Cap
|
4
|
+
class ChangeHostName
|
5
|
+
def self.change_host_name(machine, name)
|
6
|
+
if !machine.communicate.test("[ `hostname -f` = #{name} ] || [ `hostname -s` = #{name} ]")
|
7
|
+
machine.communicate.sudo("su -m root -c 'echo #{name} > /etc/myname'")
|
8
|
+
machine.communicate.sudo("hostname #{name}")
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module GuestOpenBSD
|
3
|
+
module Cap
|
4
|
+
class ConfigureNetworks
|
5
|
+
def self.configure_networks(machine, networks)
|
6
|
+
# remove any hostname.em expect hostname.em0
|
7
|
+
machine.communicate.sudo("[ -f /etc/hostname.em0 ] && mv /etc/hostname.em0 /tmp")
|
8
|
+
machine.communicate.sudo("rm /etc/hostname.em* || :")
|
9
|
+
machine.communicate.sudo("[ -f /tmp/hostname.em0 ] && mv /tmp/hostname.em0 /etc")
|
10
|
+
|
11
|
+
networks.each do |network|
|
12
|
+
case network[:type]
|
13
|
+
when :static
|
14
|
+
machine.communicate.sudo("su -m root -c 'echo inet #{network[:ip]} #{network[:netmask]}" +
|
15
|
+
" > /etc/hostname.em#{network[:interface]}'")
|
16
|
+
machine.communicate.sudo("sh /etc/netstart em#{network[:interface]}")
|
17
|
+
when :dhcp
|
18
|
+
machine.communicate.sudo("su -m root -c 'echo dhcp > /etc/hostname.em#{network[:interface]}'")
|
19
|
+
machine.communicate.sudo("sh /etc/netstart em#{network[:interface]}")
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module GuestOpenBSD
|
3
|
+
module Cap
|
4
|
+
class Halt
|
5
|
+
def self.halt(machine)
|
6
|
+
begin
|
7
|
+
machine.communicate.sudo("shutdown -hp now")
|
8
|
+
rescue IOError
|
9
|
+
# ignore IOError while shutting down
|
10
|
+
# See FreeBSD's halt implementation
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module GuestOpenBSD
|
3
|
+
module Cap
|
4
|
+
class MountNFSFolder
|
5
|
+
def self.mount_nfs_folder(machine, ip, folders)
|
6
|
+
folders.each do |name, opts|
|
7
|
+
machine.communicate.sudo("mkdir -p #{opts[:guestpath]}")
|
8
|
+
machine.communicate.sudo("mount '#{ip}:#{opts[:hostpath]}' '#{opts[:guestpath]}'")
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -1,57 +1,10 @@
|
|
1
1
|
require 'vagrant'
|
2
|
-
require 'log4r'
|
3
2
|
|
4
3
|
module VagrantPlugins
|
5
4
|
module GuestOpenBSD
|
6
5
|
class Guest < Vagrant.plugin("2", :guest)
|
7
|
-
|
8
|
-
|
9
|
-
end
|
10
|
-
|
11
|
-
def initialize(*args)
|
12
|
-
super
|
13
|
-
@logger = Log4r::Logger.new("vagrant::guest::openbsd")
|
14
|
-
end
|
15
|
-
|
16
|
-
def halt
|
17
|
-
vm.communicate.sudo("shutdown -hp now")
|
18
|
-
end
|
19
|
-
|
20
|
-
def mount_shared_folder(name, guestpath, options)
|
21
|
-
@logger.info("OpenBSD does not have shared folder support. Use nfs option instead.")
|
22
|
-
end
|
23
|
-
|
24
|
-
def mount_nfs(ip, folders)
|
25
|
-
folders.each do |name, opts|
|
26
|
-
vm.communicate.sudo("mkdir -p #{opts[:guestpath]}")
|
27
|
-
vm.communicate.sudo("mount '#{ip}:#{opts[:hostpath]}' '#{opts[:guestpath]}'")
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
def configure_networks(networks)
|
32
|
-
# remove any hostname.em expect hostname.em0
|
33
|
-
vm.communicate.sudo("[ -f /etc/hostname.em0 ] && mv /etc/hostname.em0 /tmp")
|
34
|
-
vm.communicate.sudo("rm /etc/hostname.em* || :")
|
35
|
-
vm.communicate.sudo("[ -f /tmp/hostname.em0 ] && mv /tmp/hostname.em0 /etc")
|
36
|
-
|
37
|
-
networks.each do |network|
|
38
|
-
case network[:type]
|
39
|
-
when :static
|
40
|
-
vm.communicate.sudo("su -m root -c 'echo inet #{network[:ip]} #{network[:netmask]}" +
|
41
|
-
" > /etc/hostname.em#{network[:interface]}'")
|
42
|
-
vm.communicate.sudo("sh /etc/netstart em#{network[:interface]}")
|
43
|
-
when :dhcp
|
44
|
-
vm.communicate.sudo("su -m root -c 'echo dhcp > /etc/hostname.em#{network[:interface]}'")
|
45
|
-
vm.communicate.sudo("sh /etc/netstart em#{network[:interface]}")
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
def change_host_name(name)
|
51
|
-
if !vm.communicate.test("[ `hostname -f` = #{name} ] || [ `hostname -s` = #{name} ]")
|
52
|
-
vm.communicate.sudo("su -m root -c 'echo #{name} > /etc/myname'")
|
53
|
-
vm.communicate.sudo("hostname #{name}")
|
54
|
-
end
|
6
|
+
def detect?(machine)
|
7
|
+
machine.communicate.test('[ "$(uname -s)" = "OpenBSD" ]')
|
55
8
|
end
|
56
9
|
end
|
57
10
|
end
|
@@ -6,24 +6,31 @@ module VagrantPlugins
|
|
6
6
|
name "OpenBSD guest"
|
7
7
|
description "OpenBSD guest support."
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
%w{openbsd openbsd_v2}.each do |os|
|
10
|
+
guest(os) do
|
11
|
+
require_relative "guest"
|
12
|
+
Guest
|
13
|
+
end
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
guest_capability(os, "change_host_name") do
|
16
|
+
require_relative "cap/change_host_name"
|
17
|
+
Cap::ChangeHostName
|
18
|
+
end
|
18
19
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
guest_capability(os, "configure_networks") do
|
21
|
+
require_relative "cap/configure_networks"
|
22
|
+
Cap::ConfigureNetworks
|
23
|
+
end
|
24
|
+
|
25
|
+
guest_capability(os, "halt") do
|
26
|
+
require_relative "cap/halt"
|
27
|
+
Cap::Halt
|
28
|
+
end
|
23
29
|
|
24
|
-
|
25
|
-
|
26
|
-
|
30
|
+
guest_capability(os, "mount_nfs_folder") do
|
31
|
+
require_relative "cap/mount_nfs_folder"
|
32
|
+
Cap::MountNFSFolder
|
33
|
+
end
|
27
34
|
end
|
28
35
|
end
|
29
36
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'vagrant-guests-openbsd/cap/change_host_name'
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe VagrantPlugins::GuestOpenBSD::Cap::ChangeHostName do
|
5
|
+
include_context 'machine'
|
6
|
+
|
7
|
+
it "should change hostname when hostname is differ from current" do
|
8
|
+
hostname = 'vagrant-openbsd'
|
9
|
+
communicate.stub(:test).and_return(false)
|
10
|
+
communicate.should_receive(:sudo).with("su -m root -c 'echo #{hostname} > /etc/myname'")
|
11
|
+
communicate.should_receive(:sudo).with("hostname #{hostname}")
|
12
|
+
described_class.change_host_name(machine, hostname)
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should not change hostname when hostname equals current" do
|
16
|
+
hostname = 'vagrant-openbsd'
|
17
|
+
communicate.stub(:test).and_return(true)
|
18
|
+
communicate.should_not_receive(:sudo)
|
19
|
+
described_class.change_host_name(machine, hostname)
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'vagrant-guests-openbsd/cap/configure_networks'
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe VagrantPlugins::GuestOpenBSD::Cap::ConfigureNetworks do
|
5
|
+
include_context 'machine'
|
6
|
+
|
7
|
+
it "should configure networks using hostname.in(5)" do
|
8
|
+
networks = [
|
9
|
+
{:type => :static, :ip => '192.168.10.10', :netmask => '255.255.255.0', :interface => 1},
|
10
|
+
{:type => :dhcp, :interface => 2},
|
11
|
+
{:type => :static, :ip => '10.168.10.10', :netmask => '255.255.0.0', :interface => 3},
|
12
|
+
]
|
13
|
+
communicate.should_receive(:sudo).with("[ -f /etc/hostname.em0 ] && mv /etc/hostname.em0 /tmp")
|
14
|
+
communicate.should_receive(:sudo).with("rm /etc/hostname.em* || :")
|
15
|
+
communicate.should_receive(:sudo).with("[ -f /tmp/hostname.em0 ] && mv /tmp/hostname.em0 /etc")
|
16
|
+
|
17
|
+
communicate.should_receive(:sudo).with(
|
18
|
+
"su -m root -c 'echo inet #{networks[0][:ip]} #{networks[0][:netmask]} > /etc/hostname.em#{networks[0][:interface]}'")
|
19
|
+
communicate.should_receive(:sudo).with("sh /etc/netstart em#{networks[0][:interface]}")
|
20
|
+
communicate.should_receive(:sudo).with(
|
21
|
+
"su -m root -c 'echo dhcp > /etc/hostname.em#{networks[1][:interface]}'")
|
22
|
+
communicate.should_receive(:sudo).with("sh /etc/netstart em#{networks[1][:interface]}")
|
23
|
+
communicate.should_receive(:sudo).with(
|
24
|
+
"su -m root -c 'echo inet #{networks[2][:ip]} #{networks[2][:netmask]} > /etc/hostname.em#{networks[2][:interface]}'")
|
25
|
+
communicate.should_receive(:sudo).with("sh /etc/netstart em#{networks[2][:interface]}")
|
26
|
+
|
27
|
+
described_class.configure_networks(machine, networks)
|
28
|
+
end
|
29
|
+
end
|
data/spec/cap/halt.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'vagrant-guests-openbsd/cap/halt'
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe VagrantPlugins::GuestOpenBSD::Cap::Halt do
|
5
|
+
include_context 'machine'
|
6
|
+
|
7
|
+
it "should halt guest using 'shutdown -hp now'" do
|
8
|
+
communicate.should_receive(:sudo).with("shutdown -hp now")
|
9
|
+
described_class.halt(machine)
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'vagrant-guests-openbsd/cap/mount_nfs_folder'
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe VagrantPlugins::GuestOpenBSD::Cap::MountNFSFolder do
|
5
|
+
include_context 'machine'
|
6
|
+
|
7
|
+
it "should mount nfs folders" do
|
8
|
+
ip = "192.168.1.1"
|
9
|
+
folders = {
|
10
|
+
'folder1' => {:guestpath => '/guest1', :hostpath => '/host1'},
|
11
|
+
'folder2' => {:guestpath => '/guest2', :hostpath => '/host2'}
|
12
|
+
}
|
13
|
+
folders.each do |name, opts|
|
14
|
+
communicate.should_receive(:sudo).with("mkdir -p #{opts[:guestpath]}")
|
15
|
+
communicate.should_receive(:sudo).with("mount '#{ip}:#{opts[:hostpath]}' '#{opts[:guestpath]}'")
|
16
|
+
end
|
17
|
+
described_class.mount_nfs_folder(machine, ip, folders)
|
18
|
+
end
|
19
|
+
end
|
data/spec/guest_spec.rb
CHANGED
@@ -1,71 +1,11 @@
|
|
1
|
+
require 'spec_helper'
|
1
2
|
require 'vagrant-guests-openbsd/guest'
|
2
3
|
|
3
4
|
describe VagrantPlugins::GuestOpenBSD::Guest do
|
4
|
-
|
5
|
-
double("communicate")
|
6
|
-
}
|
7
|
-
let(:vm) {
|
8
|
-
v = double("vm")
|
9
|
-
v.stub(:communicate).and_return(communicate)
|
10
|
-
v
|
11
|
-
}
|
12
|
-
let(:guest) {
|
13
|
-
described_class.new(vm)
|
14
|
-
}
|
5
|
+
include_context 'machine'
|
15
6
|
|
16
|
-
it "should
|
17
|
-
communicate.
|
18
|
-
guest.
|
19
|
-
end
|
20
|
-
|
21
|
-
it "should mount nfs folders" do
|
22
|
-
ip = "192.168.1.1"
|
23
|
-
folders = {
|
24
|
-
'folder1' => {:guestpath => '/guest1', :hostpath => '/host1'},
|
25
|
-
'folder2' => {:guestpath => '/guest2', :hostpath => '/host2'}
|
26
|
-
}
|
27
|
-
folders.each do |name, opts|
|
28
|
-
communicate.should_receive(:sudo).with("mkdir -p #{opts[:guestpath]}")
|
29
|
-
communicate.should_receive(:sudo).with("mount '#{ip}:#{opts[:hostpath]}' '#{opts[:guestpath]}'")
|
30
|
-
end
|
31
|
-
guest.mount_nfs(ip, folders)
|
32
|
-
end
|
33
|
-
|
34
|
-
it "should configure networks using hostname.in(5)" do
|
35
|
-
networks = [
|
36
|
-
{:type => :static, :ip => '192.168.10.10', :netmask => '255.255.255.0', :interface => 1},
|
37
|
-
{:type => :dhcp, :interface => 2},
|
38
|
-
{:type => :static, :ip => '10.168.10.10', :netmask => '255.255.0.0', :interface => 3},
|
39
|
-
]
|
40
|
-
communicate.should_receive(:sudo).with("[ -f /etc/hostname.em0 ] && mv /etc/hostname.em0 /tmp")
|
41
|
-
communicate.should_receive(:sudo).with("rm /etc/hostname.em* || :")
|
42
|
-
communicate.should_receive(:sudo).with("[ -f /tmp/hostname.em0 ] && mv /tmp/hostname.em0 /etc")
|
43
|
-
|
44
|
-
communicate.should_receive(:sudo).with(
|
45
|
-
"su -m root -c 'echo inet #{networks[0][:ip]} #{networks[0][:netmask]} > /etc/hostname.em#{networks[0][:interface]}'")
|
46
|
-
communicate.should_receive(:sudo).with("sh /etc/netstart em#{networks[0][:interface]}")
|
47
|
-
communicate.should_receive(:sudo).with(
|
48
|
-
"su -m root -c 'echo dhcp > /etc/hostname.em#{networks[1][:interface]}'")
|
49
|
-
communicate.should_receive(:sudo).with("sh /etc/netstart em#{networks[1][:interface]}")
|
50
|
-
communicate.should_receive(:sudo).with(
|
51
|
-
"su -m root -c 'echo inet #{networks[2][:ip]} #{networks[2][:netmask]} > /etc/hostname.em#{networks[2][:interface]}'")
|
52
|
-
communicate.should_receive(:sudo).with("sh /etc/netstart em#{networks[2][:interface]}")
|
53
|
-
|
54
|
-
guest.configure_networks(networks)
|
55
|
-
end
|
56
|
-
|
57
|
-
it "should change hostname when hostname is differ from current" do
|
58
|
-
hostname = 'vagrant-openbsd'
|
59
|
-
communicate.stub(:test).and_return(false)
|
60
|
-
communicate.should_receive(:sudo).with("su -m root -c 'echo #{hostname} > /etc/myname'")
|
61
|
-
communicate.should_receive(:sudo).with("hostname #{hostname}")
|
62
|
-
guest.change_host_name(hostname)
|
63
|
-
end
|
64
|
-
|
65
|
-
it "should not change hostname when hostname equals current" do
|
66
|
-
hostname = 'vagrant-openbsd'
|
67
|
-
communicate.stub(:test).and_return(true)
|
68
|
-
communicate.should_not_receive(:sudo)
|
69
|
-
guest.change_host_name(hostname)
|
7
|
+
it "should be detected with OpenBSD" do
|
8
|
+
expect(communicate).to receive(:test).with('[ "$(uname -s)" = "OpenBSD" ]')
|
9
|
+
guest.detect?(machine)
|
70
10
|
end
|
71
11
|
end
|
data/spec/plugin_spec.rb
CHANGED
@@ -1,13 +1,26 @@
|
|
1
|
+
require 'spec_helper'
|
1
2
|
require 'vagrant-guests-openbsd/plugin'
|
3
|
+
require 'vagrant-guests-openbsd/cap/change_host_name'
|
4
|
+
require 'vagrant-guests-openbsd/cap/configure_networks'
|
5
|
+
require 'vagrant-guests-openbsd/cap/halt'
|
6
|
+
require 'vagrant-guests-openbsd/cap/mount_nfs_folder'
|
2
7
|
|
3
8
|
describe VagrantPlugins::GuestOpenBSD::Plugin do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
9
|
+
[:openbsd, :openbsd_v2].each do |os|
|
10
|
+
it "should be loaded with #{os}" do
|
11
|
+
expect(described_class.components.guests[os].first).to eq(VagrantPlugins::GuestOpenBSD::Guest)
|
12
|
+
end
|
8
13
|
|
9
|
-
|
10
|
-
|
11
|
-
|
14
|
+
{
|
15
|
+
:halt => VagrantPlugins::GuestOpenBSD::Cap::Halt,
|
16
|
+
:change_host_name => VagrantPlugins::GuestOpenBSD::Cap::ChangeHostName,
|
17
|
+
:configure_networks => VagrantPlugins::GuestOpenBSD::Cap::ConfigureNetworks,
|
18
|
+
:mount_nfs_folder => VagrantPlugins::GuestOpenBSD::Cap::MountNFSFolder
|
19
|
+
}.each do |cap, cls|
|
20
|
+
it "should be capable of #{cap} with #{os}" do
|
21
|
+
expect(described_class.components.guest_capabilities[os][cap])
|
22
|
+
.to eq(cls)
|
23
|
+
end
|
24
|
+
end
|
12
25
|
end
|
13
26
|
end
|
data/spec/spec_helper.rb
ADDED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "vagrant-guests-openbsd"
|
7
|
-
spec.version = "0.0.
|
7
|
+
spec.version = "0.0.3"
|
8
8
|
spec.authors = ["TANABE Ken-ichi"]
|
9
9
|
spec.email = ["nabeken@tknetworks.org"]
|
10
10
|
spec.description = %q{Vagrant Guests Plugin for OpenBSD}
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-guests-openbsd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- TANABE Ken-ichi
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-03
|
11
|
+
date: 2013-08-03 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: bundler
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rake
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ! '>='
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ! '>='
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rspec-core
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ! '>='
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ! '>='
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,7 +55,6 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: rspec-expectations
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ! '>='
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ! '>='
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -78,7 +69,6 @@ dependencies:
|
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: rspec-mocks
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
73
|
- - ! '>='
|
84
74
|
- !ruby/object:Gem::Version
|
@@ -86,7 +76,6 @@ dependencies:
|
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
80
|
- - ! '>='
|
92
81
|
- !ruby/object:Gem::Version
|
@@ -106,43 +95,49 @@ files:
|
|
106
95
|
- README.md
|
107
96
|
- Rakefile
|
108
97
|
- lib/vagrant-guests-openbsd.rb
|
109
|
-
- lib/vagrant-guests-openbsd/
|
98
|
+
- lib/vagrant-guests-openbsd/cap/change_host_name.rb
|
99
|
+
- lib/vagrant-guests-openbsd/cap/configure_networks.rb
|
100
|
+
- lib/vagrant-guests-openbsd/cap/halt.rb
|
101
|
+
- lib/vagrant-guests-openbsd/cap/mount_nfs_folder.rb
|
110
102
|
- lib/vagrant-guests-openbsd/guest.rb
|
111
103
|
- lib/vagrant-guests-openbsd/plugin.rb
|
104
|
+
- spec/cap/change_host_name.rb
|
105
|
+
- spec/cap/configure_networks.rb
|
106
|
+
- spec/cap/halt.rb
|
107
|
+
- spec/cap/mount_nfs_folder.rb
|
112
108
|
- spec/guest_spec.rb
|
113
109
|
- spec/plugin_spec.rb
|
110
|
+
- spec/spec_helper.rb
|
114
111
|
- vagrant-guests-openbsd.gemspec
|
115
112
|
homepage: https://github.com/nabeken/vagrant-guests-openbsd
|
116
113
|
licenses:
|
117
114
|
- MIT
|
115
|
+
metadata: {}
|
118
116
|
post_install_message:
|
119
117
|
rdoc_options: []
|
120
118
|
require_paths:
|
121
119
|
- lib
|
122
120
|
required_ruby_version: !ruby/object:Gem::Requirement
|
123
|
-
none: false
|
124
121
|
requirements:
|
125
122
|
- - ! '>='
|
126
123
|
- !ruby/object:Gem::Version
|
127
124
|
version: '0'
|
128
|
-
segments:
|
129
|
-
- 0
|
130
|
-
hash: 4562814454344751602
|
131
125
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
|
-
none: false
|
133
126
|
requirements:
|
134
127
|
- - ! '>='
|
135
128
|
- !ruby/object:Gem::Version
|
136
129
|
version: '0'
|
137
|
-
segments:
|
138
|
-
- 0
|
139
|
-
hash: 4562814454344751602
|
140
130
|
requirements: []
|
141
131
|
rubyforge_project:
|
142
|
-
rubygems_version:
|
132
|
+
rubygems_version: 2.0.5
|
143
133
|
signing_key:
|
144
|
-
specification_version:
|
134
|
+
specification_version: 4
|
145
135
|
summary: This plugins allows you to run OpenBSD under vagrant
|
146
136
|
test_files:
|
137
|
+
- spec/cap/change_host_name.rb
|
138
|
+
- spec/cap/configure_networks.rb
|
139
|
+
- spec/cap/halt.rb
|
140
|
+
- spec/cap/mount_nfs_folder.rb
|
147
141
|
- spec/guest_spec.rb
|
148
142
|
- spec/plugin_spec.rb
|
143
|
+
- spec/spec_helper.rb
|
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'vagrant'
|
2
|
-
|
3
|
-
module VagrantPlugins
|
4
|
-
module GuestOpenBSD
|
5
|
-
class Config < Vagrant.plugin("2", :config)
|
6
|
-
attr_accessor :halt_timeout
|
7
|
-
attr_accessor :halt_check_interval
|
8
|
-
|
9
|
-
def initialize
|
10
|
-
@halt_timeout = 30
|
11
|
-
@halt_check_interval = 1
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|