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 plugin regressions introduced in 3.0.0 #66

Merged
merged 2 commits into from
Oct 20, 2022

Conversation

ekohl
Copy link

@ekohl ekohl commented Oct 19, 2022

This allows plugins to work again. See individual commits for details.

Fixes #65

@ekohl ekohl requested a review from a team as a code owner October 19, 2022 23:10
@chelnak
Copy link

chelnak commented Oct 20, 2022

@ekohl Thank you. I was working on a fix for this last night, you beat me to it! 😃

lib/puppet-lint/plugins.rb Outdated Show resolved Hide resolved
@@ -134,7 +134,7 @@ def subject
config.include(
RSpec::LintExampleGroup,
type: :lint,
file_path: Regexp.compile(['spec', 'unit', 'puppet-lint', 'plugins'].join('[\\\/]')),
file_path: Regexp.compile(['spec', 'puppet-lint', 'plugins'].join('[\\\/]')),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverting this actually breaks the spec tests in puppet-lint.

Lets make it more inclusive of both patterns:

Suggested change
file_path: Regexp.compile(['spec', 'puppet-lint', 'plugins'].join('[\\\/]')),
file_path: Regexp.new('spec[\\\/](unit[\\\/])?puppet-lint[\\\/]plugins'),

@chelnak
Copy link

chelnak commented Oct 20, 2022

@ekohl Have left a couple of suggestions that should get this PR moving.

Happy to merge asap.

In ed5ec22 the method was refactored,
but it ended up only loading the plugin directory itself, which isn't a
file.

It now loads all Ruby files again

Fixes: ed5ec22
@ekohl ekohl force-pushed the fix-plugin-spec-testing branch from adcc6f7 to 662d189 Compare October 20, 2022 10:41
Plugins also use the spec helper from puppet-lint. Until
5f80b77 the expected directory
structure was spec/puppet-lint/plugins but that changed. This partially
reverts the change which means plugins don't have to move their files
around.

Fixes: 5f80b77
@ekohl ekohl force-pushed the fix-plugin-spec-testing branch from 662d189 to a97f52d Compare October 20, 2022 10:44
Copy link

@chelnak chelnak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thank you @ekohl

@chelnak chelnak merged commit 51511a5 into puppetlabs:main Oct 20, 2022
@chelnak chelnak self-assigned this Oct 20, 2022
@chelnak chelnak added the bug Something isn't working label Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

puppet-lint 3.0.0 refuses to run on multiple platforms when recommended vox pupuli gems installed
3 participants