Skip to content
This repository has been archived by the owner on Dec 31, 2019. It is now read-only.

search_all delegates to invalid query #7

Closed
troelskn opened this issue Mar 3, 2016 · 4 comments
Closed

search_all delegates to invalid query #7

troelskn opened this issue Mar 3, 2016 · 4 comments

Comments

@troelskn
Copy link
Contributor

troelskn commented Mar 3, 2016

Calling client.printers.all delegates to client.printers.search_all, which in turn delegates to client.printers.search('all'). This doesn't return any printers, except for the default "Save to Google Docs" (__google__docs). I suggest changing method_missing to exclude "all" from the regexp, and then change def all to be an alias on search

@thegengen
Copy link
Owner

Hi.

Sorry, my GitHub notification settings were set up so that I didn't get an email when you created this ticket. I'll look into this (and most likely make the changes you suggested) tomorrow.

Thanks for reporting it.

@troelskn
Copy link
Contributor Author

troelskn commented Mar 9, 2016

No worries. I opened a few more minor issues.

@thegengen
Copy link
Owner

FYI, I'm afraid I'll have to push this back another day; I spent today with the 0.3.0 changes.

@thegengen
Copy link
Owner

I've aliased search_all and delegated all as you've suggested. I've also replaced the method missing magic with explicit method definitions. It might be a bit more verbose, but it's a lot easier to reason about.

Also, I've released v0.3.1 of the gem with these changes.

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

No branches or pull requests

2 participants