]> git.openstreetmap.org Git - rails.git/commitdiff
Rubocop autofixes.
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 7 Sep 2016 10:07:42 +0000 (11:07 +0100)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 7 Sep 2016 10:07:42 +0000 (11:07 +0100)
16 files changed:
app/views/api/permissions.builder
app/views/changeset/_comments.rss.builder
app/views/changeset/comments_feed.rss.builder
app/views/changeset/list.atom.builder
app/views/changeset/timeout.atom.builder
app/views/diary_entry/rss.rss.builder
app/views/notes/_note.gpx.builder
app/views/notes/_note.rss.builder
app/views/notes/_note.xml.builder
app/views/notes/feed.rss.builder
app/views/notes/index.gpx.builder
app/views/notes/index.rss.builder
app/views/notes/show.gpx.builder
app/views/notes/show.rss.builder
app/views/trace/georss.rss.builder
app/views/user/api_read.builder

index 066f5678877965f76ba3915ec50d76867015d270..6d26a9e532521d05f826c3a38edb8a9d0462bb8e 100644 (file)
@@ -1,6 +1,6 @@
 # create list of permissions
 # create list of permissions
-xml.instruct! :xml, :version=>"1.0"
-xml.osm("version" => "#{API_VERSION}", "generator" => "OpenStreetMap Server") do
+xml.instruct! :xml, :version => "1.0"
+xml.osm("version" => API_VERSION.to_s, "generator" => "OpenStreetMap Server") do
   xml.permissions do
     @permissions.each do |permission|
       xml.permission :name => permission
   xml.permissions do
     @permissions.each do |permission|
       xml.permission :name => permission
index 8ad5cbaa77f1fb4f206e7b16a00f263a573761c6..5c683c86d8ec224fe42ddd6d1bd5d5dc16e019ed 100644 (file)
@@ -1,17 +1,15 @@
 comments.each do |comment|
   xml.item do
     xml.title t("changeset.rss.comment", :author => comment.author.display_name, :changeset_id => comment.changeset.id.to_s)
 comments.each do |comment|
   xml.item do
     xml.title t("changeset.rss.comment", :author => comment.author.display_name, :changeset_id => comment.changeset.id.to_s)
-    
+
     xml.link url_for(:controller => "browse", :action => "changeset", :id => comment.changeset.id, :anchor => "c#{comment.id}", :only_path => false)
     xml.guid url_for(:controller => "browse", :action => "changeset", :id => comment.changeset.id, :anchor => "c#{comment.id}", :only_path => false)
 
     xml.description do
     xml.link url_for(:controller => "browse", :action => "changeset", :id => comment.changeset.id, :anchor => "c#{comment.id}", :only_path => false)
     xml.guid url_for(:controller => "browse", :action => "changeset", :id => comment.changeset.id, :anchor => "c#{comment.id}", :only_path => false)
 
     xml.description do
-      xml.cdata! render(:partial => "comment", :object => comment, :formats => [ :html ])
+      xml.cdata! render(:partial => "comment", :object => comment, :formats => [:html])
     end
 
     end
 
-    if comment.author
-      xml.dc :creator, comment.author.display_name
-    end
+    xml.dc :creator, comment.author.display_name if comment.author
 
     xml.pubDate comment.created_at.to_s(:rfc822)
   end
 
     xml.pubDate comment.created_at.to_s(:rfc822)
   end
index 60a229a30e73f97e86a437f104d71522f65e7ff0..f6d304a4cbd9bf8c6a4da50d1dba7341cbd23650 100644 (file)
@@ -1,14 +1,13 @@
-xml.rss("version" => "2.0", 
+xml.rss("version" => "2.0",
         "xmlns:dc" => "http://purl.org/dc/elements/1.1/") do
   xml.channel do
     if @changeset
         "xmlns:dc" => "http://purl.org/dc/elements/1.1/") do
   xml.channel do
     if @changeset
-      xml.title t('changeset.rss.title_particular', :changeset_id => @changeset.id)
+      xml.title t("changeset.rss.title_particular", :changeset_id => @changeset.id)
     else
     else
