From 7e583e5f588e5f1ab4939f999926e056731d2cff Mon Sep 17 00:00:00 2001 From: Scott Davis Date: Thu, 9 Jun 2011 15:43:38 -0400 Subject: [PATCH] readded mtime to importer class --- lib/compass/sprite_importer.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/compass/sprite_importer.rb b/lib/compass/sprite_importer.rb index 1b02ccba..084dbc1e 100644 --- a/lib/compass/sprite_importer.rb +++ b/lib/compass/sprite_importer.rb @@ -43,7 +43,12 @@ module Compass other.class == self.class end - + def mtime(uri, options) + @uri, @options = uri, options + files.sort.inject(Time.at(0)) do |max_time, file| + (t = File.mtime(file)) > max_time ? t : max_time + end + end def key(uri, options={}) @uri, @options = uri, options