Sha256: 6ef59a465f6d403b2e3a02f398563e8481e8a78feda8b78b30d5b87880eeadd8
Contents?: true
Size: 416 Bytes
Versions: 5
Compression:
Stored size: 416 Bytes
Contents
# frozen_string_literal: true FILE_SIZES = { 's.tmp' => 2**10, 'm.tmp' => 2**17, 'l.tmp' => 2**20, 'xl.tmp' => 2**24 } def create_files FILE_SIZES.each { |fn, size| IO.write(File.join('/tmp', fn), '*' * size) } end create_files run { |req| file_path = File.join('/tmp', req.path) if File.file?(file_path) req.serve_file(file_path) else req.respond(nil, ':status' => 404) end }
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
tipi-0.55 | examples/zlib-bench.rb |
tipi-0.54 | examples/zlib-bench.rb |
tipi-0.53 | examples/zlib-bench.rb |
tipi-0.52 | examples/zlib-bench.rb |
tipi-0.51 | examples/zlib-bench.rb |