mirror of
https://github.com/wezm/wezm.net.git
synced 2024-12-19 02:39:54 +00:00
Only load bitly when necessary
This commit is contained in:
parent
ae6811ad41
commit
e68662dd73
1 changed files with 2 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
require 'bitly'
|
require 'rubypants'
|
||||||
|
|
||||||
module WezM
|
module WezM
|
||||||
module Helpers
|
module Helpers
|
||||||
|
@ -23,6 +23,7 @@ module WezM
|
||||||
end
|
end
|
||||||
|
|
||||||
def short_url(url)
|
def short_url(url)
|
||||||
|
require 'bitly'
|
||||||
begin
|
begin
|
||||||
@bitly ||= Bitly.new('wezm', 'R_f2bfdace56c886671086eb0c8acb9ce7')
|
@bitly ||= Bitly.new('wezm', 'R_f2bfdace56c886671086eb0c8acb9ce7')
|
||||||
@cache ||= {}
|
@cache ||= {}
|
||||||
|
|
Loading…
Reference in a new issue