diff --git a/acceptance/setup/common/pre-suite/010_install_ruby.rb b/acceptance/setup/common/pre-suite/010_install_ruby.rb index 8a330c9dd..5d75ee76e 100644 --- a/acceptance/setup/common/pre-suite/010_install_ruby.rb +++ b/acceptance/setup/common/pre-suite/010_install_ruby.rb @@ -27,7 +27,6 @@ # public_suffix for win requires Ruby version >= 2.6 # current Ruby 2.5.0 works with public_suffix version 4.0.7 on(bolt, powershell('gem install public_suffix -v 4.0.7')) - on(bolt, powershell('gem install yard -v 0.9.36')) # current Ruby 2.5.0 works with puppet-strings 2.9.0 on(bolt, powershell('gem install puppet-strings -v 2.9.0')) # net-ssh 7.x no longer supports ruby 2.5 @@ -77,7 +76,6 @@ on(bolt, 'gem install public_suffix -v 5.1.1 --no-document') on(bolt, 'gem install CFPropertyList -v 3.0.6 --no-document') on(bolt, 'gem install fast_gettext -v 2.4.0') - on(bolt, 'gem install yard -v 0.9.36 --no-document') # System ruby for osx12 is 2.6, which can only manage puppet-strings 2.9.0 on(bolt, 'gem install puppet-strings -v 2.9.0 --no-document') # semantic puppet no longer supports ruby < 2.7 diff --git a/lib/bolt/pal.rb b/lib/bolt/pal.rb index 10ac996aa..06aeb7ffe 100644 --- a/lib/bolt/pal.rb +++ b/lib/bolt/pal.rb @@ -498,7 +498,12 @@ def get_plan_info(plan_name, with_mtime: false) require 'puppet-strings' require 'puppet-strings/yard' PuppetStrings::Yard.setup! - YARD::Logger.instance.level = :error + if YARD::Logger.const_defined?(:Severity) + YARD::Logger.instance.level = YARD::Logger::Severity::ERROR + else + # Backward compatility for YARD < 0.9.37 + YARD::Logger.instance.level = :error + end YARD.parse(pp_path) plan = YARD::Registry.at("puppet_plans::#{plan_name}")