Sha256: 06e7688b5c19def6cf4a44be04db9a80bc0e794cef0a8da88e70e0df13d29153
Contents?: true
Size: 521 Bytes
Versions: 2
Compression:
Stored size: 521 Bytes
Contents
# manifest file module LuxAssets::Manifest MANIFEST = Pathname.new(ENV.fetch('ASSETS_MANIFEST') { './public/manifest.json' }) extend self def add name, path json = JSON.load MANIFEST.read unless json['files'][name] == path json['files'][name] = path MANIFEST.write JSON.pretty_generate(json) end !File.exist?('./public'+path) end def get name json = JSON.load MANIFEST.read json['files'][name] end ### MANIFEST.write '{"files":{}}' unless MANIFEST.exist? end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lux_assets-0.2.2 | ./lib/lux_assets/manifest.rb |
lux_assets-0.2.1 | ./lib/lux_assets/manifest.rb |