From 7555cdd4e02fae2d732362b4802ae9a0d3cb9a95 Mon Sep 17 00:00:00 2001 From: Nate Riffe Date: Thu, 21 May 2015 14:24:35 -0500 Subject: [PATCH] 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. --- lib/puppet/provider/resource_record/nsupdate.rb | 2 +- lib/puppet_bind/provider/nsupdate.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/puppet/provider/resource_record/nsupdate.rb b/lib/puppet/provider/resource_record/nsupdate.rb index 9c1465e..d53f8f1 100644 --- a/lib/puppet/provider/resource_record/nsupdate.rb +++ b/lib/puppet/provider/resource_record/nsupdate.rb @@ -34,7 +34,7 @@ private end def type - resource[:type] + resource[:type].to_s end def name diff --git a/lib/puppet_bind/provider/nsupdate.rb b/lib/puppet_bind/provider/nsupdate.rb index 8d3a7ef..a58c6ed 100644 --- a/lib/puppet_bind/provider/nsupdate.rb +++ b/lib/puppet_bind/provider/nsupdate.rb @@ -71,7 +71,7 @@ module PuppetBind end def quoted_type?(type) - %(TXT SPF).include?(type) + %w(TXT SPF).include?(type) end def maybe_quote(type, datum)