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

Code janitoring (docs, test structure, dev dependencies) #834

Merged
merged 8 commits into from
Oct 11, 2024

Conversation

Burgestrand
Copy link
Member

@Burgestrand Burgestrand commented Oct 9, 2024

These are intended to be QoL improvements for developing Pundit, and not actual changes to Pundit as it's used.

To do

  • I have read the contributing guidelines.
  • I have made sure the individual commits are meaningful.
  • I have added relevant lines to the CHANGELOG.
  • I have added relevant tests.
  • I have adjusted relevant documentation.

PS: Thank you for contributing to Pundit ❤️

@Burgestrand Burgestrand force-pushed the kbs/code-janitoring branch 14 times, most recently from c7877e5 to d1c2fed Compare October 10, 2024 14:37
The spec helper is large, contains a mixture of policies and entities and is hard to follow. By splitting it out into smaller chunks we can get a better overview.
@Burgestrand Burgestrand force-pushed the kbs/code-janitoring branch 2 times, most recently from 5451990 to fd4c61b Compare October 10, 2024 14:51
@Burgestrand Burgestrand marked this pull request as ready for review October 11, 2024 06:46
* Show all APIs, not just the ones tagged as public.
* Show private methods, show protected methods.
* Hide everything tagged with @Private
* Fix yard choking on the template files
  `.tt` is the de-facto file name to be used for templates regardless.
* Hide the generator classes in yard, they aren't useful
* Fail yardoc on warnings to prevent failures in CI
* Remnants from the first pass when introducing Pundit::Context.
* Further clean up the YARDOC for Authorization/Context
* Fix references to Pundit context in class methods
* Add YARDOC to the rspec helper classes
* Regroup documentation of Pundit::Context

Add some documentation to the new objects
See 87d859a and #207.

Effectively `policy_scope` in the view should not make the controller consider itself as scoped.
We're testing it by proxy since it's being used in some tests, but these tests are _specific_ to the matchers themselves.
It's not perfect, but it is something.

Full line coverage, full branch coverage, checked for every PR.
@Burgestrand Burgestrand self-assigned this Oct 11, 2024
@Burgestrand Burgestrand merged commit 3bb2021 into main Oct 11, 2024
17 checks passed
@Burgestrand Burgestrand deleted the kbs/code-janitoring branch October 11, 2024 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant