Bugs: Browse | Submit New | Admin
Something must have changed with tinyurl's interface. No matter what URL you give shorturl when using the :tinyurl service, you just get back the URL for the main tinyurl site (http://www.tinyurl.com/). You can duplicate with the shorten.rb program in the examples directory that comes with the gem... e.g.: "ruby shorten.rb http://www.google.com/ tinyurl" Result: http://tinyurl.com/
Add A Comment:
Date: 2008-08-19 02:08 Sender: Michael Letterle the correct index is 4, so what you really need is: :tinyurl => Service.new("tinyurl.com") { |s| s.action = "/create.php" s.block = lambda { |body| URI.extract(body).grep(/tinyurl/)[4] } },
Date: 2008-07-18 04:25 Sender: Eric Bowman They changed the API call, you will need to adjust your shorturl.rb file until the contributors make the adjustment :tinyurl => Service.new("tinyurl.com") { |s| s.action = "/api-create.php" s.field = "url" s.block = lambda { |body| URI.extract(body).grep(/tinyurl/)[-1] } }, here is a pwd print of the location on my Mac /Library/Ruby/Gems/1.8/gems/shorturl-0.8.4/lib Good luck!