mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Tidy up a bit.
This commit is contained in:
parent
a9fdddbc1b
commit
18c672f194
2 changed files with 5 additions and 7 deletions
|
@ -27,10 +27,7 @@ module Fog
|
|||
def post_record(type, zone, fqdn, rdata, options = {})
|
||||
raise Fog::Dynect::DNS::NotFound unless zone = self.data[:zones][zone]
|
||||
|
||||
records = zone[:records] ||= Hash.new do |hash, type|
|
||||
hash[type] = []
|
||||
end
|
||||
|
||||
records = zone[:records]
|
||||
record_id = zone[:next_record_id]
|
||||
zone[:next_record_id] += 1
|
||||
|
||||
|
|
|
@ -30,8 +30,11 @@ module Fog
|
|||
|
||||
class Mock
|
||||
def post_zone(rname, ttl, zone, options = {})
|
||||
new_zone = {
|
||||
new_zone = self.data[:zones][zone] = {
|
||||
:next_record_id => 0,
|
||||
:records => Hash.new do |records_hash, type|
|
||||
records_hash[type] = []
|
||||
end,
|
||||
:records_to_delete => [],
|
||||
:rname => rname,
|
||||
:serial_style => options[:serial_style] || "increment",
|
||||
|
@ -41,8 +44,6 @@ module Fog
|
|||
:zone_type => "Primary"
|
||||
}
|
||||
|
||||
self.data[:zones][zone] = new_zone
|
||||
|
||||
response = Excon::Response.new
|
||||
response.status = 200
|
||||
response.body = {
|
||||
|
|
Loading…
Add table
Reference in a new issue