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
Conversation
@@ -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 |
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.
Just expect { pdf.print }.not_to
is actually fine.
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. |
Oh, and I forgot to ask… what does |
end | ||
|
||
private | ||
|
||
def print_with_auto_to_printer(auto, printer) | ||
def print_with_auto_to_printer(auto, close, printer) |
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 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.
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.
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"...
Closing PR due to staleness :) |
Hi! It's my first pull request, please be gentle with me... :-)