Skip to content

Commit

Permalink
helps if the constants aren't made up
Browse files Browse the repository at this point in the history
  • Loading branch information
atmos committed Feb 5, 2011
1 parent e6e55de commit e0eedf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion github-services.rb
Expand Up @@ -113,7 +113,7 @@ def parse_payload(json)
end

def shorten_url(url)
SystemTimeout.timeout(6, ServiceTimeoutError) do
ServiceTimeout.timeout(6, ServiceTimeoutError) do
short = Net::HTTP.get("api.bit.ly", "/shorten?version=2.0.1&longUrl=#{url}&login=github&apiKey=R_261d14760f4938f0cda9bea984b212e4")
short = JSON.parse(short)
short["errorCode"].zero? ? short["results"][url]["shortUrl"] : url
Expand Down

0 comments on commit e0eedf9

Please sign in to comment.