Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Making cloudprint gem threadsafe. #4
Hi. Thanks so much for this! I was planning on working on the gem this week, so this is highly appreciated.
However, there's a couple of changes I'd like to see in this pull request.
For one thing, I think CloudPrint::Base should just be called CloudPrint::Client. I think the fact you're calling it client everywhere in the tests is a good hint that's what the class should be called too.
Secondly, I don't like the ActiveSupport dependency. It's not that I don't like ActiveSupport itself, it's just that it doesn't seem to be offering us much here. I see a few calls to delegate (which could just as well be defined as methods), a few calls to .present? (which aren't really that necessary), and that line containing to_options! in CloudPrint::Printer#initialize which I'd rather not have in the codebase at all.
Thirdly, since we're breaking the API, let's get rid of CloudPrint.setup() entirely and tell people to use CloudPrint::Client.new(...) instead.
Other than that, this looks very good. I can write up the documentation changes myself, as long as you make these adjustments. And, again, thanks!