landrush 0.15.0 → 0.15.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/landrush/action/common.rb +14 -1
- data/lib/landrush/action/redirect_dns.rb +1 -1
- data/lib/landrush/config.rb +0 -7
- data/lib/landrush/plugin.rb +3 -3
- data/lib/landrush/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 670ea146b0661d80ba8dccc6e17eaa48989c409d
|
4
|
+
data.tar.gz: 341f19fbcf9994d579fae39930f31409462feead
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 446a5d4bdf416bcdf72a0f21539fdb50a985439708a10ff61daa61da93ec84950366f6dfd37a2468dce6250ea2fd6bd6528132dca6162e2cdb25a5520ab906b7
|
7
|
+
data.tar.gz: 09197818c44b00c92dc9fd41f44c169bd4cfd921247a0dfb4512b72c25cc103f6e50bba30de25bdbcc25e2996b4f1b610b9f46218c536b492da3c977109e36bc
|
@@ -63,7 +63,20 @@ module Landrush
|
|
63
63
|
end
|
64
64
|
|
65
65
|
def machine_hostname
|
66
|
-
|
66
|
+
@machine_hostname ||= read_machine_hostname
|
67
|
+
end
|
68
|
+
|
69
|
+
def read_machine_hostname
|
70
|
+
# Get hostname from vm config.
|
71
|
+
return machine.config.vm.hostname if machine.config.vm.hostname.to_s.length > 0
|
72
|
+
|
73
|
+
# Or gt machine's current hostname.
|
74
|
+
machine.communicate.execute("hostname") do |type, data|
|
75
|
+
return data if type == :stdout && data.to_s.length > 0
|
76
|
+
end
|
77
|
+
|
78
|
+
# Or default to "guest-vm"
|
79
|
+
return "guest-vm"
|
67
80
|
end
|
68
81
|
|
69
82
|
def enabled?
|
@@ -23,7 +23,7 @@ module Landrush
|
|
23
23
|
when :virtualbox then
|
24
24
|
'10.0.2.2'
|
25
25
|
when :vmware_fusion then
|
26
|
-
_gateway_for_ip(machine.guest.capability(:
|
26
|
+
_gateway_for_ip(machine.guest.capability(:configured_dns_servers).first)
|
27
27
|
when :parallels then
|
28
28
|
machine.provider.capability(:host_address)
|
29
29
|
end
|
data/lib/landrush/config.rb
CHANGED
@@ -73,13 +73,6 @@ module Landrush
|
|
73
73
|
|
74
74
|
def validate(machine)
|
75
75
|
errors = _detected_errors
|
76
|
-
|
77
|
-
if enabled?
|
78
|
-
unless machine.config.vm.hostname.to_s.length > 0
|
79
|
-
errors << 'you must specify a hostname so we can make a DNS entry for it'
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
76
|
{ 'landrush' => errors }
|
84
77
|
end
|
85
78
|
end
|
data/lib/landrush/plugin.rb
CHANGED
@@ -76,9 +76,9 @@ module Landrush
|
|
76
76
|
Cap::Redhat::InstallIptables
|
77
77
|
end
|
78
78
|
|
79
|
-
guest_capability('linux', '
|
80
|
-
require_relative 'cap/linux/
|
81
|
-
Cap::Linux::
|
79
|
+
guest_capability('linux', 'configured_dns_servers') do
|
80
|
+
require_relative 'cap/linux/configured_dns_servers'
|
81
|
+
Cap::Linux::ConfiguredDnsServers
|
82
82
|
end
|
83
83
|
|
84
84
|
guest_capability('linux', 'redirect_dns') do
|
data/lib/landrush/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: landrush
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Hinze
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubydns
|