lib/hanami/assets/precompiler.rb in hanami-assets-0.3.0 vs lib/hanami/assets/precompiler.rb in hanami-assets-0.4.0
- old
+ new
@@ -45,10 +45,10 @@
end
# @since 0.3.0
# @api private
def clear_manifest(manifest)
- JSON.load(manifest).each do |_, asset_hash|
+ JSON.parse(manifest).each do |_, asset_hash|
asset_file_name = @configuration.public_directory.join(asset_hash['target'])
asset_file_name.unlink if asset_file_name.exist?
end
rescue JSON::ParserError
$stderr.puts 'Non JSON manifest found and unlinked.'