vagrant-subdomains-updater 0.1.4 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 275bd134be05f36710155c2179c230a60ae14e9a9fa6c4e181c6f9eea84ad402
4
- data.tar.gz: 5437ae0382618572e1de534249020fc6106a77d4e2e8aa38a8f1f2cfc4f39318
3
+ metadata.gz: ed8286931b93415b50a65c9f58dcb517c527a0370f1c8f2bf55f70138570d29e
4
+ data.tar.gz: dcc617e0bef04527ed68e847be105e3dcee7d324c0fbe977dcab5a011935cfdb
5
5
  SHA512:
6
- metadata.gz: 55bc4276f7b7e8bbf1bdadfa274ebe5fd85bb42cbb9e37bbbec345bc3406e513900af0cfeb15d4adf69d5bb93d52c2716f6e4fa9b76b8632f219ff1b97ef4b2b
7
- data.tar.gz: 38f5c3ba03b1257870c19a85b3d0aa62cd8ab7ddd298dfdd8e456e201038d9ac7e4bfb955c559a12c14cdb0edbd826a714312e9ddeb1b0eb192e3be8d126ae93
6
+ metadata.gz: e3f1d0691999cb741fd98d5eb7775298917aed07ecdac9a28f77bb43aef8806a8ec4cf9c885df7f51404fb3c980ae19673f1e156e6f39c1e9aef781931189ca1
7
+ data.tar.gz: 0ab7a1ab865a8ce1e1452b5e955bb25d7af8cd709247175b1185c7f20be89c520117b69592a89b3035c05408795a770ef048eb7d4240c07dc7ae17b666475c4d
@@ -1 +1 @@
1
- 2.2.2
1
+ 2.6.3
data/README.md CHANGED
@@ -11,6 +11,7 @@ Difference with the [upstream](https://github.com/nasskach/vagrant-dns-updater)
11
11
 
12
12
  ## Important
13
13
  - This plugin is currently only compatible with Linux guests.
14
+ - autodetect interface if no interface specified
14
15
  - Only OVH registrar is supported for the moment.
15
16
 
16
17
  ## Installation
@@ -13,6 +13,13 @@ module VagrantPlugins
13
13
  unless config.registrar.nil?
14
14
  interface = config.interface
15
15
  registrar = Registrar::Registrar.load config
16
+ if interface.nil?
17
+ @machine.communicate.execute("ip addr show | grep BROADCAST |head -n 1|cut -d':' -f2") do |type, output|
18
+ raise Vagrant::Errors::VagrantError.new, output if type.to_s == 'stderr'
19
+ interface = output.strip
20
+ @machine.ui.warn("No interface given. Using first interface found, #{interface}")
21
+ end
22
+ end
16
23
  @machine.communicate.execute("ip addr show #{interface} | awk '/inet/ && /#{interface}/{sub(/\\/.*$/,\"\",$2); print $2}'") do |type, output|
17
24
  raise Vagrant::Errors::VagrantError.new, output if type.to_s == 'stderr'
18
25
  ip = output
@@ -43,7 +43,6 @@ module VagrantPlugins
43
43
  errors << 'consumerkey parameter is required' if @consumerkey.nil? && @registrar == 'ovh'
44
44
  errors << 'zone parameter is required' if @zone.nil? && !@registrar.nil?
45
45
  errors << 'subdomains parameter is required' if @subdomains.nil? && !@registrar.nil?
46
- errors << 'interface parameter is required' if @interface.nil? && !@registrar.nil?
47
46
 
48
47
  { "SubdomainsUpdater" => errors }
49
48
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module SubdomainsUpdater
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-subdomains-updater
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Illuin Technology
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-12 00:00:00.000000000 Z
11
+ date: 2020-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ovh-rest
@@ -99,8 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  - !ruby/object:Gem::Version
100
100
  version: '0'
101
101
  requirements: []
102
- rubyforge_project:
103
- rubygems_version: 2.7.6
102
+ rubygems_version: 3.0.6
104
103
  signing_key:
105
104
  specification_version: 4
106
105
  summary: A Vagrant plugin that allows you to automatically configure subdomains with