Sha256: 0cf16ca36555c60b8414bff153c6f890f8c38f1f69b918fbe23b4307c9dfea7a

Contents?: true

Size: 1.83 KB

Versions: 14

Compression:

Stored size: 1.83 KB

Contents

require 'term/ansicolor'

namespace :bake do
  C = Term::ANSIColor

  desc 'Print the "ALL TESTS PASSED" message'
  task :ok do
    puts
    print [
      C.bold,
      C.red,     "*",
      C.yellow,  "*",
      C.green,   "*",
      C.blue,    "*",
      C.magenta, "*",
      C.green,   " ALL TESTS PASSED ",
      C.magenta, "*",
      C.blue,    "*",
      C.green,   "*",
      C.yellow,  "*",
      C.red,     "*",
      C.clear
    ].join
    puts
  end

  desc 'Print the "ALL TESTS PASSED" message WITH A SWEET RAINBOW!!!'
  task :ok_rainbow do
    puts
    print C.clear(    "  "),  C.clear(     "   "),  C.clear(     "    "),       C.on_red(    "                  "), C.clear(     "    "), C.clear(     "   "), C.clear(     "  "),"\n"
    print C.clear(    "  "),  C.clear(     "   "),  C.on_red(    "    "),       C.on_yellow( "                  "), C.on_red(    "    "), C.clear(     "   "), C.clear(     "  "),"\n"
    print C.clear(    "  "),  C.on_red(    "   "),  C.on_yellow( "    "),       C.on_green(  "                  "), C.on_yellow( "    "), C.on_red(    "   "), C.clear(     "  "),"\n"
    print C.on_red(   "  "),  C.on_yellow( "   "),  C.on_green(  "    "),       C.on_blue(   "                  "), C.on_green(  "    "), C.on_yellow( "   "), C.on_red(    "  "),"\n"
    print C.on_yellow("  "),  C.on_green(  "   "),  C.on_blue(   "    "),       C.on_magenta("                  "), C.on_blue(   "    "), C.on_green(  "   "), C.on_yellow( "  "),"\n"
    print C.on_green( "  "),  C.on_blue(   "   "),  C.on_magenta("    "),       C.clear(     "                  "), C.on_magenta("    "), C.on_blue(   "   "), C.on_green(  "  "),"\n"
    print C.on_blue(  "  "),  C.on_magenta("   "),  C.clear(     "    "), C.bold, C.green(   " ALL TESTS PASSED "), C.clear(     "    "), C.on_magenta("   "), C.on_blue(   "  "),"\n"
    puts C.reset
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rake-n-bake-1.3.1 tasks/ok.rake
rake-n-bake-1.3.0 tasks/ok.rake
rake-n-bake-1.2.0 tasks/ok.rake
rake-n-bake-1.1.5 tasks/ok.rake
rake-n-bake-1.1.4 tasks/ok.rake
rake-n-bake-1.1.3 tasks/ok.rake
rake-n-bake-1.1.1 tasks/ok.rake
rake-n-bake-1.1.0 tasks/ok.rake
rake-n-bake-1.0.6 tasks/ok.rake
rake-n-bake-1.0.5 tasks/ok.rake
rake-n-bake-1.0.4 tasks/ok.rake
rake-n-bake-1.0.3 tasks/ok.rake
rake-n-bake-1.0.2 tasks/ok.rake
rake-n-bake-1.0.1 tasks/ok.rake