Closed dwradcliffe closed 8 years ago
Returning an array doesn't seem right, neither does fragmenting the API by adding a new method.
How about 'unrolling' the extra ORIGIN
directives? by that I mean if you did a load
then dump
, the dump would exclude the ORIGIN directives, although the records would have been adjusted.
I think unrolling makes sense. I'll give that a shot.
Cool. Looking forward to your contribution :)
Ok, pushed new code that seems to be working for me. I had to add a test to make sure the labels were correct with normal zone files because that case wasn't being tested.
Also I think there's a problem with the gem dependencies on ruby 1.9 which causes CI to fail.
Thanks @dwradcliffe
I need to be able to parse a zone file with multiple ORIGIN directives. I can try to add this, but I'd like to see what the best API change would be. I've created a failing test to look at one option.
One option would be to return an array of zones when the zone file has multiple origins. This is slightly unexpected behavior, so another option would be to move it to another method, like
DNS::Zone.load_multiple
or something.@lantins Any thoughts before I start my implementation?