Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed tinyurl.

  • Loading branch information...
commit 1aca118065061808f913de81a5aa4db48191ced6 1 parent bb77fcb
Barry Paul bpaul authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/shorturl.rb
5 lib/shorturl.rb
View
@@ -61,8 +61,9 @@ class ShortURL
},
:tinyurl => Service.new("tinyurl.com") { |s|
- s.action = "/create.php"
- s.block = lambda { |body| URI.extract(body).grep(/tinyurl/)[-1] }
+ s.action = "/api-create.php"
+ s.method = :get
+ s.block = lambda { |body| URI.extract(body).grep(/tinyurl/)[0] }
},
:shorl => Service.new("shorl.com") { |s|
Please sign in to comment.
Something went wrong with that request. Please try again.