lib/ufo/utils/pretty.rb in ufo-6.0.2 vs lib/ufo/utils/pretty.rb in ufo-6.0.3
- old
+ new
@@ -2,9 +2,14 @@
module Pretty
def pretty_path(path)
path.sub("#{Ufo.root}/",'').sub(/^\.\//,'')
end
+ # Replace HOME with ~ - different from the main pretty_path
+ def pretty_home(path)
+ path.sub(ENV['HOME'], '~')
+ end
+
# http://stackoverflow.com/questions/4175733/convert-duration-to-hoursminutesseconds-or-similar-in-rails-3-or-ruby
def pretty_time(total_seconds)
minutes = (total_seconds / 60) % 60
seconds = total_seconds % 60
if total_seconds < 60