Sha256: ed70703fcf6d9e9ef59cb65c5018df74f7737a39d6b378f0527809261b0c5d39

Contents?: true

Size: 688 Bytes

Versions: 2

Compression:

Stored size: 688 Bytes

Contents

module DNSimpleHelpers
  def setup_dnsimple_credentials
    config_file = File.expand_path('~/.dnsimple')
    unless File.exists? config_file
      File.open(config_file, "w") do |file|
        file << <<-EOS.gsub(/^\s{8}/, '')
        username: ossgrants+dnsimple@engineyard.com
        password: dnsimple1
        site:     https://test.dnsimple.com/
        EOS
      end
    end
    require "dnsimple"
    DNSimple::Client.load_credentials(config_file)
  end
  
  def create_dnsimple_domain(domain)
    begin
      ::DNSimple::Commands::DeleteDomain.new.execute([domain])
    rescue
    end
    ::DNSimple::Commands::CreateDomain.new.execute([domain])
  end
end
World(DNSimpleHelpers)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
engineyard-dnsimple-0.2.0 features/support/dnsimple.rb
engineyard-dnsimple-0.1.2 features/support/dnsimple.rb