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

Added auto-closing #4

Closed
wants to merge 1 commit into from
Closed

Added auto-closing #4

wants to merge 1 commit into from

Conversation

chriscrown
Copy link

Hi! It's my first pull request, please be gentle with me... :-)

@@ -7,18 +7,23 @@
describe Prawn::Print, "#print" do
it "should work without arguments" do
pdf = Prawn::Document.new
lambda { pdf.print }.should_not raise_error
expect(lambda { pdf.print }).not_to raise_error
Copy link
Member

Choose a reason for hiding this comment

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

Just expect { pdf.print }.not_to is actually fine.

@henrik
Copy link
Member

henrik commented Aug 25, 2014

Thanks for this! It's awesome to see people contribute :)

Could you also update the documentation in the README?

You said this was your first pull request, so here's some well-intentioned feedback:

It's usually a good idea to only do one thing in a pull request – the RSpec syntax changes muddies things a bit in this one. It's a bigger diff to look at, there's more chance of someone disagreeing with the change etc. Easier to get your changes in if they're small and focused. Instead you can make separate pull requests for separate things. I don't mind in this case, but on some projects I would.

Also, many library authors want to manage the versioning themselves, so it's usually a good idea not to tweak that number. They may have some special numbering scheme or want to include more than one change in a version bump or whatever. Don't worry about it in this case.

@henrik
Copy link
Member

henrik commented Aug 25, 2014

Oh, and I forgot to ask… what does closeDoc() do? :D Is it related to printing?

end

private

def print_with_auto_to_printer(auto, printer)
def print_with_auto_to_printer(auto, close, printer)
Copy link
Member

Choose a reason for hiding this comment

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

I'd expect a method named print_with_auto_to_printer to take arguments in the order auto, printer. Maybe rename to print_with_auto_to_printer_and_close or something, and have arguments in that order. Or pass in named keywords.

Copy link
Author

Choose a reason for hiding this comment

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

closeDoc() closes the PDF document. It's a pity it's not possible to minimize the window or close Adobe Reader completely. Adobe removed this functionality for "security reasons"...

@henrik
Copy link
Member

henrik commented Aug 18, 2020

Closing PR due to staleness :)

@henrik henrik closed this Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants