Project

General

Profile

Patch #1054 ยป simple_ci.diff

simple_ci patch - Kaare Nilsen, 2008-04-14 00:49

View differences:

simple_ci_controller.rb (working copy)
15 15
# along with this program; if not, write to the Free Software
16 16
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17 17

  
18
require 'rss/1.0'
19
require 'rss/2.0'
18
require 'simple-rss'
20 19
require 'open-uri'
20
require 'rubygems'
21 21

  
22 22
class SimpleCiController < ApplicationController
23 23
  layout 'base'
......
32 32
    feed_url = feed_url.value if feed_url
33 33
    if !feed_url.blank?
34 34
      begin
35
        content = ''
36
        # Open the feed and parse it
37
        open(feed_url) do |s| content = s.read end
38
        rss = RSS::Parser.parse(content, false)
35
        rss = SimpleRSS.parse open(feed_url)
39 36
        if rss
40 37
          @builds = rss.items.collect do |item|
41 38
            build = {:time => item.date,
    (1-1/1)