-      xml.title t('changeset.rss.title_all')
+      xml.title t("changeset.rss.title_all")
     end
     xml.link url_for(:controller => "site", :action => "index", :only_path => false)
 
     xml << render(:partial => "comments", :object => @comments)
   end
 end
     end
     xml.link url_for(:controller => "site", :action => "index", :only_path => false)
 
     xml << render(:partial => "comments", :object => @comments)
   end
 end
-
index 3e0cd9ec58c6624bf3c27535f93cc5568351a607..979a7492f08efcc1cf4f82cb4690c167dc5d6446 100644 (file)
@@ -1,20 +1,20 @@
 atom_feed(:language => I18n.locale, :schema_date => 2009,
 atom_feed(:language => I18n.locale, :schema_date => 2009,
-          :id => url_for(params.merge({ :only_path => false })),
-          :root_url => url_for(params.merge({ :action => :list, :format => nil, :only_path => false })),
+          :id => url_for(params.merge(:only_path => false)),
+          :root_url => url_for(params.merge(:action => :list, :format => nil, :only_path => false)),
           "xmlns:georss" => "http://www.georss.org/georss") do |feed|
   feed.title changeset_list_title(params, @user)
 
           "xmlns:georss" => "http://www.georss.org/georss") do |feed|
   feed.title changeset_list_title(params, @user)
 
-  feed.updated @edits.map {|e|  [e.created_at, e.closed_at].max }.max
+  feed.updated @edits.map { |e| [e.created_at, e.closed_at].max }.max
   feed.icon "http://#{SERVER_URL}/favicon.ico"
   feed.logo "http://#{SERVER_URL}/images/mag_map-rss2.0.png"
 
   feed.icon "http://#{SERVER_URL}/favicon.ico"
   feed.logo "http://#{SERVER_URL}/images/mag_map-rss2.0.png"
 
-  feed.rights :type => 'xhtml' do |xhtml|
+  feed.rights :type => "xhtml" do |xhtml|
     xhtml.a :href => "http://creativecommons.org/licenses/by-sa/2.0/" do |a|
       a.img :src => "http://#{SERVER_URL}/images/cc_button.png", :alt => "CC by-sa 2.0"
     end
   end
 
     xhtml.a :href => "http://creativecommons.org/licenses/by-sa/2.0/" do |a|
       a.img :src => "http://#{SERVER_URL}/images/cc_button.png", :alt => "CC by-sa 2.0"
     end
   end
 
-  for changeset in @edits
+  @edits.each do |changeset|
     feed.entry(changeset, :updated => changeset.closed_at, :id => changeset_url(changeset.id, :only_path => false)) do |entry|
       entry.link :rel => "alternate",
                  :href => changeset_read_url(changeset, :only_path => false),
     feed.entry(changeset, :updated => changeset.closed_at, :id => changeset_url(changeset.id, :only_path => false)) do |entry|
       entry.link :rel => "alternate",
                  :href => changeset_read_url(changeset, :only_path => false),
