Closed mattficke closed 8 years ago
@tmcw @sbma44 since you two have contributed the bulk of the code here, can I get 👀 on this? Ok to merge?
I was gonna suggest using Ruby's official URI building library but apparently it doesn't have one. Oh well! As long as this passes tests I'm :+1:, though I think you probably could use some of the example code in that link to make it slightly more futureproof for additional arguments passed around in that hash.
Ok, refactored in response to your comments. I added a handler for extra params we may add in the future that don't need to be reformatted, and tests to illustrate that it works (for both real params like country
and fake ones).
Since we have tests, I also added this to Circle CI.
Going to go ahead and merge if this looks ok. I think someone else will need to either publish this to rubygems, or give me publish permissions to do so.
LGTM! I don't know who has the keys to rubygems, I'm afraid.
Merged. Looks like @tmcw last published to rubygems.
Switches to using an options hash instead of another param. Fixes #7.