module FrankHelpers
def jasmine_snippet
"describe("Jasmine", function() {
it("makes testing JavaScript awesome!", function() {
expect(yourCode).toBeLotsBetter();
});
});"
end
def downloads
require 'digest/sha1'
Dir.glob('../downloads/*.zip').sort.reverse.collect do |f|
item = {}
item[:filename] = File.basename(f)
item[:version] = /jasmine-standalone-(.*).zip/.match(f)[1]
item[:rc] = /\.rc/.match(f) ? 'rc' : ''
item[:size] = "#{File.size(f) / 1024}k"
item[:date] = File.mtime(f).strftime("%Y/%m/%d %H:%M:%S %Z")
item[:sha] = Digest::SHA1.hexdigest File.read(f)
item
end
end
end