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

Core support for embedded files. Name dictionary entry #47

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

dvdalilue
Copy link

For a project, I need to implement the file attachment feature. So given that I'm using prawn already, I just extended the modules and classes to support that.

This PR defines a core module for embedded files that will be used by the prawn structures, something that is defined in my project. The idea is to have full support to attach files in prawn. So I have the intention to create a PR in prawn as well but it depends on this one.

Looking forward to any comments.

Thanks in advance.

@gettalong
Copy link
Member

Looks good to me.

@dvdalilue
Copy link
Author

Great! Anything else needed to be approved?

@gettalong
Copy link
Member

Maybe some specs, @pointlessone will know and decide when there is time.

Copy link
Member

@pointlessone pointlessone left a comment

Choose a reason for hiding this comment

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

Overall I'm hesitant to approve this.

This only adds an API for embedded files names dictionary. But doesn't even do that as this module is not included anywhere. It doesn't handle actual file descriptors creation. The API itself doesn't add much as the specific data structures are exposed anyway. It doesn't enable any new use case just makes already available one slightly less verbose.

I'd suggest starting with a prawn PR that demonstrates the feature. Describe the use case, show how new API makes it possible or much more ergonomic. I suspect there already might be a counterpart just not published because it depends on this PR. But without that PR this doesn't make much sense.

Lack of tests is slightly worrying, too.

lib/pdf/core/embedded_files.rb Show resolved Hide resolved
lib/pdf/core/embedded_files.rb Show resolved Hide resolved
lib/pdf/core/embedded_files.rb Show resolved Hide resolved
@dvdalilue
Copy link
Author

dvdalilue commented Jul 22, 2021

I added some tests for the module using a mock class. Also, I created the PR with the feature in prawn 1214

lib/pdf/core/embedded_files.rb Outdated Show resolved Hide resolved
lib/pdf/core/embedded_files.rb Show resolved Hide resolved
@dvdalilue
Copy link
Author

Hi @pointlessone, I'm working on the tests of the prawn PR 1214 but, in order to work properly and pass the checks, it requires this one. Do you think it's ok?

@pointlessone
Copy link
Member

Yeah. Add in that PR description that it depends on this one. Make sure that both are green and I'll run them locally to check. Then we'll rerun build on prawn PR once this is merged.

@dvdalilue
Copy link
Author

Hey @pointlessone, I have mentioned this PR on the one in Prawn, that one is green (without actually using these changes, so it's "fake" green until then) but I'm not sure why the checks of this repo are stalled. Do I need to do something else in particular?

@pointlessone
Copy link
Member

I'm not sure… Maybe rebase and push it again?

@dvdalilue dvdalilue force-pushed the feature/embedded-file-support branch from 9823013 to a1aa484 Compare July 26, 2021 09:31
@dvdalilue
Copy link
Author

It seems that worked. Now is green, thanks

@dvdalilue
Copy link
Author

Hi @pointlessone, just wondering if you were able to check this PR?

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

Successfully merging this pull request may close these issues.

None yet

3 participants