No commit activity in last 3 years
No release in over 3 years
API Wrapper for Google Directions
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

toll_booth¶ ↑

@origin = TollBooth::Location.new("4 Yawkey Way, Boston, MA")
@destination = TollBooth::Location.new("1 Fleetcenter Place, Boston, MA")
@routes = @origin.drive_to(@destination)
if @routes.found?
  @routes[0].distance              #distance in miles
  @routes[0].drive_time            #drive time in seconds
  @routes[0].name                  #name of route (usually specified when multiple routes are returned)
  @routes[0].steps                 #array of TollBooth::Steps to take
  @routes[0].steps[0].distance     #distance of step in miles
  @routes[0].steps[0].description  #summary of step
else
  puts @routes.errors.join(",")
end

Links of Interest¶ ↑

TODO¶ ↑

  • Allow Configuration for Key

  • Some unit testing with FakeWeb for 100% coverage

  • Fix distance parsing for when distance is expressed in ft

  • public transit directions

  • Walking directions

Note on Patches/Pull Requests¶ ↑

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history.

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2009 Dan Pickett. See LICENSE for details.