Explicitly require yaml
Chef 16.5.17 no longer does this for us
Should fix
MODIFY
Gemfile
Gemfile
@@ -6,6 +6,7 @@ gem 'rake'
gem 'chef', "= #{chef_version}"
gem 'foodcritic', '~> 11.4.0'
gem 'cucumber-core', '~> 3.2.1'
+gem 'yaml'
gem 'chefspec'
gem 'berkshelf'
gem 'fauxhai-ng', '~> 7.5.1'

MODIFY
Gemfile.lock
Gemfile.lock
@@ -359,6 +359,7 @@ GEM
winrm (~> 2.0)
wisper (2.0.1)
wmi-lite (1.0.5)
+ yaml (0.1.0)
zeitwerk (2.3.1)
PLATFORMS
@@ -382,6 +383,7 @@ DEPENDENCIES
rubocop (~> 0.49.1)
test-kitchen
virtus
+ yaml
BUNDLED WITH
1.17.3

MODIFY
recipes/dd-agent.rb
recipes/dd-agent.rb
# limitations under the License.
#
+require 'yaml' # Our erb templates need this
+
if node['datadog'].include?('agent6')
Chef::Log.warn('The boolean "agent6" is no longer used by this cookbook since version 4.0.0. Use "agent_major_version" instead. To keep the previous behaviour pin a 3.x version of the cookbook.')
end

MODIFY
resources/monitor.rb
resources/monitor.rb
# Configure a service via its yaml file
+require 'yaml' # Our erb templates need this
+
default_action :add
property :cookbook, String, default: 'datadog'

Explicitly require yaml (#749)

Chef 16.5.17 no longer does this for us
Should fix #747