Open netuoso opened 7 years ago
Hi @netuoso
Thanks for your PR. I just saw that Speed Limit have units
.
Before I merge, I have some reviews on yours (I'll write in separate comments).
@edwardsamuel ok waiting for you to review. the coverage decrease is due to changing the params sent to the generate_auth_url
method in client.rb since it isn't receiving an array from the speed_limits
method any longer.
if we wrapped the array to hash conversion inside a conditional that only executes if units is sent as a param to the speed_limits method it would retain 100% coverage.
Hi @netuoso,
Sorry, my bad. I realize that we can't use Hash
params in the speed_limits
method, but it's fine on snapped_speed_limits
.
You are right, use array instead:
params << ['units', units] if units.match(/^mph$/i)
and no need to do:
params = Hash[params]
Thanks!
@edwardsamuel No problem! That should do it.
Will merge and publish it soon
Will merge and publish it soon
What happened to this?
Explanation:
This change leaves KPH as the default while adding the ability to send 'MPH' to the roads.rb
Example request: