public
Description: A Rails plugin that provides a simple API to shorten URLs using popular web services like tinyurl, snipurl, and is.gd.
Homepage: http://github.com/patientslikeme/tinify_urls/tree/master/README
Clone URL: git://github.com/patientslikeme/tinify_urls.git
name age message
file MIT-LICENSE Sun Jan 11 00:21:25 -0800 2009 Initial commit of extracted plugin [jeremyw]
file README Sun Jan 11 00:24:12 -0800 2009 Updated README [jeremyw]
file Rakefile Sun Jan 11 00:21:25 -0800 2009 Initial commit of extracted plugin [jeremyw]
file init.rb Sun Jan 11 00:21:25 -0800 2009 Initial commit of extracted plugin [jeremyw]
file install.rb Sun Jan 11 00:21:25 -0800 2009 Initial commit of extracted plugin [jeremyw]
directory lib/ Mon Jan 12 20:42:22 -0800 2009 small refactoring [jeremyw]
directory tasks/ Sun Jan 11 00:21:25 -0800 2009 Initial commit of extracted plugin [jeremyw]
directory test/ Sun Jan 11 14:00:29 -0800 2009 tests coming soon [jeremyw]
file uninstall.rb Sun Jan 11 00:21:25 -0800 2009 Initial commit of extracted plugin [jeremyw]
README
TinifyUrls
==========

A Rails plugin that makes it easy to convert long URLs to shorter ones using
popular services like TinyURL, SnipURL, and is.gd.

Uses TinyURL by default, but you can pass :snipurl or :is_gd to the Tinifier
constructor, or override the default in an initializer:

  Tinifier.default_api = :snipurl


Example
=======

  t = Tinifier.new # using TinyURL by default
  
  # shorten a single URL
  puts t.tinify_url('http://www.patientslikeme.com')

  # or shorten every URL in a string
  puts t.tinify_urls('Please visit http://www.patientslikeme.com to learn more.')


View helpers are also provided:

  <%= link_to tinify_url('http://www.patientslikeme.com', :snipurl) %>

You can also pass a block to implement custom URL shortening logic. A 
practical example is to cache URLs, avoiding extra expensive API invocations:

  <%= link_to tinify_url('http://www.patientslikeme.com') { |url| UrlCache.for_full_url(url) } %>


Copyright (c) 2009 PatientsLikeMe, Inc., released under the MIT license