lib/makit/directory.rb in makit-0.0.11 vs lib/makit/directory.rb in makit-0.0.12

- old
+ new

@@ -99,9 +99,15 @@ def self.get_newest_git_file(directory_path) get_git_tracked_files(directory_path).select { |f| File.file?(f) }.max_by { |f| File.mtime(f) } end + def self.get_newest_file_timestamp(directory_path) + newest_file = get_git_tracked_files(directory_path).select { |f| File.file?(f) }.max_by { |f| File.mtime(f) } + newest_file.nil? ? Time.now : File.mtime(newest_file) + end + + # Normalize the path by removing any leading or trailing slashes # and replacing any backslashes with forward slashes def self.normalize(path) path = path.gsub("\\", "/") #path = path[1..-1] if path.start_with?("/")