cardmagic-simple-rss 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/simple-rss.rb CHANGED
@@ -2,7 +2,7 @@ require 'cgi'
2
2
  require 'time'
3
3
 
4
4
  class SimpleRSS
5
- VERSION = "1.2.1"
5
+ VERSION = "1.2.2"
6
6
 
7
7
  attr_reader :items, :source
8
8
  alias :entries :items
@@ -36,7 +36,7 @@ class SimpleRSS
36
36
  def initialize(source, options={})
37
37
  @source = source.respond_to?(:read) ? source.read : source.to_s
38
38
  @items = Array.new
39
- @options = options
39
+ @options = Hash.new.update(options)
40
40
 
41
41
  parse
42
42
  end
@@ -86,8 +86,8 @@ class SimpleRSS
86
86
 
87
87
  if $2 || $3
88
88
  tag_cleaned = clean_tag(tag)
89
- eval %{ @#{ tag_cleaned } = clean_content(tag, $2, $3) }
90
- self.class.class_eval %{ attr_reader :#{ tag_cleaned } } unless @options[:marshalable]
89
+ instance_variable_set("@#{ tag_cleaned }", clean_content(tag, $2, $3))
90
+ self.class.send(:attr_reader, tag_cleaned)
91
91
  end
92
92
  end
93
93
 
data/simple-rss.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "simple-rss"
3
- s.version = "1.2.1"
3
+ s.version = "1.2.2"
4
4
  s.date = "2009-02-25"
5
5
  s.summary = "A simple, flexible, extensible, and liberal RSS and Atom reader for Ruby. It is designed to be backwards compatible with the standard RSS parser, but will never do RSS generation."
6
6
  s.email = "lucas@rufy.com"
@@ -1,8 +1,8 @@
1
1
  require File.dirname(__FILE__) + '/../test_helper'
2
2
  class BaseTest < Test::Unit::TestCase
3
3
  def setup
4
- @rss09 = SimpleRSS.parse open(File.dirname(__FILE__) + '/../data/rss09.rdf'), true
5
- @rss20 = SimpleRSS.parse open(File.dirname(__FILE__) + '/../data/rss20.xml'), false
4
+ @rss09 = SimpleRSS.parse open(File.dirname(__FILE__) + '/../data/rss09.rdf')
5
+ @rss20 = SimpleRSS.parse open(File.dirname(__FILE__) + '/../data/rss20.xml')
6
6
  @atom = SimpleRSS.parse open(File.dirname(__FILE__) + '/../data/atom.xml')
7
7
  end
8
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cardmagic-simple-rss
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Carlson