vagrant-hostentries 0.6.1 → 0.6.2
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.lock +1 -1
- data/Vagrantfile +1 -1
- data/lib/{vagrant-hosts.rb → vagrant-hostentries.rb} +3 -3
- data/lib/{vagrant-hosts → vagrant-hostentries}/action.rb +6 -6
- data/lib/{vagrant-hosts → vagrant-hostentries}/action/remove_hosts_entry.rb +2 -2
- data/lib/{vagrant-hosts → vagrant-hostentries}/action/update_hosts_entry.rb +2 -2
- data/lib/{vagrant-hosts → vagrant-hostentries}/guest_capability/linux/remove_hosts_entry.rb +3 -3
- data/lib/{vagrant-hosts → vagrant-hostentries}/guest_capability/linux/update_hosts_entry.rb +2 -2
- data/lib/{vagrant-hosts → vagrant-hostentries}/hosts/bsd/host.rb +1 -1
- data/lib/{vagrant-hosts → vagrant-hostentries}/plugin.rb +3 -3
- data/lib/{vagrant-hosts → vagrant-hostentries}/provisioner.rb +2 -2
- data/vagrant-hostentries.gemspec +1 -1
- metadata +12 -12
data/Gemfile.lock
CHANGED
data/Vagrantfile
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
require 'pathname'
|
2
2
|
|
3
|
-
require 'vagrant-
|
3
|
+
require 'vagrant-hostentries/plugin'
|
4
4
|
|
5
5
|
module VagrantPlugins
|
6
|
-
module
|
6
|
+
module Hostentries
|
7
7
|
|
8
|
-
autoload :Action, 'vagrant-
|
8
|
+
autoload :Action, 'vagrant-hostentries/action'
|
9
9
|
# This sets up our log level to be whatever VAGRANT_LOG is.
|
10
10
|
def self.setup_logging
|
11
11
|
require "log4r"
|
@@ -1,24 +1,24 @@
|
|
1
1
|
module VagrantPlugins
|
2
|
-
module
|
2
|
+
module Hostentries
|
3
3
|
module Action
|
4
|
-
autoload :RemoveHostsEntry, 'vagrant-
|
5
|
-
autoload :UpdateHostsEntry, 'vagrant-
|
4
|
+
autoload :RemoveHostsEntry, 'vagrant-hostentries/action/remove_hosts_entry'
|
5
|
+
autoload :UpdateHostsEntry, 'vagrant-hostentries/action/update_hosts_entry'
|
6
6
|
|
7
7
|
class << self
|
8
8
|
def update_hosts_entry
|
9
9
|
#@update_hosts_entry ||= ::
|
10
10
|
Vagrant::Action::Builder.new.tap do |b|
|
11
|
-
b.use VagrantPlugins::
|
11
|
+
b.use VagrantPlugins::Hostentries::Action::UpdateHostsEntry
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
15
|
def remove_hosts_entry
|
16
16
|
@remove_hosts_entry ||= ::Vagrant::Action::Builder.new.tap do |b|
|
17
|
-
b.use VagrantPlugins::
|
17
|
+
b.use VagrantPlugins::Hostentries::Action::RemoveHostsEntry
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
22
|
end
|
23
23
|
end
|
24
|
-
end
|
24
|
+
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module VagrantPlugins
|
2
|
-
module
|
2
|
+
module Hostentries
|
3
3
|
module GuestCapability
|
4
4
|
module Linux
|
5
|
-
module
|
5
|
+
module RemoveHostentriesEntry
|
6
6
|
def self.remove_hosts_entry(machine, name)
|
7
7
|
machine.communicate.tap do |comm|
|
8
8
|
comm.sudo("cat /etc/hosts | grep -v '#{name} \#VAGRANTHOSTS$' >>/etc/hosts.tmp">)
|
@@ -13,4 +13,4 @@ module VagrantPlugins
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
16
|
-
end
|
16
|
+
end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
require 'vagrant'
|
2
2
|
|
3
3
|
module VagrantPlugins
|
4
|
-
module
|
4
|
+
module Hostentries
|
5
5
|
class Plugin < Vagrant.plugin("2")
|
6
|
-
name "Vagrant
|
6
|
+
name "Vagrant Hostentries"
|
7
7
|
description "Manages host files on guest and host OSes"
|
8
8
|
|
9
9
|
host("bsd") do
|
10
10
|
require_relative 'hosts/bsd/host'
|
11
|
-
|
11
|
+
Hostentries::BSD::Host
|
12
12
|
end
|
13
13
|
|
14
14
|
guest_capability("linux", "update_hosts_entry") do
|
@@ -2,7 +2,7 @@ require 'log4r'
|
|
2
2
|
require 'vagrant'
|
3
3
|
|
4
4
|
module VagrantPlugins
|
5
|
-
module
|
5
|
+
module Hostentries
|
6
6
|
class Provisioner < Vagrant.plugin("2", :provisioner)
|
7
7
|
def provision
|
8
8
|
@logger = Log4r::Logger.new("vagrant::plugins::hosts")
|
@@ -16,4 +16,4 @@ module VagrantPlugins
|
|
16
16
|
end
|
17
17
|
|
18
18
|
end
|
19
|
-
end
|
19
|
+
end
|
data/vagrant-hostentries.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
|
|
13
13
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
14
|
gem.name = "vagrant-hostentries"
|
15
15
|
gem.require_paths = ["lib"]
|
16
|
-
gem.version = "0.6.
|
16
|
+
gem.version = "0.6.2"
|
17
17
|
|
18
18
|
gem.add_development_dependency 'bundler'
|
19
19
|
gem.add_development_dependency 'vagrant'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-hostentries
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -73,15 +73,15 @@ files:
|
|
73
73
|
- README.md
|
74
74
|
- Rakefile
|
75
75
|
- Vagrantfile
|
76
|
-
- lib/vagrant-
|
77
|
-
- lib/vagrant-
|
78
|
-
- lib/vagrant-
|
79
|
-
- lib/vagrant-
|
80
|
-
- lib/vagrant-
|
81
|
-
- lib/vagrant-
|
82
|
-
- lib/vagrant-
|
83
|
-
- lib/vagrant-
|
84
|
-
- lib/vagrant-
|
76
|
+
- lib/vagrant-hostentries.rb
|
77
|
+
- lib/vagrant-hostentries/action.rb
|
78
|
+
- lib/vagrant-hostentries/action/remove_hosts_entry.rb
|
79
|
+
- lib/vagrant-hostentries/action/update_hosts_entry.rb
|
80
|
+
- lib/vagrant-hostentries/guest_capability/linux/remove_hosts_entry.rb
|
81
|
+
- lib/vagrant-hostentries/guest_capability/linux/update_hosts_entry.rb
|
82
|
+
- lib/vagrant-hostentries/hosts/bsd/host.rb
|
83
|
+
- lib/vagrant-hostentries/plugin.rb
|
84
|
+
- lib/vagrant-hostentries/provisioner.rb
|
85
85
|
- vagrant-hostentries.gemspec
|
86
86
|
homepage: https://github.com/trigren/vagrant-hosts
|
87
87
|
licenses: []
|
@@ -97,7 +97,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
97
97
|
version: '0'
|
98
98
|
segments:
|
99
99
|
- 0
|
100
|
-
hash: -
|
100
|
+
hash: -1157774631023106635
|
101
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
102
|
none: false
|
103
103
|
requirements:
|
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
106
|
version: '0'
|
107
107
|
segments:
|
108
108
|
- 0
|
109
|
-
hash: -
|
109
|
+
hash: -1157774631023106635
|
110
110
|
requirements: []
|
111
111
|
rubyforge_project:
|
112
112
|
rubygems_version: 1.8.24
|