Skip to content

Commit 1ab766c

Browse files
authored
Merge pull request #3354 from smortex/fix-ci-with-latest-yard
Fix with latest version of yard
2 parents ce9235a + c8c7574 commit 1ab766c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

acceptance/setup/common/pre-suite/010_install_ruby.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
# public_suffix for win requires Ruby version >= 2.6
2828
# current Ruby 2.5.0 works with public_suffix version 4.0.7
2929
on(bolt, powershell('gem install public_suffix -v 4.0.7'))
30-
on(bolt, powershell('gem install yard -v 0.9.36'))
3130
# current Ruby 2.5.0 works with puppet-strings 2.9.0
3231
on(bolt, powershell('gem install puppet-strings -v 2.9.0'))
3332
# net-ssh 7.x no longer supports ruby 2.5
@@ -77,7 +76,6 @@
7776
on(bolt, 'gem install public_suffix -v 5.1.1 --no-document')
7877
on(bolt, 'gem install CFPropertyList -v 3.0.6 --no-document')
7978
on(bolt, 'gem install fast_gettext -v 2.4.0')
80-
on(bolt, 'gem install yard -v 0.9.36 --no-document')
8179
# System ruby for osx12 is 2.6, which can only manage puppet-strings 2.9.0
8280
on(bolt, 'gem install puppet-strings -v 2.9.0 --no-document')
8381
# semantic puppet no longer supports ruby < 2.7

lib/bolt/pal.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,12 @@ def get_plan_info(plan_name, with_mtime: false)
498498
require 'puppet-strings'
499499
require 'puppet-strings/yard'
500500
PuppetStrings::Yard.setup!
501-
YARD::Logger.instance.level = :error
501+
YARD::Logger.instance.level = if YARD::Logger.const_defined?(:Severity)
502+
YARD::Logger::Severity::ERROR
503+
else
504+
# Backward compatility for YARD < 0.9.37
505+
YARD::Logger.instance.level = :error
506+
end
502507
YARD.parse(pp_path)
503508

504509
plan = YARD::Registry.at("puppet_plans::#{plan_name}")

0 commit comments

Comments
 (0)