From 176e9c051a33ba43da462dfd22ab2a2560f0d514 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 27 Aug 2013 19:09:25 +0100 Subject: [PATCH] Update coastline data when it changes --- cookbooks/tile/recipes/default.rb | 8 +++++++- roles/tile.rb | 6 ++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/cookbooks/tile/recipes/default.rb b/cookbooks/tile/recipes/default.rb index 3ad897448..cd88e91ce 100644 --- a/cookbooks/tile/recipes/default.rb +++ b/cookbooks/tile/recipes/default.rb @@ -199,7 +199,13 @@ node[:tile][:data].each do |name,data| end remote_file file do - action :create_if_missing + if data[:refresh] + action :create + use_conditional_get true + else + action :create_if_missing + end + source url owner "tile" group "tile" diff --git a/roles/tile.rb b/roles/tile.rb index ffd69239d..eda39b1c3 100644 --- a/roles/tile.rb +++ b/roles/tile.rb @@ -55,7 +55,8 @@ default_attributes( :url => "http://planet.openstreetmap.org/historical-shapefiles/world_boundaries-spherical.tgz" }, :simplified_land_polygons => { - :url => "http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip" + :url => "http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip", + :refresh => true }, :admin_boundaries => { :url => "http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_boundary_lines_land.zip", @@ -68,7 +69,8 @@ default_attributes( :processed => "ne_10m_populated_places_fixed.shp" }, :land_polygons => { - :url => "http://data.openstreetmapdata.com/land-polygons-split-3857.zip" + :url => "http://data.openstreetmapdata.com/land-polygons-split-3857.zip", + :refresh => true } }, :styles => { -- 2.43.2