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
Added template support for Prawn PDF #57
Conversation
Pull Request Test Coverage Report for Build 82
💛 - Coveralls |
8ee0253
to
e8a4c4c
Compare
@jrafanie this is generating a bunch of warnings in ruby 2.6 (let alone 2.7) Do you have any comments or concerns for this? |
What's in our custom gem? I don't remember what feature we fixed or added.
As long as it works for 2.5 since that's still supported, it should be fine. |
travis runs 2.5 - 2.7 (and this probably runs on 2.3, 2.4) |
kicking. trying to get new coverage numberss |
not sure how stable these tests are pdfs that look the same can often be different in the binary
The decrease in coverage is right. probably best way to test this stuff is to add some mocking / stubs |
@jrafanie I looked over this code and got it working. you ok with these changes? For ruby 2.7, upgrading prawn gets rid of a lot of warnings. Apps (including miq) end up with a ton of warnings without these changes. The feature request for templates seem good, though I will probably never use them |
test/prawn_pdf_formatter_test.rb
Outdated
|
||
expected_output = IO.read(File.join(__dir__, 'expected_outputs/prawn_pdf_formatter/pdf_basic.pdf.test')).bytes | ||
def xtest_render_pdf_basic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer a comment as to why it's disabled here. Someone might assume this was a typo and try to fix it not knowing it's intentionally disabled. Maybe use the skip
method in minitest?
https://www.paperlesspost.com/blog/teams/skipping-tests-minitest/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only concern is the skipped tests without saying why. If they're flaky or inconsistent, we should make that obvious. The other changes look ok although some of the expected outputs test data changes look 😕 to me. I'm not sure what's going on to make them change.
The 1 skipped test is essentially doing a diff of the output from prawn. I'll put this test back in, but it is fragile. |
it is very unstable, so not a good test.
reenabled the test |
Adds #33 by @agios which uses a more recent prawn.
Sure, this version of prawn is still very old, and the gem does not look maintained, but this PR focuses on removing warnings that show up with recent ruby implementations.
This branch of the PR removes the conflict and updates the version of prawn and adds the table gem. But it is largely not my work. So thank you Agios.
The pdf test has been disabled because it seems to fail on every upgrade.
Will look into the issue behind this. The most recent failure is due to significant decimal places for 0 and some font tweaks.
The previous sample pdf had a table with headers but no data. Since this causes problems with later prawn versions, I added a data row.