Sha256: f1f38482c16dd337b061cb69223989710ab0d69a7a1d110c9bb1c236d142aa06
Contents?: true
Size: 973 Bytes
Versions: 248
Compression:
Stored size: 973 Bytes
Contents
# frozen_string_literal: true namespace :cache_digests do desc "Lookup nested dependencies for TEMPLATE (like messages/show or comments/_comment.html)" task nested_dependencies: :environment do abort "You must provide TEMPLATE for the task to run" unless ENV["TEMPLATE"].present? puts JSON.pretty_generate ActionView::Digestor.tree(CacheDigests.template_name, CacheDigests.finder).children.map(&:to_dep_map) end desc "Lookup first-level dependencies for TEMPLATE (like messages/show or comments/_comment.html)" task dependencies: :environment do abort "You must provide TEMPLATE for the task to run" unless ENV["TEMPLATE"].present? puts JSON.pretty_generate ActionView::Digestor.tree(CacheDigests.template_name, CacheDigests.finder).children.map(&:name) end class CacheDigests def self.template_name ENV["TEMPLATE"].split(".", 2).first end def self.finder ApplicationController.new.lookup_context end end end
Version data entries
248 entries across 235 versions & 16 rubygems