X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/6f0a393ef9191a70d9c5040ed35f6ee4ca33db8b..0954ecc67240e12aab09be1dabf52c57032b24eb:/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..1d4a861f4 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