lib/makit/show.rb in makit-0.0.38 vs lib/makit/show.rb in makit-0.0.39
- old
+ new
@@ -32,19 +32,21 @@
def file(path)
if File.file?(path)
modified = File.mtime(path)
age = (Time.now - modified).to_f
- puts "#{file_symbol} #{path} ".colorize(:grey) + "#{Makit::Humanize.get_humanized_size(File.size(path))} ".colorize(:cyan) + "#{Makit::Humanize.get_humanized_duration(age)}".colorize(:cyan)
+ humanized_size = Makit::Humanize.get_humanized_size(File.size(path))
+ puts "#{file_symbol} ".colorize(:grey) + "#{humanized_size.rjust(10)} ".colorize(:cyan) +" #{path} ".colorize(:grey)
else
puts "#{path} does not exist"
end
end
def file_symbol
#📄 (U+1F4C4) – "Page with Curl"
- "\u{1F4C4}"
+ #"\u{1F4C4}"
+ "@"
end
def directory_symbol
# 📁 (U+1F4C1) – "File Folder"
"\u{1F4C1}"
@@ -67,9 +69,17 @@
def task(task)
puts ("=" * 80).colorize(:grey)
puts " ".colorize(:grey) + "#{task}".colorize(:green)
#puts ("=" * 100).colorize(:grey)
+ end
+
+ def info(text)
+ puts " ".colorize(:grey) + "#{text}".colorize(:cyan)
+ end
+
+ def success(text)
+ puts " ".colorize(:grey) + "#{text}".colorize(:green)
end
end
end
#Code42-#{VERSION}-win10-x64 ".colorize(:grey) + "#{Makit::Humanize.get_humanized_size(Makit::Directory.get_size("artifacts/Code42-0.0.0-win10-x64"))}".colorize(:cyan)