add basic rake file with appcache:update task
add basic rake file with appcache:update task

file:b/Rakefile (new)
--- /dev/null
+++ b/Rakefile
@@ -1,1 +1,12 @@
+require "date"
 
+namespace :appcache do
+  desc "update the date in the appcache file (in the gh-pages branch)"
+  task :update do
+    appcache = File.read("cache.appcache")
+    updated  = "# Updated: #{DateTime.now}\n"
+
+    File.write("cache.appcache", appcache.sub(/\A(#.*$\n)?/, updated))
+  end
+end
+

comments