Class: RakeHelpers
- Inherits:
-
Object
- Object
- RakeHelpers
- Defined in:
- lib/rake_helpers.rb
Class Method Summary collapse
Class Method Details
.print_status(current, max) ⇒ Object
10 11 12 13 |
# File 'lib/rake_helpers.rb', line 10 def self.print_status(current, max) return if Rails.env.test? && !ENV["RAILS_ENABLE_TEST_LOG"] print "\r\033[K%9d / %d (%5.1f%%)" % [current, max, ((current.to_f / max.to_f) * 100).round(1)] end |
.print_status_with_label(label, current, max) ⇒ Object
4 5 6 7 8 |
# File 'lib/rake_helpers.rb', line 4 def self.print_status_with_label(label, current, max) return if Rails.env.test? && !ENV["RAILS_ENABLE_TEST_LOG"] print "\r\033[K%s%9d / %d (%5.1f%%)" % [label, current, max, ((current.to_f / max.to_f) * 100).round(1)] end |