X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/6f0a393ef9191a70d9c5040ed35f6ee4ca33db8b..e86c65d10b64323f288a8eef9a70be267c62cc55:/cookbooks/tile/files/default/ruby/expire.rb diff --git a/cookbooks/tile/files/default/ruby/expire.rb b/cookbooks/tile/files/default/ruby/expire.rb index f129e3510..1392229e8 100755 --- a/cookbooks/tile/files/default/ruby/expire.rb +++ b/cookbooks/tile/files/default/ruby/expire.rb @@ -5,7 +5,7 @@ require "proj4" require "xml/libxml" require "set" require "time" -require "mmap" +require "simple-mmap" module Expire # projection object to go from latlon -> spherical mercator @@ -164,7 +164,7 @@ module Expire # open the cache def initialize(filename) - @cache = Mmap.new(filename) + @cache = SimpleMmap::FileWindow.open(filename) throw "Unexpected format" unless @cache[0..3].unpack("l").first == 1 throw "Unexpected ID size" unless @cache[4..7].unpack("l").first == 8