Last active
June 12, 2017 06:06
-
-
Save machty/0818c1f72cc007caaa4547868662c6e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def colorize(text, color_code) | |
"\e[#{color_code}m#{text}\e[0m" | |
end | |
def red(text); colorize(text, 31); end | |
def green(text); colorize(text, 32); end | |
# Actual example | |
#puts 'Importing categories [ ' + green('DONE') + ' ]' | |
#puts 'Importing tags [' + red('FAILED') + ']' | |
puts | |
puts "Randomized with seed 36543" | |
puts | |
10.times do | |
print green('.') | |
sleep 0.1 | |
end | |
10.times do | |
print red('F') | |
sleep 0.1 | |
end | |
10.times do | |
print red('U') | |
sleep 0.1 | |
end | |
5.times do | |
print red('C') | |
sleep 0.1 | |
end | |
2.times do | |
print red('K') | |
sleep 0.1 | |
end | |
3.times do | |
print green('.') | |
sleep 0.1 | |
end | |
6.times do | |
print red('Y') | |
sleep 0.1 | |
end | |
6.times do | |
print red('O') | |
sleep 0.1 | |
end | |
6.times do | |
print red('U') | |
sleep 0.1 | |
end | |
5.times do | |
print green('.') | |
sleep 0.1 | |
end | |
puts | |
puts | |
puts "Finished in 4.23 seconds (files took 558 minutes 36 seconds to load)" | |
puts red("64 examples, 46 failures, your parents hate you, and TDD is dead") | |
puts | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment