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

Miscellaneous test fixes / kwalitee #2

Merged
merged 4 commits into from Feb 2, 2015

Conversation

Projects
None yet
2 participants
@StarLightPL
Contributor

StarLightPL commented Feb 2, 2015

Hi,
As promised, here is a pull request with fixes. I have managed to fix both indeterministic tests (turned out code was relying on order of hash keys). Tried to improve dist.ini by adding YAML to build/test prerequisities which was the culprit of many CPANTS fails. Added Changes file, but was unable to force Dist::Zilla to respect format parameter in NextRelease plugin - so please remember to check the Changes file when releasing. Also it seems that you're using Git::NextRelease so I leave tagging the release to you :)

I've tried to describe all changes in the commit messages, so I hope you find these useful.

best regards,
StarLightPL

StarLightPL added some commits Feb 1, 2015

fix code relying on specific order of hash keys
First bug: t/rule_parser.t was failing randomly. When instantiating new
PP object sometimes 'site_admin' was processed before 'site_moderator'.
While calculating inheritance for 'site_admin' _parse_rules method
deleted 'inherit' from site_moderator's config. This in turn caused
lack of inheritance when 'site_moderator' was processed next. Fixed by
cloning $profile instead of deleting from _config.

Second bug: t/basic.t relied on the (random) order of exceptions thrown by
'process' method. Fixed by sorting rules alphabetically when processing.
Testcase added to cover this bug. For easier reading, rules in sample.yml
were ordered alphabetically.
fix kwalitee by adding Changes and fixing dist.ini
- use Dist::Zilla::Plugin::NextRelease to create nextrelease in changelog
- Specify YAML as a build/testing prerequisite (caused many fails on
  CPANTS)
- use Dist::Zilla::Plugin::MinimumPerl to fix min Perl version kwalitee
- use Dist::Zilla::Plugin::Test::Kwalitee::Extra to safeguard kwalitee in
  the future
- README.mkdn automatic fixes from Dzilla

holophrastic added a commit that referenced this pull request Feb 2, 2015

@holophrastic holophrastic merged commit cf0bcae into holophrastic:master Feb 2, 2015

@holophrastic

This comment has been minimized.

Show comment
Hide comment
@holophrastic

holophrastic Feb 2, 2015

Owner

Awesome. I'll get a new release out shortly. The only thing I'm going to change is adding you to the credits section, since you didn't do so ;)

Thanks very much!

Owner

holophrastic commented Feb 2, 2015

Awesome. I'll get a new release out shortly. The only thing I'm going to change is adding you to the credits section, since you didn't do so ;)

Thanks very much!

@StarLightPL

This comment has been minimized.

Show comment
Hide comment
@StarLightPL

StarLightPL Feb 2, 2015

Contributor

Wow that was fast! Thanks! :) I'm kinda nervous as this is my first contrib to CPAN whatsoever, so I will watch how it fares on CPANTS. Hope that these patches fix all that pesky undeterministic / missing yaml builds. If there are any bugs, do not hesitate to contact me.

Have a nice day! :)

Contributor

StarLightPL commented Feb 2, 2015

Wow that was fast! Thanks! :) I'm kinda nervous as this is my first contrib to CPAN whatsoever, so I will watch how it fares on CPANTS. Hope that these patches fix all that pesky undeterministic / missing yaml builds. If there are any bugs, do not hesitate to contact me.

Have a nice day! :)

@StarLightPL StarLightPL deleted the StarLightPL:miscellaneous-test-fixes branch Feb 2, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment