2014-12-30 17:25:09 -05:00
|
|
|
def dns_providers
|
|
|
|
{
|
2018-10-16 18:12:42 -04:00
|
|
|
aws: {
|
|
|
|
mocked: false
|
2014-12-30 17:25:09 -05:00
|
|
|
},
|
2018-10-16 18:12:42 -04:00
|
|
|
bluebox: {
|
|
|
|
mocked: false,
|
|
|
|
zone_attributes: {
|
|
|
|
ttl: 60
|
2014-12-30 17:25:09 -05:00
|
|
|
}
|
|
|
|
},
|
2018-10-16 18:12:42 -04:00
|
|
|
dnsimple: {
|
|
|
|
mocked: false
|
2014-12-30 17:25:09 -05:00
|
|
|
},
|
2018-10-16 18:12:42 -04:00
|
|
|
dnsmadeeasy: {
|
|
|
|
mocked: false
|
2014-12-30 17:25:09 -05:00
|
|
|
},
|
2018-10-16 18:12:42 -04:00
|
|
|
dynect: {
|
|
|
|
mocked: false,
|
|
|
|
zone_attributes: {
|
|
|
|
email: 'fog@example.com'
|
2014-12-30 17:25:09 -05:00
|
|
|
}
|
|
|
|
},
|
2018-10-16 18:12:42 -04:00
|
|
|
linode: {
|
|
|
|
mocked: false,
|
|
|
|
zone_attributes: {
|
|
|
|
email: 'fog@example.com'
|
2014-12-30 17:25:09 -05:00
|
|
|
}
|
|
|
|
},
|
2018-10-16 18:12:42 -04:00
|
|
|
zerigo: {
|
|
|
|
mocked: false
|
2014-12-30 17:25:09 -05:00
|
|
|
},
|
2018-10-16 18:12:42 -04:00
|
|
|
rackspace: {
|
|
|
|
mocked: false,
|
|
|
|
zone_attributes: {
|
|
|
|
email: 'fog@example.com'
|
2014-12-30 17:25:09 -05:00
|
|
|
}
|
|
|
|
},
|
2018-10-16 18:12:42 -04:00
|
|
|
rage4: {
|
|
|
|
mocked: false
|
2014-12-30 17:25:09 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2018-10-16 18:12:42 -04:00
|
|
|
def generate_unique_domain(with_trailing_dot = false)
|
|
|
|
# get time (with 1/100th of sec accuracy)
|
|
|
|
# want unique domain name and if provider is fast,
|
|
|
|
# this can be called more than once per second
|
|
|
|
time = (Time.now.to_f * 100).to_i
|
2014-12-30 17:25:09 -05:00
|
|
|
domain = 'test-' + time.to_s + '.com'
|
|
|
|
if with_trailing_dot
|
2018-10-16 18:12:42 -04:00
|
|
|
domain += '.'
|
2014-12-30 17:25:09 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
domain
|
|
|
|
end
|