Generate html even if download_counts.json is missing

This lets us test the html generation locally.
This commit is contained in:
Steve Purcell 2013-04-26 08:41:15 +01:00
parent bcf41a08a5
commit e6e19cd5aa

View file

@ -4,7 +4,7 @@
include ERB::Util
archive_json = JSON.parse(File.open("../archive.json").read)
recipe_json = JSON.parse(File.open("../recipes.json").read)
downloads_json = JSON.parse(File.open("../download_counts.json").read)
downloads_json = JSON.parse(File.open("../download_counts.json").read) rescue {}
packages = (archive_json.keys & recipe_json.keys).sort.map do |pkgname|
package = OpenStruct.new