diff --git a/metadata.rb b/metadata.rb index ebdbf105..bda51509 100644 --- a/metadata.rb +++ b/metadata.rb @@ -43,9 +43,10 @@ depends 'apt' end -# Use '< 5.0' with Chef < 12.14 +# Must be '>= 3.0' and '< 5.0' with Chef < 12.14 +# Chef allows only one constraint and '~> 3.0' means '>= 3.0' and '< 4.0' if current_chef_version < Gem::Version.new(12.14) - depends 'yum', '>= 3.0', '< 5.0' + depends 'yum', '~> 3.0' else depends 'yum', '>= 3.0' end diff --git a/resources/monitor.rb b/resources/monitor.rb index 087da767..2c930126 100644 --- a/resources/monitor.rb +++ b/resources/monitor.rb @@ -78,7 +78,7 @@ init_config = new_resource.init_config if new_resource.is_jmx init_config ||= {} - init_config = init_config.merge({ 'is_jmx': true, 'collect_default_metrics': true }) + init_config = init_config.merge({ 'is_jmx' => true, 'collect_default_metrics' => true }) end variables(