Skip to content

Commit 7555cdd

Browse files
committed
Fix type handling
Both the guts of the PuppetBind::Provider::Nsupdate module and the type method of the dns_rr(nsupdate) provider produce and expect the type expressed as a string, but the resource_record(nsupdate) provider's type method produces symbols. This accidentally worked for a while, then it didn't. Also, in quoted_type? that's supposed to be an array of strings, not a quoted string.
1 parent 7edd25a commit 7555cdd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/puppet/provider/resource_record/nsupdate.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def rrclass
3434
end
3535

3636
def type
37-
resource[:type]
37+
resource[:type].to_s
3838
end
3939

4040
def name

lib/puppet_bind/provider/nsupdate.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def destructo(file)
7171
end
7272

7373
def quoted_type?(type)
74-
%(TXT SPF).include?(type)
74+
%w(TXT SPF).include?(type)
7575
end
7676

7777
def maybe_quote(type, datum)

0 commit comments

Comments
 (0)