brainfart #2
parent
d9c1b8c9c6
commit
180b5332de
|
@ -7,7 +7,7 @@ include EventMachine::IRC::Commands
|
||||||
DataMapper.setup(:default, Config[:scrape][:db])
|
DataMapper.setup(:default, Config[:scrape][:db])
|
||||||
|
|
||||||
module Scrape
|
module Scrape
|
||||||
def download(uri)
|
def self.download(uri)
|
||||||
ext = "." + word.sub(/.*[.]([^.]*)/, '\1') if word.match(/[^.]+[.][^.]+/)
|
ext = "." + word.sub(/.*[.]([^.]*)/, '\1') if word.match(/[^.]+[.][^.]+/)
|
||||||
content = open(word).read
|
content = open(word).read
|
||||||
md5 = Digest::MD5.hexdigest(content)
|
md5 = Digest::MD5.hexdigest(content)
|
||||||
|
|
Loading…
Reference in New Issue