]> git.openstreetmap.org Git - rails.git/blobdiff - lib/osm.rb
Add the author name to RSS feeds.
[rails.git] / lib / osm.rb
index 3043eb395a7ad1d0c3687d301990717fa8fa9f2e..5f31e31bf3f83f2b232cd1687c0c7b6657d19bff 100644 (file)
@@ -311,7 +311,7 @@ module OSM
       image << link
     end
 
-    def add(latitude=0, longitude=0, title_text='dummy title', url='http://www.example.com/', description_text='dummy description', timestamp=DateTime.now)
+    def add(latitude=0, longitude=0, title_text='dummy title', author_text='anonymous', url='http://www.example.com/', description_text='dummy description', timestamp=DateTime.now)
       item = XML::Node.new 'item'
 
       title = XML::Node.new 'title'
@@ -329,6 +329,10 @@ module OSM
       description << description_text
       item << description
 
+      author = XML::Node.new 'author'
+      author << author_text
+      item << author
+
       pubDate = XML::Node.new 'pubDate'
       pubDate << timestamp.to_s(:rfc822)
       item << pubDate