From e68662dd7313d1f4a3dc486cbfe47ceb0edac12a Mon Sep 17 00:00:00 2001 From: Wesley Moore Date: Tue, 15 Jun 2010 08:19:28 +1000 Subject: [PATCH] Only load bitly when necessary --- lib/articles.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/articles.rb b/lib/articles.rb index 0fb111e..7d1b186 100644 --- a/lib/articles.rb +++ b/lib/articles.rb @@ -1,4 +1,4 @@ -require 'bitly' +require 'rubypants' module WezM module Helpers @@ -23,6 +23,7 @@ module WezM end def short_url(url) + require 'bitly' begin @bitly ||= Bitly.new('wezm', 'R_f2bfdace56c886671086eb0c8acb9ce7') @cache ||= {}