Skip to content

fix: Support older version of Pundit#686

Merged
adrianthedev merged 1 commit into
avo-hq:mainfrom
rickychilcott:fix/pundit-module-inclusion
Feb 20, 2022
Merged

fix: Support older version of Pundit#686
adrianthedev merged 1 commit into
avo-hq:mainfrom
rickychilcott:fix/pundit-module-inclusion

Conversation

@rickychilcott

@rickychilcott rickychilcott commented Feb 19, 2022

Copy link
Copy Markdown
Contributor

Description

Pundit 2.2.0 changes the Module that is required to be included, which is a breaking change. Since Pundit 2.1.x is still very viable for most apps, support both options.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Pundit 2.2.0 changes the Module that is required to be included, which is a breaking change. Since Pundit 2.1.x is still very viable for most apps, support both options.
@qlty-cloud-legacy

Copy link
Copy Markdown

Code Climate has analyzed commit 6a536f6 and detected 0 issues on this pull request.

View more on Code Climate.

@rickychilcott

Copy link
Copy Markdown
Contributor Author

Not sure what you think of this one @adrianthedev.

I'm surprised that varvet/pundit@4d9b584 wasn't considered a breaking change (i.e. bumping to Pundit 3.0), but either way, I can't currently fix all of my OTHER dependencies to jump to Pundit v2.2 yet.

Does this simple version work or would you rather a Pundit version check?

@codecov

codecov Bot commented Feb 19, 2022

Copy link
Copy Markdown

Codecov Report

Merging #686 (6a536f6) into main (030f2fc) will decrease coverage by 0.08%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #686      +/-   ##
==========================================
- Coverage   93.77%   93.69%   -0.09%     
==========================================
  Files         364      364              
  Lines        6536     6548      +12     
==========================================
+ Hits         6129     6135       +6     
- Misses        407      413       +6     
Impacted Files Coverage Δ
app/controllers/avo/application_controller.rb 85.71% <66.66%> (-0.12%) ⬇️
lib/avo/fields/key_value_field.rb 79.54% <0.00%> (-9.35%) ⬇️
app/controllers/avo/base_controller.rb 99.39% <0.00%> (-0.01%) ⬇️
spec/system/avo/default_field_spec.rb 95.12% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 030f2fc...6a536f6. Read the comment docs.

@rickychilcott rickychilcott changed the title Support older version of Pundit fix: Support older version of Pundit Feb 19, 2022
@adrianthedev

Copy link
Copy Markdown
Collaborator

Hey @rickychilcott. Yeah, this might work. It seems I haven't thought about this change as being a breaking change, but what you're saying makes sense.

I'll check it out and merge this before Monday's release.

@adrianthedev
adrianthedev merged commit d061e58 into avo-hq:main Feb 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants