lib/makit/directory.rb in makit-0.0.12 vs lib/makit/directory.rb in makit-0.0.13
- old
+ new
@@ -99,9 +99,13 @@
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_git_file_timestamp(directory_path)
+ get_newest_git_file(directory_path).nil? ? Time.now : File.mtime(get_newest_git_file(directory_path))
+ 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