lib/dassets.rb in dassets-0.6.2 vs lib/dassets.rb in dassets-0.7.0

- old
+ new

@@ -30,17 +30,10 @@ def self.source_list SourceList.new(self.config.sources) end - # Cmds - - def self.digest_source_files(paths=nil) - require 'dassets/digest_cmd' - DigestCmd.new(paths).run - end - class Config include NsOptions::Proxy option :assets_file, Pathname, :default => ENV['DASSETS_ASSETS_FILE'] option :file_store, FileStore, :default => proc{ NullFileStore.new } @@ -49,19 +42,25 @@ attr_accessor :cache def initialize super @sources = [] - @combinations = Hash.new{ |h,k| [k] } # digest pass-thru if none defined + @combinations = Hash.new{ |h, k| [k] } # digest pass-thru if none defined @cache = DefaultCache.new end def source(path, &block) @sources << Source.new(path).tap{ |s| block.call(s) if block } end def combination(key_digest_path, value_digest_paths) @combinations[key_digest_path.to_s] = [*value_digest_paths] + end + + def combination?(key_digest_path) + # a digest path is only considered a combination is it is not the default + # pass-thru above + @combinations[key_digest_path.to_s] != [key_digest_path] end end module SourceList def self.new(sources)