Fix new rubocop warnings

This commit is contained in:
Tom Hughes 2022-06-14 19:04:39 +01:00
parent 6312e37f6b
commit 9adad9f90d
7 changed files with 7 additions and 7 deletions

View file

@ -1,5 +1,5 @@
xml.wpt("lon" => note.lon, "lat" => note.lat) do
xml.time note.created_at.to_formatted_s(:iso8601)
xml.time note.created_at.to_fs(:iso8601)
xml.name t("browse.note.title", :id => note.id)
xml.desc do

View file

@ -15,7 +15,7 @@ xml.item do
xml.dc :creator, note.author.display_name if note.author
xml.pubDate note.created_at.to_formatted_s(:rfc822)
xml.pubDate note.created_at.to_fs(:rfc822)
xml.geo :lat, note.lat
xml.geo :long, note.lon
xml.georss :point, "#{note.lat} #{note.lon}"

View file

@ -24,7 +24,7 @@ xml.rss("version" => "2.0",
xml.dc :creator, comment.author.display_name if comment.author
xml.pubDate comment.created_at.to_formatted_s(:rfc822)
xml.pubDate comment.created_at.to_fs(:rfc822)
xml.geo :lat, comment.note.lat
xml.geo :long, comment.note.lon
xml.georss :point, "#{comment.note.lat} #{comment.note.lon}"

View file

@ -11,6 +11,6 @@ comments.each do |comment|
xml.dc :creator, comment.author.display_name if comment.author
xml.pubDate comment.created_at.to_formatted_s(:rfc822)
xml.pubDate comment.created_at.to_fs(:rfc822)
end
end

View file

@ -23,7 +23,7 @@ xml.rss("version" => "2.0",
xml.guid diary_entry_url(entry.user, entry, :only_path => false)
xml.description entry.body.to_html
xml.dc :creator, entry.user.display_name
xml.pubDate entry.created_at.to_formatted_s(:rfc822)
xml.pubDate entry.created_at.to_fs(:rfc822)
xml.comments diary_entry_url(entry.user, entry, :anchor => "comments", :only_path => false)
if entry.latitude && entry.longitude

View file

@ -30,7 +30,7 @@ xml.rss("version" => "2.0",
xml.dc :creator, trace.user.display_name
xml.pubDate trace.timestamp.to_formatted_s(:rfc822)
xml.pubDate trace.timestamp.to_fs(:rfc822)
if trace.latitude && trace.longitude
xml.geo :lat, trace.latitude

View file

@ -494,7 +494,7 @@ module Api
assert_select "item", :count => 1 do
assert_select "link", browse_note_url(open_note)
assert_select "guid", note_url(open_note)
assert_select "pubDate", open_note.created_at.to_formatted_s(:rfc822)
assert_select "pubDate", open_note.created_at.to_fs(:rfc822)
# assert_select "geo:lat", open_note.lat.to_s
# assert_select "geo:long", open_note.lon
# assert_select "georss:point", "#{open_note.lon} #{open_note.lon}"