vagrant-subdomains-updater 0.1.4
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 +13 -0
- data/.ruby-version +1 -0
- data/Gemfile +9 -0
- data/LICENSE.txt +21 -0
- data/README.md +89 -0
- data/Rakefile +1 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/vagrant-subdomains-updater.rb +13 -0
- data/lib/vagrant-subdomains-updater/action.rb +24 -0
- data/lib/vagrant-subdomains-updater/action/remove_dns_records.rb +22 -0
- data/lib/vagrant-subdomains-updater/action/set_dns_records.rb +28 -0
- data/lib/vagrant-subdomains-updater/command.rb +60 -0
- data/lib/vagrant-subdomains-updater/config.rb +53 -0
- data/lib/vagrant-subdomains-updater/plugin.rb +41 -0
- data/lib/vagrant-subdomains-updater/registrar.rb +25 -0
- data/lib/vagrant-subdomains-updater/registrar/ovh.rb +75 -0
- data/lib/vagrant-subdomains-updater/version.rb +5 -0
- data/vagrant-subdomains-updater.gemspec +28 -0
- metadata +109 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 275bd134be05f36710155c2179c230a60ae14e9a9fa6c4e181c6f9eea84ad402
|
4
|
+
data.tar.gz: 5437ae0382618572e1de534249020fc6106a77d4e2e8aa38a8f1f2cfc4f39318
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 55bc4276f7b7e8bbf1bdadfa274ebe5fd85bb42cbb9e37bbbec345bc3406e513900af0cfeb15d4adf69d5bb93d52c2716f6e4fa9b76b8632f219ff1b97ef4b2b
|
7
|
+
data.tar.gz: 38f5c3ba03b1257870c19a85b3d0aa62cd8ab7ddd298dfdd8e456e201038d9ac7e4bfb955c559a12c14cdb0edbd826a714312e9ddeb1b0eb192e3be8d126ae93
|
data/.gitignore
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.2.2
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Nassim Kacha
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
# vagrant-subdomains-updater
|
2
|
+
|
3
|
+
[](http://badge.fury.io/rb/vagrant-subdomains-updater)
|
4
|
+
[](https://codeclimate.com/github/illuin-tech/vagrant-subdomains-updater)
|
5
|
+
|
6
|
+
## Introduction
|
7
|
+
|
8
|
+
`vagrant-subdomains-updater` allows you to automatically configure subdomains with the ip of your vagrant instance using your registrar API.
|
9
|
+
|
10
|
+
Difference with the [upstream](https://github.com/nasskach/vagrant-dns-updater) : `vagrant-subdomains-updater` handles multiple subdomains instead of a single one.
|
11
|
+
|
12
|
+
## Important
|
13
|
+
- This plugin is currently only compatible with Linux guests.
|
14
|
+
- Only OVH registrar is supported for the moment.
|
15
|
+
|
16
|
+
## Installation
|
17
|
+
|
18
|
+
$ vagrant plugin install vagrant-subdomains-updater
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
Configuration example for OVH:
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
Vagrant.configure(2) do |config|
|
26
|
+
# for the moment only "ovh" is supported
|
27
|
+
config.subdomainsupdater.registrar = "ovh"
|
28
|
+
|
29
|
+
# API credentials, specific to OVH
|
30
|
+
# for more information read the OVH section below
|
31
|
+
config.subdomainsupdater.appkey = "XXXXXXXX"
|
32
|
+
config.subdomainsupdater.appsecret = "YYYYYYYYYYYYYYYYYY"
|
33
|
+
config.subdomainsupdater.consumerkey = "ZZZZZZZZZZZZZZZZZZZ"
|
34
|
+
|
35
|
+
# domain settings, test.mydomain.com in our example
|
36
|
+
config.subdomainsupdater.zone = "mydomain.com"
|
37
|
+
config.subdomainsupdater.subdomains = ["test"]
|
38
|
+
|
39
|
+
# the network interface on which retreive the ip
|
40
|
+
config.subdomainsupdater.interface = "eth2"
|
41
|
+
|
42
|
+
# ttl is optional, default value is set to 60 seconds
|
43
|
+
config.subdomainsupdater.ttl = "120"
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
## Registrars
|
48
|
+
### OVH
|
49
|
+
|
50
|
+
First you need an `appkey` and an `appsecret` which can be obtained [here](https://www.ovh.com/fr/cgi-bin/api/createApplication.cgi).
|
51
|
+
|
52
|
+
You will also need a `consumerkey`, you can get it using the `ovh-consumer-key` command provided by this plugin:
|
53
|
+
|
54
|
+
```
|
55
|
+
vagrant ovh-consumer-key <appkey>
|
56
|
+
```
|
57
|
+
|
58
|
+
This command will display a `consumerkey` and a `validationUrl`, the `consumerkey` need a validation before use, this
|
59
|
+
can be done by following the `validationUrl` and entering your credentials.
|
60
|
+
|
61
|
+
Finally you can add the following parameters to your Vagrantfile.
|
62
|
+
|
63
|
+
```ruby
|
64
|
+
Vagrant.configure(2) do |config|
|
65
|
+
config.subdomainsupdater.registrar = "ovh"
|
66
|
+
config.subdomainsupdater.appkey = "XXXXXXXX"
|
67
|
+
config.subdomainsupdater.appsecret = "YYYYYYYYYYYYYYYYYY"
|
68
|
+
config.subdomainsupdater.consumerkey = "ZZZZZZZZZZZZZZZZZZZ"
|
69
|
+
config.subdomainsupdater.zone = "mydomain.com"
|
70
|
+
config.subdomainsupdater.subdomains = ["test"]
|
71
|
+
config.subdomainsupdater.interface = "eth2"
|
72
|
+
end
|
73
|
+
```
|
74
|
+
|
75
|
+
## ToDo
|
76
|
+
|
77
|
+
- Improve error handling.
|
78
|
+
- Support additional registrars : gandi, ultradns, ...
|
79
|
+
- Write tests.
|
80
|
+
|
81
|
+
## Contributing
|
82
|
+
|
83
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/illuin-tech/vagrant-subdomains-updater.
|
84
|
+
|
85
|
+
|
86
|
+
## License
|
87
|
+
|
88
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
89
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "vagrant/dns/updater"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
require 'vagrant-subdomains-updater/plugin'
|
3
|
+
|
4
|
+
module VagrantPlugins
|
5
|
+
module SubdomainsUpdater
|
6
|
+
lib_root = File.dirname(File.absolute_path(__FILE__))
|
7
|
+
Dir.glob(lib_root + '/vagrant-subdomains-updater/registrar/*') {|file| require file}
|
8
|
+
|
9
|
+
def self.source_root
|
10
|
+
@source_root ||= Pathname.new(File.expand_path('../../', __FILE__))
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require_relative 'action/set_dns_records'
|
2
|
+
require_relative 'action/remove_dns_records'
|
3
|
+
|
4
|
+
module VagrantPlugins
|
5
|
+
module SubdomainsUpdater
|
6
|
+
module Action
|
7
|
+
include Vagrant::Action::Builtin
|
8
|
+
|
9
|
+
def self.set_dns_records
|
10
|
+
Vagrant::Action::Builder.new.tap do |builder|
|
11
|
+
builder.use ConfigValidate
|
12
|
+
builder.use SetDnsRecords
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.remove_dns_records
|
17
|
+
Vagrant::Action::Builder.new.tap do |builder|
|
18
|
+
builder.use ConfigValidate
|
19
|
+
builder.use RemoveDnsRecords
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module SubdomainsUpdater
|
3
|
+
module Action
|
4
|
+
class RemoveDnsRecords
|
5
|
+
|
6
|
+
def initialize(app, env)
|
7
|
+
@app = app
|
8
|
+
@machine = env[:machine]
|
9
|
+
end
|
10
|
+
|
11
|
+
def call(env)
|
12
|
+
config = @machine.config.subdomainsupdater
|
13
|
+
unless config.registrar.nil?
|
14
|
+
registrar = Registrar::Registrar.load config
|
15
|
+
registrar.remove_dns_records
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module SubdomainsUpdater
|
3
|
+
module Action
|
4
|
+
class SetDnsRecords
|
5
|
+
|
6
|
+
def initialize(app, env)
|
7
|
+
@app = app
|
8
|
+
@machine = env[:machine]
|
9
|
+
end
|
10
|
+
|
11
|
+
def call(env)
|
12
|
+
config = @machine.config.subdomainsupdater
|
13
|
+
unless config.registrar.nil?
|
14
|
+
interface = config.interface
|
15
|
+
registrar = Registrar::Registrar.load config
|
16
|
+
@machine.communicate.execute("ip addr show #{interface} | awk '/inet/ && /#{interface}/{sub(/\\/.*$/,\"\",$2); print $2}'") do |type, output|
|
17
|
+
raise Vagrant::Errors::VagrantError.new, output if type.to_s == 'stderr'
|
18
|
+
ip = output
|
19
|
+
@machine.ui.info("Pointing #{config.subdomains.join(', ')} subdomains for zone #{config.zone} to #{ip}")
|
20
|
+
registrar.set_dns_records ip
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require 'ovh/rest'
|
2
|
+
|
3
|
+
module VagrantPlugins
|
4
|
+
module SubdomainsUpdater
|
5
|
+
class Command < Vagrant.plugin('2', :command)
|
6
|
+
|
7
|
+
def self.synopsis
|
8
|
+
'Get OVH consumer key'
|
9
|
+
end
|
10
|
+
|
11
|
+
def execute
|
12
|
+
access = {
|
13
|
+
"accessRules" => [
|
14
|
+
{ "method" => "GET", "path" => "/domain/*" },
|
15
|
+
{ "method" => "POST", "path" => "/domain/*" },
|
16
|
+
{ "method" => "PUT", "path" => "/domain/*" },
|
17
|
+
{ "method" => "DELETE", "path" => "/domain/*" },
|
18
|
+
]
|
19
|
+
}
|
20
|
+
|
21
|
+
argv = parse_args
|
22
|
+
|
23
|
+
result = OVH::REST.generate_consumer_key(argv, access)
|
24
|
+
|
25
|
+
raise Vagrant::Errors::VagrantError.new, result['message'] if result['message'] == 'Invalid application key'
|
26
|
+
|
27
|
+
puts <<-EOF
|
28
|
+
validationUrl: #{result['validationUrl']}
|
29
|
+
consumerkey: #{result['consumerKey']}
|
30
|
+
EOF
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
private
|
36
|
+
|
37
|
+
|
38
|
+
def parse_args
|
39
|
+
opts = OptionParser.new do |o|
|
40
|
+
o.banner = 'Usage: vagrant ovh-consumer-key [options] <appkey>'
|
41
|
+
o.separator ''
|
42
|
+
|
43
|
+
o.on('-h', '--help', 'Print this help') do
|
44
|
+
safe_puts(opts.help)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
args = parse_options(opts)
|
49
|
+
|
50
|
+
if args.length != 1
|
51
|
+
safe_puts(opts.help)
|
52
|
+
exit 1
|
53
|
+
end
|
54
|
+
|
55
|
+
args[0]
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'vagrant'
|
2
|
+
|
3
|
+
module VagrantPlugins
|
4
|
+
module SubdomainsUpdater
|
5
|
+
class Config < Vagrant.plugin(2, :config)
|
6
|
+
attr_accessor :registrar
|
7
|
+
attr_accessor :appkey
|
8
|
+
attr_accessor :appsecret
|
9
|
+
attr_accessor :consumerkey
|
10
|
+
attr_accessor :zone
|
11
|
+
attr_accessor :subdomains
|
12
|
+
attr_accessor :interface
|
13
|
+
attr_accessor :ttl
|
14
|
+
|
15
|
+
|
16
|
+
def initialize
|
17
|
+
@registrar = UNSET_VALUE
|
18
|
+
@appkey = UNSET_VALUE
|
19
|
+
@appsecret = UNSET_VALUE
|
20
|
+
@consumerkey = UNSET_VALUE
|
21
|
+
@zone = UNSET_VALUE
|
22
|
+
@subdomains = UNSET_VALUE
|
23
|
+
@interface = UNSET_VALUE
|
24
|
+
@ttl = UNSET_VALUE
|
25
|
+
end
|
26
|
+
|
27
|
+
def finalize!
|
28
|
+
@registrar = nil if @registrar == UNSET_VALUE
|
29
|
+
@appkey = nil if @appkey == UNSET_VALUE
|
30
|
+
@appsecret = nil if @appsecret == UNSET_VALUE
|
31
|
+
@consumerkey = nil if @consumerkey == UNSET_VALUE
|
32
|
+
@zone = nil if @zone == UNSET_VALUE
|
33
|
+
@subdomains = nil if @subdomains == UNSET_VALUE
|
34
|
+
@interface = nil if @interface == UNSET_VALUE
|
35
|
+
@ttl = 60 if @ttl == UNSET_VALUE
|
36
|
+
end
|
37
|
+
|
38
|
+
def validate(machine)
|
39
|
+
finalize!
|
40
|
+
errors = []
|
41
|
+
errors << 'appkey parameter is required' if @appkey.nil? && @registrar == 'ovh'
|
42
|
+
errors << 'appsecret parameter is required' if @appsecret.nil? && @registrar == 'ovh'
|
43
|
+
errors << 'consumerkey parameter is required' if @consumerkey.nil? && @registrar == 'ovh'
|
44
|
+
errors << 'zone parameter is required' if @zone.nil? && !@registrar.nil?
|
45
|
+
errors << 'subdomains parameter is required' if @subdomains.nil? && !@registrar.nil?
|
46
|
+
errors << 'interface parameter is required' if @interface.nil? && !@registrar.nil?
|
47
|
+
|
48
|
+
{ "SubdomainsUpdater" => errors }
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'vagrant'
|
2
|
+
require_relative 'action'
|
3
|
+
require_relative 'registrar'
|
4
|
+
|
5
|
+
module VagrantPlugins
|
6
|
+
module SubdomainsUpdater
|
7
|
+
class Plugin < Vagrant.plugin('2')
|
8
|
+
Vagrant.require_version('>= 1.5.1')
|
9
|
+
|
10
|
+
name 'dns-updater'
|
11
|
+
|
12
|
+
description <<-DESC
|
13
|
+
This plugin allows you to automatically configure subdomains
|
14
|
+
with the ip of your vagrant instance using your registrar API.
|
15
|
+
DESC
|
16
|
+
|
17
|
+
|
18
|
+
command "ovh-consumer-key" do
|
19
|
+
require_relative "command"
|
20
|
+
Command
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
config "subdomainsupdater" do
|
25
|
+
require_relative "config"
|
26
|
+
Config
|
27
|
+
end
|
28
|
+
|
29
|
+
%w{up provision}.each do |action|
|
30
|
+
action_hook :subdomainsupdater, "machine_action_#{action}".to_sym do |hook|
|
31
|
+
hook.append Action.set_dns_records
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
action_hook :subdomainsupdater, "machine_action_destroy".to_sym do |hook|
|
36
|
+
hook.append Action.remove_dns_records
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module SubdomainsUpdater
|
3
|
+
module Registrar
|
4
|
+
class Registrar
|
5
|
+
|
6
|
+
@@registrars = {}
|
7
|
+
|
8
|
+
def self.load(config)
|
9
|
+
registrar = @@registrars[config.registrar]
|
10
|
+
if registrar
|
11
|
+
registrar.new config
|
12
|
+
else
|
13
|
+
raise Vagrant::Errors::VagrantError.new,
|
14
|
+
"SubdomainsUpdater: The registrar \"#{config.registrar}\" is not supported."
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.register_registrar(name)
|
19
|
+
@@registrars[name] = self
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require 'ovh/rest'
|
2
|
+
|
3
|
+
module VagrantPlugins
|
4
|
+
module SubdomainsUpdater
|
5
|
+
module Registrar
|
6
|
+
class Ovh < Registrar
|
7
|
+
|
8
|
+
register_registrar 'ovh'
|
9
|
+
|
10
|
+
def initialize(config)
|
11
|
+
@zone = config.zone
|
12
|
+
@subdomains = config.subdomains
|
13
|
+
@ttl = config.ttl
|
14
|
+
@api = OVH::REST.new config.appkey, config.appsecret, config.consumerkey
|
15
|
+
end
|
16
|
+
|
17
|
+
def set_dns_records(ip)
|
18
|
+
@subdomains.each do |subdomain|
|
19
|
+
set_dns_record(ip, subdomain)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def set_dns_record(ip, subdomain)
|
24
|
+
begin
|
25
|
+
record_id = get_record_id(subdomain)
|
26
|
+
if record_id.nil?
|
27
|
+
@api.post("/domain/zone/#{@zone}/record", {
|
28
|
+
'fieldType' => 'A',
|
29
|
+
'target' => ip,
|
30
|
+
'subDomain' => subdomain,
|
31
|
+
'ttl' => @ttl})
|
32
|
+
else
|
33
|
+
@api.put("/domain/zone/#{@zone}/record/#{record_id}", {
|
34
|
+
'target' => ip,
|
35
|
+
'subDomain' => subdomain,
|
36
|
+
'ttl' => @ttl})
|
37
|
+
end
|
38
|
+
|
39
|
+
@api.post("/domain/zone/#{@zone}/refresh")
|
40
|
+
rescue OVH::RESTError => error
|
41
|
+
raise Vagrant::Errors::VagrantError.new, "SubdomainsUpdater: #{error}"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def remove_dns_records
|
46
|
+
@subdomains.each do |subdomain|
|
47
|
+
remove_dns_record(subdomain)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def remove_dns_record(subdomain)
|
52
|
+
begin
|
53
|
+
record_id = get_record_id(subdomain)
|
54
|
+
@api.delete("/domain/zone/#{@zone}/record/#{record_id}") unless record_id.nil?
|
55
|
+
rescue OVH::RESTError => error
|
56
|
+
raise Vagrant::Errors::VagrantError.new, "SubdomainsUpdater: #{error}"
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
|
61
|
+
private
|
62
|
+
|
63
|
+
def get_record_id(subdomain)
|
64
|
+
records = @api.get("/domain/zone/#{@zone}/record")
|
65
|
+
records.each do |r|
|
66
|
+
record = @api.get("/domain/zone/#{@zone}/record/#{r}")
|
67
|
+
return r if record['subDomain'] == subdomain
|
68
|
+
end
|
69
|
+
nil
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'vagrant-subdomains-updater/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "vagrant-subdomains-updater"
|
8
|
+
spec.version = VagrantPlugins::SubdomainsUpdater::VERSION
|
9
|
+
spec.authors = ["Illuin Technology"]
|
10
|
+
spec.email = ["contact+rubygems@illuin.tech"]
|
11
|
+
|
12
|
+
spec.description = 'A Vagrant plugin that allows you to automatically configure subdomains' \
|
13
|
+
' with the ip of your vagrant instance using your registrar API.' \
|
14
|
+
' Only the registrar OVH is supported at the moment.'
|
15
|
+
spec.summary = spec.description
|
16
|
+
spec.homepage = "https://github.com/illuin-tech/vagrant-subdomains-updater"
|
17
|
+
spec.license = "MIT"
|
18
|
+
|
19
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
+
spec.bindir = "exe"
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.add_dependency 'ovh-rest', '~> 0.0.5'
|
25
|
+
|
26
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
27
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vagrant-subdomains-updater
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.4
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Illuin Technology
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-03-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: ovh-rest
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.0.5
|
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.5
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.10'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.10'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
description: A Vagrant plugin that allows you to automatically configure subdomains
|
56
|
+
with the ip of your vagrant instance using your registrar API. Only the registrar
|
57
|
+
OVH is supported at the moment.
|
58
|
+
email:
|
59
|
+
- contact+rubygems@illuin.tech
|
60
|
+
executables: []
|
61
|
+
extensions: []
|
62
|
+
extra_rdoc_files: []
|
63
|
+
files:
|
64
|
+
- ".gitignore"
|
65
|
+
- ".ruby-version"
|
66
|
+
- Gemfile
|
67
|
+
- LICENSE.txt
|
68
|
+
- README.md
|
69
|
+
- Rakefile
|
70
|
+
- bin/console
|
71
|
+
- bin/setup
|
72
|
+
- lib/vagrant-subdomains-updater.rb
|
73
|
+
- lib/vagrant-subdomains-updater/action.rb
|
74
|
+
- lib/vagrant-subdomains-updater/action/remove_dns_records.rb
|
75
|
+
- lib/vagrant-subdomains-updater/action/set_dns_records.rb
|
76
|
+
- lib/vagrant-subdomains-updater/command.rb
|
77
|
+
- lib/vagrant-subdomains-updater/config.rb
|
78
|
+
- lib/vagrant-subdomains-updater/plugin.rb
|
79
|
+
- lib/vagrant-subdomains-updater/registrar.rb
|
80
|
+
- lib/vagrant-subdomains-updater/registrar/ovh.rb
|
81
|
+
- lib/vagrant-subdomains-updater/version.rb
|
82
|
+
- vagrant-subdomains-updater.gemspec
|
83
|
+
homepage: https://github.com/illuin-tech/vagrant-subdomains-updater
|
84
|
+
licenses:
|
85
|
+
- MIT
|
86
|
+
metadata: {}
|
87
|
+
post_install_message:
|
88
|
+
rdoc_options: []
|
89
|
+
require_paths:
|
90
|
+
- lib
|
91
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '0'
|
101
|
+
requirements: []
|
102
|
+
rubyforge_project:
|
103
|
+
rubygems_version: 2.7.6
|
104
|
+
signing_key:
|
105
|
+
specification_version: 4
|
106
|
+
summary: A Vagrant plugin that allows you to automatically configure subdomains with
|
107
|
+
the ip of your vagrant instance using your registrar API. Only the registrar OVH
|
108
|
+
is supported at the moment.
|
109
|
+
test_files: []
|