From 25b69f828901cf9358c7b9411df1abde706c8bbf Mon Sep 17 00:00:00 2001 From: Shawn Catanzarite Date: Sat, 21 Sep 2013 12:38:15 -0700 Subject: [PATCH] remove commented code and update API version --- lib/fog/dynect/dns.rb | 4 ++-- lib/fog/dynect/models/dns/records.rb | 13 +------------ 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/lib/fog/dynect/dns.rb b/lib/fog/dynect/dns.rb index 7bdd298ee..34f0155c7 100644 --- a/lib/fog/dynect/dns.rb +++ b/lib/fog/dynect/dns.rb @@ -70,7 +70,7 @@ module Fog @path = options[:path] || '/REST' @persistent = options[:persistent] || false @scheme = options[:scheme] || 'https' - @version = options[:version] || '2.3.1' + @version = options[:version] || '3.5.2' @connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}", @persistent, @connection_options) end @@ -85,7 +85,7 @@ module Fog params[:headers] ||= {} params[:headers]['Content-Type'] = 'application/json' - #params[:headers]['API-Version'] = @version + params[:headers]['API-Version'] = @version params[:headers]['Auth-Token'] = auth_token unless params[:path] == 'Session' params[:path] = "#{@path}/#{params[:path]}" unless params[:path] =~ %r{^#{Regexp.escape(@path)}/} diff --git a/lib/fog/dynect/models/dns/records.rb b/lib/fog/dynect/models/dns/records.rb index 496f1f3df..87c81e7d0 100644 --- a/lib/fog/dynect/models/dns/records.rb +++ b/lib/fog/dynect/models/dns/records.rb @@ -15,21 +15,10 @@ module Fog requires :zone data = [] service.get_all_records(zone.domain, options).body['data'].each do |url| - (_, r, t, z, fqdn, id) = url.split('/') + (_, _, t, _, fqdn, id) = url.split('/') type = t.gsub(/Record$/, '') record = service.get_record(type, zone.domain, fqdn, 'record_id' => id).body['data'] - # data in format ['/REST/xRecord/domain/fqdn/identity] - #records.map! do |record| - # tokens = record.split('/') - # { - # :identity => tokens.last, - # :fqdn => fqdn, - # :type => tokens[2][0...-6] # everything before 'Record' - # } - #end - # - #data.concat(records) data << { :identity => record['record_id'], :fqdn => record['fqdn'],