Trails is build on top of the Twilio Ruby Library, and has functional test helpers so that you can simulate Twilio calling you app. When Twilio calls your application, the application recognizes whether it is Twilio calling or a web request. The controller is reusable and has views for displaying HTML or TwiML, depending on where the request comes from.
View the source code here: http://code.google.com/p/twilio-on-rails/
Interview with Hemant on Building Trails
What gave you the idea to build Trails?
I first got a chance to play with Twilio when I was trying to scale our
customer service operations at Social Gold. Once I saw
how easy your platform is, I was hooked, and started building a few more toy
apps (www.xperilab.com) to sink my teeth into the service. But I quickly
found that testing my apps was tedious because I couldn’t always test
twilio’s interaction with my app, and wanted a better way to do that. Over
several months, and a couple of different apps, I copy/pasted my
‘frameworky’ code until I finally decided to pull it out into a library.
How long did it take to build?
It got built as a side-effect of my evening/weekend toy projects, overs the course of the last 5-6 months.
What are you thoughts on Twilio, feedback, suggestions for developers getting started?
Absolutely love you guys, end-to-end. At Social Gold, we draw a lot of inspiration from you guys in terms of how developer-friendly your product is.
If you had all the time in the world, what would you build with Twilio?
I love the idea of building really engaging games that only require a simple telephone, or SMS. I’m still playing around with ideas but I think that the telephone could actually be the ultimate viral platform.
Example Code to Get You Started
As Hemant mentions on Github, there is still plenty of room for contributors to step in and add to more functionality to Trails.
Have you built something using Twilio that you’d like us to share with our developer community? We would love to blog about it, please contact firstname.lastname@example.org and tell us about your creation. Whether its a simple app, enterprise solution, developer resource, or something else – we’re listening and can’t wait to try it out. Grab a Powered by Twilio banner while you’re at it.