mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[dnsimple|dns] add dnsimple_url param to facilitate using https://test.dnsimple.com
closes #323
This commit is contained in:
parent
96a3d07d86
commit
91d6e8ee4e
1 changed files with 7 additions and 1 deletions
|
@ -3,7 +3,7 @@ module Fog
|
|||
class DNS < Fog::Service
|
||||
|
||||
requires :dnsimple_email, :dnsimple_password
|
||||
recognizes :host, :path, :port, :scheme, :persistent
|
||||
recognizes :dnsimple_url, :host, :path, :port, :scheme, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/dns/models/dnsimple'
|
||||
|
@ -71,6 +71,12 @@ module Fog
|
|||
|
||||
@dnsimple_email = options[:dnsimple_email]
|
||||
@dnsimple_password = options[:dnsimple_password]
|
||||
if options[:dnsimple_url]
|
||||
uri = URI.parse(options[:dnsimple_url])
|
||||
options[:host] = uri.host
|
||||
options[:port] = uri.port
|
||||
options[:scheme] = uri.scheme
|
||||
end
|
||||
@host = options[:host] || "dnsimple.com"
|
||||
@port = options[:port] || 443
|
||||
@scheme = options[:scheme] || 'https'
|
||||
|
|
Loading…
Add table
Reference in a new issue