Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix with latest version of yard #3354

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions acceptance/setup/common/pre-suite/010_install_ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion lib/bolt/pal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
YARD::Logger.instance.level = if YARD::Logger.const_defined?(:Severity)
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}")
Expand Down
Loading