lib/awestruct/extensions/intense_debate.rb in awestruct-0.1.2 vs lib/awestruct/extensions/intense_debate.rb in awestruct-0.1.3
- old
+ new
@@ -1,7 +1,7 @@
-require 'sha1'
+require 'digest/sha1'
module Awestruct
module Extensions
class IntenseDebate
@@ -9,11 +9,11 @@
site.pages.each{|p| p.extend IntenseDebatable }
end
module IntenseDebatable
def intense_debate_comments()
- post_id = self.post_id ? self.post_id : SHA1.hexdigest( self.url )
+ post_id = self.post_id ? self.post_id : Digest::SHA1.hexdigest( self.url )
html = %Q(<script>\n)
html += %Q( var idcomments_acct='#{site.intense_debate_acct}';\n)
html += %Q( var idcomments_post_id='#{post_id}';\n )
html += %Q( var idcomments_post_url='#{self.url}';\n)
html += %Q(</script>\n)
@@ -21,10 +21,10 @@
html += %Q(<script type='text/javascript' src='http://www.intensedebate.com/js/genericCommentWrapperV2.js'></script>\n)
html
end
def intense_debate_comments_link()
- post_id = self.post_id ? self.post_id : SHA1.hexdigest( self.url )
+ post_id = self.post_id ? self.post_id : Digest::SHA1.hexdigest( self.url )
html = %Q(<script>\n)
html += %Q( var idcomments_acct='#{site.intense_debate_acct}';\n)
html += %Q( var idcomments_post_id='#{post_id}';\n )
html += %Q( var idcomments_post_url='#{self.url}';\n)
html += %Q(</script>\n)