From 5878b239dc7ba83c949fcb204b3b5fe8102870fc Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 22 Aug 2013 22:21:52 +0200 Subject: [PATCH] Renamed module name. --- app/controllers/rss_controller.rb | 2 +- lib/rss.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/rss_controller.rb b/app/controllers/rss_controller.rb index c249e61ba..3ec80406f 100644 --- a/app/controllers/rss_controller.rb +++ b/app/controllers/rss_controller.rb @@ -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 diff --git a/lib/rss.rb b/lib/rss.rb index 2925a8a2f..083f04bce 100644 --- a/lib/rss.rb +++ b/lib/rss.rb @@ -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 )