Sha256: a84c97fff05ecb47b6701c2f76fb07ce9a0186c053d70f56d3219d4590f54735
Contents?: true
Size: 441 Bytes
Versions: 10
Compression:
Stored size: 441 Bytes
Contents
require 'murlsh' module Murlsh # Store assets on the local filesystem in the public directory. class StoreAsset50Local < Plugin @hook = 'store_asset' def self.run(name, data, config) # break apart and rejoin to use os path separator name_parts = name.split('/') local_path = File.join('public', name_parts) Murlsh::openlock(local_path, 'w') { |fout| fout.write data } name end end end
Version data entries
10 entries across 10 versions & 1 rubygems