From 9adad9f90df122de58ffde3818c8b6c46d2d4b01 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 14 Jun 2022 19:04:39 +0100 Subject: [PATCH] Fix new rubocop warnings --- app/views/api/notes/_note.gpx.builder | 2 +- app/views/api/notes/_note.rss.builder | 2 +- app/views/api/notes/feed.rss.builder | 2 +- app/views/changeset_comments/_comments.rss.builder | 2 +- app/views/diary_entries/rss.rss.builder | 2 +- app/views/traces/georss.rss.builder | 2 +- test/controllers/api/notes_controller_test.rb | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/api/notes/_note.gpx.builder b/app/views/api/notes/_note.gpx.builder index 74961b2e0..c79ed6a6e 100644 --- a/app/views/api/notes/_note.gpx.builder +++ b/app/views/api/notes/_note.gpx.builder @@ -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 diff --git a/app/views/api/notes/_note.rss.builder b/app/views/api/notes/_note.rss.builder index 3e562d1a2..968b4dc67 100644 --- a/app/views/api/notes/_note.rss.builder +++ b/app/views/api/notes/_note.rss.builder @@ -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}" diff --git a/app/views/api/notes/feed.rss.builder b/app/views/api/notes/feed.rss.builder index f0d00470b..89f888f5b 100644 --- a/app/views/api/notes/feed.rss.builder +++ b/app/views/api/notes/feed.rss.builder @@ -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}" diff --git a/app/views/changeset_comments/_comments.rss.builder b/app/views/changeset_comments/_comments.rss.builder index 4136b24b4..59973965f 100644 --- a/app/views/changeset_comments/_comments.rss.builder +++ b/app/views/changeset_comments/_comments.rss.builder @@ -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 diff --git a/app/views/diary_entries/rss.rss.builder b/app/views/diary_entries/rss.rss.builder index 06361c49e..2fec0e5e5 100644 --- a/app/views/diary_entries/rss.rss.builder +++ b/app/views/diary_entries/rss.rss.builder @@ -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 diff --git a/app/views/traces/georss.rss.builder b/app/views/traces/georss.rss.builder index 991f74ebb..36641fec0 100644 --- a/app/views/traces/georss.rss.builder +++ b/app/views/traces/georss.rss.builder @@ -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 diff --git a/test/controllers/api/notes_controller_test.rb b/test/controllers/api/notes_controller_test.rb index 7dbcdc816..d6759e192 100644 --- a/test/controllers/api/notes_controller_test.rb +++ b/test/controllers/api/notes_controller_test.rb @@ -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}" -- 2.39.5