Renamed module name.

This commit is contained in:
Martin Edenhofer 2013-08-22 22:21:52 +02:00
parent 0ffcbe2ac0
commit 5878b239dc
2 changed files with 3 additions and 2 deletions

View file

@ -19,7 +19,7 @@ curl http://localhost/api/v1/rss_fetch.json -v -u #{login}:#{password} -H "Conte
=end
def fetch
items = RSS.fetch(params[:url], params[:limit])
items = Rss.fetch(params[:url], params[:limit])
if items == nil
render :json => { :message => "failed to fetch #{ params[:url] }", :status => :unprocessable_entity }
return

View file

@ -1,4 +1,5 @@
module RSS
require 'simple-rss'
module Rss
def self.fetch(url, limit = 10)
cache_key = 'rss::' + url
items = Cache.get( cache_key )