mapbox / mapbox-sdk-rb

A Ruby interface to Mapbox APIs.
Other
59 stars 32 forks source link

Add bbox support #8

Closed mattficke closed 8 years ago

mattficke commented 8 years ago

Switches to using an options hash instead of another param. Fixes #7.

mattficke commented 8 years ago

@tmcw @sbma44 since you two have contributed the bulk of the code here, can I get 👀 on this? Ok to merge?

sbma44 commented 8 years ago

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.

mattficke commented 8 years ago

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.

sbma44 commented 8 years ago

LGTM! I don't know who has the keys to rubygems, I'm afraid.

mattficke commented 8 years ago

Merged. Looks like @tmcw last published to rubygems.