@@ -23,20 +23,20 @@ atom_feed(:language => I18n.locale, :schema_date => 2009,
                  :href => changeset_download_url(changeset, :only_path => false),
                  :type => "application/osmChange+xml"
 
                  :href => changeset_download_url(changeset, :only_path => false),
                  :type => "application/osmChange+xml"
 
-      if !changeset.tags.empty? and changeset.tags.has_key? "comment"
-        entry.title t('browse.changeset.feed.title_comment', :id => h(changeset.id), :comment => h(changeset.tags['comment'])), :type => "html"
+      if !changeset.tags.empty? && changeset.tags.key?("comment")
+        entry.title t("browse.changeset.feed.title_comment", :id => h(changeset.id), :comment => h(changeset.tags["comment"])), :type => "html"
       else
       else
-        entry.title t('browse.changeset.feed.title', :id => h(changeset.id))
+        entry.title t("browse.changeset.feed.title", :id => h(changeset.id))
       end
 
       if changeset.user.data_public?
         entry.author do |author|
           author.name changeset.user.display_name
       end
 
       if changeset.user.data_public?
         entry.author do |author|
           author.name changeset.user.display_name
-          author.uri url_for(:controller => 'user', :action => 'view', :display_name => changeset.user.display_name, :only_path => false)
+          author.uri url_for(:controller => "user", :action => "view", :display_name => changeset.user.display_name, :only_path => false)
         end
       end
 
         end
       end
 
-      feed.content :type => 'xhtml' do |xhtml|
+      feed.content :type => "xhtml" do |xhtml|
         xhtml.style "th { text-align: left } tr { vertical-align: top }"
         xhtml.table do |table|
           table.tr do |tr|
         xhtml.style "th { text-align: left } tr { vertical-align: top }"
         xhtml.table do |table|
           table.tr do |tr|
index a4faeb34b1ed93f0ee164acfcd0bb14ece71f182..c878905e6ed17d63ac9c33713f53232949cc38a5 100644 (file)
@@ -1,12 +1,12 @@
 atom_feed(:language => I18n.locale, :schema_date => 2009,
 atom_feed(:language => I18n.locale, :schema_date => 2009,
-          :id => url_for(params.merge({ :only_path => false })),
-          :root_url => url_for(params.merge({ :only_path => false, :format => nil })),
+          :id => url_for(params.merge(:only_path => false)),
+          :root_url => url_for(params.merge(:only_path => false, :format => nil)),
           "xmlns:georss" => "http://www.georss.org/georss") do |feed|
   feed.title @title
 
           "xmlns:georss" => "http://www.georss.org/georss") do |feed|
   feed.title @title
 
-  feed.subtitle :type => 'xhtml' do |xhtml|
+  feed.subtitle :type => "xhtml" do |xhtml|
     xhtml.p do |p|
     xhtml.p do |p|
-      p << t('changeset.timeout.sorry')
+      p << t("changeset.timeout.sorry")
     end
   end
 end
     end
   end
 end
index 240025fa7484a00ec0300ecf96c687a1ed0a86f2..7adcb3b5245309c17693cabaea040e3170d8f8d7 100644 (file)
@@ -1,6 +1,6 @@
 xml.instruct!
 
 xml.instruct!
 
-xml.rss("version" => "2.0", 
+xml.rss("version" => "2.0",
         "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
         "xmlns:georss" => "http://www.georss.org/georss") do
   xml.channel do
         "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
         "xmlns:georss" => "http://www.georss.org/georss") do
   xml.channel do
@@ -12,10 +12,10 @@ xml.rss("version" => "2.0",
       xml.title "OpenStreetMap"
       xml.width "100"
       xml.height "100"
       xml.title "OpenStreetMap"
       xml.width "100"
       xml.height "100"
-      xml.link url_for(:action => "list", :host=> SERVER_URL)
+      xml.link url_for(:action => "list", :host => SERVER_URL)
     end
 
     end
 
-    for entry in @entries
+    @entries.each do |entry|
       xml.item do
         xml.title h(entry.title)
         xml.link url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :host => SERVER_URL)
       xml.item do
         xml.title h(entry.title)
         xml.link url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :host => SERVER_URL)
@@ -24,11 +24,11 @@ xml.rss("version" => "2.0",
         xml.author entry.user.display_name
         xml.pubDate entry.created_at.to_s(:rfc822)
         xml.comments url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :anchor => "comments", :host => SERVER_URL)
         xml.author entry.user.display_name
         xml.pubDate entry.created_at.to_s(:rfc822)
         xml.comments url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :anchor => "comments", :host => SERVER_URL)
-        
-        if entry.latitude and entry.longitude
+
+        if entry.latitude && entry.longitude
           xml.geo :lat, entry.latitude.to_s
           xml.geo :long, entry.longitude.to_s
           xml.geo :lat, entry.latitude.to_s
           xml.geo :long, entry.longitude.to_s
-          xml.georss :point, "#{entry.latitude.to_s} #{entry.longitude.to_s}"
+          xml.georss :point, "#{entry.latitude} #{entry.longitude}"
         end
       end
     end
         end
       end
     end
index 8a96db81cc61bdb3882f4e3ab089e8a13670f7d0..9d8ede249d80a711c74b39794700b5bbf30ab014 100644 (file)
@@ -3,7 +3,7 @@ xml.wpt("lon" => note.lon, "lat" => note.lat) do
   xml.name t("browse.note.title", :id => note.id)
 
   xml.desc do
   xml.name t("browse.note.title", :id => note.id)
 
   xml.desc do
-    xml.cdata! render(:partial => "description", :object => note, :formats => [ :html ])
+    xml.cdata! render(:partial => "description", :object => note, :formats => [:html])
   end
 
   xml.link("href" => browse_note_url(note, :host => SERVER_URL))
   end
 
   xml.link("href" => browse_note_url(note, :host => SERVER_URL))
@@ -22,8 +22,6 @@ xml.wpt("lon" => note.lon, "lat" => note.lat) do
     xml.date_created note.created_at
     xml.status note.status
 
     xml.date_created note.created_at
     xml.status note.status
 
-    if note.closed?
-      xml.date_closed note.closed_at
-    end
+    xml.date_closed note.closed_at if note.closed?
   end
 end
   end
 end
index a095b636d9ed45a8bf907a7731f140597168e36f..900e7fd7cb328bfcb0e6e3b59ef2e8b4cafcc4b8 100644 (file)
@@ -2,20 +2,18 @@ xml.item do
   location = describe_location(note.lat, note.lon, 14, locale)
 
   if note.closed?
   location = describe_location(note.lat, note.lon, 14, locale)
 
   if note.closed?
-    xml.title t('note.rss.closed', :place => location)
+    xml.title t("note.rss.closed", :place => location)
   elsif note.comments.length > 1
   elsif note.comments.length > 1
-    xml.title t('note.rss.commented', :place => location)
+    xml.title t("note.rss.commented", :place => location)
   else
   else
-    xml.title t('note.rss.opened', :place => location)
+    xml.title t("note.rss.opened", :place => location)
   end
 
   xml.link browse_note_url(note)
   xml.guid note_url(note)
   end
 
   xml.link browse_note_url(note)
   xml.guid note_url(note)
-  xml.description render(:partial => "description", :object => note, :formats => [ :html ])
+  xml.description render(:partial => "description", :object => note, :formats => [:html])
 
 
-  if note.author
-    xml.author note.author.display_name
-  end
+  xml.author note.author.display_name if note.author
 
   xml.pubDate note.updated_at.to_s(:rfc822)
   xml.geo :lat, note.lat
 
   xml.pubDate note.updated_at.to_s(:rfc822)
   xml.geo :lat, note.lat
index ee9570205ce8e79d18e982aaea5487831cb51090..fb6738aaa1c6342a150f8c69670abe0b5987f3ca 100644 (file)
@@ -12,9 +12,7 @@ xml.note("lon" => note.lon, "lat" => note.lat) do
   xml.date_created note.created_at
   xml.status note.status
 
   xml.date_created note.created_at
   xml.status note.status
 
-  if note.closed?
-    xml.date_closed note.closed_at
-  end
+  xml.date_closed note.closed_at if note.closed?
 
   xml.comments do
     note.comments.each do |comment|
 
   xml.comments do
     note.comments.each do |comment|
index e663d94a60ff8d19c61cfb0cb4ccc4ddc84829f9..708192e5f48f020149ead7ef6dadd3aabdb5ee1c 100644 (file)
@@ -1,12 +1,12 @@
 xml.instruct!
 
 xml.instruct!
 
-xml.rss("version" => "2.0", 
+xml.rss("version" => "2.0",
         "xmlns:dc" => "http://purl.org/dc/elements/1.1/",
         "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
         "xmlns:georss" => "http://www.georss.org/georss") do
   xml.channel do
         "xmlns:dc" => "http://purl.org/dc/elements/1.1/",
         "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
         "xmlns:georss" => "http://www.georss.org/georss") do
   xml.channel do
-    xml.title t('note.rss.title')
-    xml.description t('note.rss.description_area', :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon )
+    xml.title t("note.rss.title")
+    xml.description t("note.rss.description_area", :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon)
     xml.link url_for(:controller => "site", :action => "index", :only_path => false)
 
     @comments.each do |comment|
     xml.link url_for(:controller => "site", :action => "index", :only_path => false)
 
     @comments.each do |comment|
@@ -14,17 +14,15 @@ xml.rss("version" => "2.0",
 
       xml.item do
         xml.title t("note.rss.#{comment.event}", :place => location)
 
       xml.item do
         xml.title t("note.rss.#{comment.event}", :place => location)
-        
+
         xml.link url_for(:controller => "browse", :action => "note", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false)
         xml.guid url_for(:controller => "browse", :action => "note", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false)
 
         xml.description do
         xml.link url_for(:controller => "browse", :action => "note", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false)
         xml.guid url_for(:controller => "browse", :action => "note", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false)
 
         xml.description do
-          xml.cdata! render(:partial => "entry", :object => comment, :formats => [ :html ])
+          xml.cdata! render(:partial => "entry", :object => comment, :formats => [:html])
         end
 
         end
 
-        if comment.author
-          xml.dc :creator, comment.author.display_name
-        end
+        xml.dc :creator, comment.author.display_name if comment.author
 
         xml.pubDate comment.created_at.to_s(:rfc822)
         xml.geo :lat, comment.note.lat
 
         xml.pubDate comment.created_at.to_s(:rfc822)
         xml.geo :lat, comment.note.lat
index 5207ec3f81d82430913b4a18ce9cdb0c08fcbf0c..58da357da5f6daa688ed27de65f333c2c83b9858 100644 (file)
@@ -1,6 +1,6 @@
 xml.instruct!
 
 xml.instruct!
 
-xml.gpx("version" => "1.1", 
+xml.gpx("version" => "1.1",
         "creator" => "OpenStreetMap.org",
         "xmlns" => "http://www.topografix.com/GPX/1/1",
         "xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance",
         "creator" => "OpenStreetMap.org",
         "xmlns" => "http://www.topografix.com/GPX/1/1",
         "xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance",
index 53806f50207960699523bab209f3d137ce0081b9..ecbbb73263afac0bc5c757b2101195692a9ac372 100644 (file)
@@ -1,11 +1,11 @@
 xml.instruct!
 
 xml.instruct!
 
-xml.rss("version" => "2.0", 
+xml.rss("version" => "2.0",
         "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
         "xmlns:georss" => "http://www.georss.org/georss") do
   xml.channel do
         "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
         "xmlns:georss" => "http://www.georss.org/georss") do
   xml.channel do
-    xml.title t('note.rss.title')
-    xml.description t('note.rss.description_area', :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon )
+    xml.title t("note.rss.title")
+    xml.description t("note.rss.description_area", :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon)
     xml.link url_for(:controller => "site", :action => "index", :only_path => false)
 
     xml << (render(:partial => "note", :collection => @notes) || "")
     xml.link url_for(:controller => "site", :action => "index", :only_path => false)
 
     xml << (render(:partial => "note", :collection => @notes) || "")
index 8bb6c9688c60cae7f62113c813d23b5d9b6b4b40..f87ff4dd947ba2f8f323287e6a9916cbe04644d0 100644 (file)
@@ -1,6 +1,6 @@
 xml.instruct!
 
 xml.instruct!
 
-xml.gpx("version" => "1.1", 
+xml.gpx("version" => "1.1",
         "creator" => "OpenStreetMap.org",
         "xmlns" => "http://www.topografix.com/GPX/1/1",
         "xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance",
         "creator" => "OpenStreetMap.org",
         "xmlns" => "http://www.topografix.com/GPX/1/1",
         "xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance",
index e566ff02ec2b224ff2e3222e9f410893259e618d..62ccbe8a94a4ab2f3f2969eff254b4264ae65d1f 100644 (file)
@@ -1,11 +1,11 @@
 xml.instruct!
 
 xml.instruct!
 
-xml.rss("version" => "2.0", 
+xml.rss("version" => "2.0",
         "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
         "xmlns:georss" => "http://www.georss.org/georss") do
   xml.channel do
         "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
         "xmlns:georss" => "http://www.georss.org/georss") do
   xml.channel do
-    xml.title t('note.rss.title')
-    xml.description t('note.rss.description_item', :id => @note.id)
+    xml.title t("note.rss.title")
+    xml.description t("note.rss.description_item", :id => @note.id)
     xml.link url_for(:controller => "site", :action => "index", :only_path => false)
 
     xml << render(:partial => "note", :object => @note)
     xml.link url_for(:controller => "site", :action => "index", :only_path => false)
 
     xml << render(:partial => "note", :object => @note)
index 0b2e26d11e66e49b9c52cef2f2982aebcb53134b..176f2bdbf9c9aa43f8197d4fb74d3283bce2478f 100644 (file)
@@ -1,6 +1,6 @@
 xml.instruct!
 
 xml.instruct!
 
-xml.rss("version" => "2.0", 
+xml.rss("version" => "2.0",
         "xmlns:dc" => "http://purl.org/dc/elements/1.1/",
         "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
         "xmlns:georss" => "http://www.georss.org/georss") do
         "xmlns:dc" => "http://purl.org/dc/elements/1.1/",
         "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
         "xmlns:georss" => "http://www.georss.org/georss") do
@@ -25,14 +25,14 @@ xml.rss("version" => "2.0",
         xml.guid url_for(:controller => :trace, :action => :view, :id => trace.id, :display_name => trace.user.display_name, :only_path => false)
 
         xml.description do
         xml.guid url_for(:controller => :trace, :action => :view, :id => trace.id, :display_name => trace.user.display_name, :only_path => false)
 
         xml.description do
-          xml.cdata! render(:partial => "description", :object => trace, :formats => [ :html ])
+          xml.cdata! render(:partial => "description", :object => trace, :formats => [:html])
         end
 
         xml.dc :creator, trace.user.display_name
 
         xml.pubDate trace.timestamp.to_s(:rfc822)
 
         end
 
         xml.dc :creator, trace.user.display_name
 
         xml.pubDate trace.timestamp.to_s(:rfc822)
 
-        if trace.latitude and trace.longitude
+        if trace.latitude && trace.longitude
           xml.geo :lat, trace.latitude
           xml.geo :long, trace.longitude
           xml.georss :point, "#{trace.latitude} #{trace.longitude}"
           xml.geo :lat, trace.latitude
           xml.geo :long, trace.longitude
           xml.georss :point, "#{trace.latitude} #{trace.longitude}"
index 55775df9ef30ed88edb34cf9cc3451d3475adfe9..7136b9f5867af6de53994dcad04ff5527a4f95d7 100644 (file)
@@ -3,16 +3,14 @@ xml.osm("version" => API_VERSION, "generator" => GENERATOR) do
   xml.tag! "user", :id => @this_user.id,
                    :display_name => @this_user.display_name,
                    :account_created => @this_user.creation_time.xmlschema do
   xml.tag! "user", :id => @this_user.id,
                    :display_name => @this_user.display_name,
                    :account_created => @this_user.creation_time.xmlschema do
-    if @this_user.description
-      xml.tag! "description", @this_user.description
-    end
+    xml.tag! "description", @this_user.description if @this_user.description
     if @user && @user == @this_user
       xml.tag! "contributor-terms", :agreed => @this_user.terms_agreed.present?,
                                     :pd => @this_user.consider_pd
     else
       xml.tag! "contributor-terms", :agreed => @this_user.terms_agreed.present?
     end
     if @user && @user == @this_user
       xml.tag! "contributor-terms", :agreed => @this_user.terms_agreed.present?,
                                     :pd => @this_user.consider_pd
     else
       xml.tag! "contributor-terms", :agreed => @this_user.terms_agreed.present?
     end
-    if @this_user.image.file? or @this_user.image_use_gravatar
+    if @this_user.image.file? || @this_user.image_use_gravatar
       xml.tag! "img", :href => user_image_url(@this_user, :size => 256)
     end
     xml.tag! "roles" do
       xml.tag! "img", :href => user_image_url(@this_user, :size => 256)
     end
     xml.tag! "roles" do
@@ -31,7 +29,7 @@ xml.osm("version" => API_VERSION, "generator" => GENERATOR) do
       end
     end
     if @user && @user == @this_user
       end
     end
     if @user && @user == @this_user
-      if @this_user.home_lat and @this_user.home_lon
+      if @this_user.home_lat && @this_user.home_lon
         xml.tag! "home", :lat => @this_user.home_lat,
                          :lon => @this_user.home_lon,
                          :zoom => @this_user.home_zoom
         xml.tag! "home", :lat => @this_user.home_lat,
                          :lon => @this_user.home_lon,
                          :zoom => @this_user.home_zoom