# File lib/sprockets/asset.rb, line 229
      def dependency_fresh?(environment, dep)
        path, mtime, hexdigest = dep.pathname.to_s, dep.mtime, dep.digest

        stat = environment.stat(path)

        # If path no longer exists, its definitely stale.
        if stat.nil?
          return false
        end

        # Compare dependency mtime to the actual mtime. If the
        # dependency mtime is newer than the actual mtime, the file
        # hasn't changed since we created this `Asset` instance.
        #
        # However, if the mtime is newer it doesn't mean the asset is
        # stale. Many deployment environments may recopy or recheckout
        # assets on each deploy. In this case the mtime would be the
        # time of deploy rather than modified time.
        #
        # Note: to_i is used in eql? and write_to we assume fidelity of 1 second
        #  if people save files more frequently than 1 second sprockets may
        #  not pick it up, by design
        if mtime.to_i >= stat.mtime.to_i
          return true
        end

        digest = environment.file_digest(path)

        # If the mtime is newer, do a full digest comparsion. Return
        # fresh if the digests match.
        if hexdigest == digest.hexdigest
          return true
        end

        # Otherwise, its stale.
        false
      end