zomgrss 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +6 -1
- data/VERSION +1 -1
- data/lib/zomgrss.rb +2 -2
- data/spec/zomgrss_spec.rb +1 -1
- data/zomgrss.gemspec +2 -2
- metadata +4 -4
data/README.markdown
CHANGED
@@ -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.
|
1
|
+
1.1.0
|
data/lib/zomgrss.rb
CHANGED
@@ -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
|
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
|
34
|
+
xml.guid(rss_options[:guid_format].gsub(":id", item.id.to_s), :isPermaLink => false)
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
data/spec/zomgrss_spec.rb
CHANGED
@@ -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
|
154
|
+
@feed.at_css("channel item guid").attributes["isPermaLink"].text.should == "false"
|
155
155
|
end
|
156
156
|
end
|
data/zomgrss.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{zomgrss}
|
8
|
-
s.version = "1.
|
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-
|
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:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
+
- 1
|
8
9
|
- 0
|
9
|
-
|
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-
|
18
|
+
date: 2010-05-23 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|