config/webfaction.rb
# Test if a domain/subdomain exists in WebFaction account
Test if a domain/subdomain exists in WebFaction account
Test if a domain / subdomain exists in WebFaction account
def wf_domain_exists(domain)
  domain_split = split_domain(domain)
  objs = @wf_server.call('list_domains', @wf_session);
  objs.each do |obj|
    if obj['domain'] == domain_split[:domain]
      if domain_split[:subdomain].empty? || obj['subdomains'].include?(domain_split[:subdomain])
        return true
      end
    end
  end
  return false
end
def wf_domain_exists ( domain ) domain_split = split_domain ( domain ) objs = @wf_server . call ( 'list_domains' , @wf_session ) ; objs . each do | obj | if obj [ 'domain' ] == domain_split [ :domain ] if domain_split [ :subdomain ] . empty? || obj [ 'subdomains' ] . include? ( domain_split [ :subdomain ] ) return true end end end return false end
Test if a domain/subdomain exists in WebFaction account
Test if a domain / subdomain exists in WebFaction account
domain