zomgrss 1.0.0 → 1.1.0

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.
@@ -158,8 +158,13 @@ TODO
158
158
  each new RSS feed you want to create.
159
159
  * Support for Atom?
160
160
  * Allow lambdas instead of methods in rss_options (useful to return a text snippet of a field).
161
- * Create Rubygem (iknorite?)
162
161
  * Generate static .xml files.
162
+ * Use blocks for options:
163
+
164
+ BlogPost.rss_options do |options|
165
+ options.title = "My emo blog"
166
+ options.base_url = "http://www.example.com"
167
+ end
163
168
 
164
169
  Most of these can be easily implemented but I haven't needed them so far. If you'd like to see them
165
170
  included please let me know through an Issue in the [Github Tracker](http://github.com/febuiles/zomgrss/issues).
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.1.0
@@ -28,10 +28,10 @@ module ZOMGRSS
28
28
  items.each do |item|
29
29
  xml.item do
30
30
  xml.title item.send(rss_options[:title_method])
31
- xml.link(rss_options[:link_format].gsub(":id", item.id.to_s), :isPermaLink => false)
31
+ xml.link rss_options[:link_format].gsub(":id", item.id.to_s)
32
32
  xml.description item.send(rss_options[:body_method])
33
33
  xml.pubDate Time.parse(item.send(rss_options[:date_method]).to_s).rfc822()
34
- xml.guid rss_options[:guid_format].gsub(":id", item.id.to_s)
34
+ xml.guid(rss_options[:guid_format].gsub(":id", item.id.to_s), :isPermaLink => false)
35
35
  end
36
36
  end
37
37
  end
@@ -151,6 +151,6 @@ describe "ZOMGRSS.to_rss" do
151
151
  end
152
152
 
153
153
  it "uses a GUID with isPermaLink=false" do
154
- @feed.at_css("channel item link").attributes["isPermaLink"].text.should == "false"
154
+ @feed.at_css("channel item guid").attributes["isPermaLink"].text.should == "false"
155
155
  end
156
156
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{zomgrss}
8
- s.version = "1.0.0"
8
+ s.version = "1.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Federico Builes"]
12
- s.date = %q{2010-05-22}
12
+ s.date = %q{2010-05-23}
13
13
  s.description = %q{Create RSS feeds from Ruby collections.}
14
14
  s.email = %q{federico@mheroin.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zomgrss
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
+ - 1
8
9
  - 0
9
- - 0
10
- version: 1.0.0
10
+ version: 1.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Federico Builes
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-05-22 00:00:00 -05:00
18
+ date: 2010-05-23 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency