]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tile/files/default/ruby/expire.rb
Fix issues reported by new rubocop
[chef.git] / cookbooks / tile / files / default / ruby / expire.rb
index d695a0bc53de611f3a752fe424292ee1dc3bf560..8a212aa92f3904dc79d738c617a351aeacaf50b9 100755 (executable)
@@ -18,9 +18,9 @@ module Expire
   # the size of the meta tile blocks
   METATILE = 8
   # the directory root for meta tiles
-  HASH_ROOT = "/tiles/default/"
+  HASH_ROOT = "/tiles/default/".freeze
   # node cache file
-  NODE_CACHE_FILE = "/store/database/nodes"
+  NODE_CACHE_FILE = "/store/database/nodes".freeze
 
   # turns a spherical mercator coord into a tile coord
   def self.tile_from_merc(point, zoom)
@@ -143,7 +143,7 @@ module Expire
     set = Set.new nodes.values
 
     # expire tiles and shrink to the set of parents
-    (max_zoom).downto(min_zoom) do |_|
+    max_zoom.downto(min_zoom) do |_|
       # allow the block to work on the set, returning the set at the next
       # zoom level
       set = yield set