2014-05-22 20:33:29 -04:00
|
|
|
require 'rubygems'
|
|
|
|
|
|
|
|
|
|
desc "Default Task - Build Library"
|
|
|
|
|
task :default => [:required] do
|
|
|
|
|
Rake::Task['build'].execute
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
task :required do
|
2014-05-29 17:16:35 -04:00
|
|
|
begin
|
|
|
|
|
require 'json'
|
|
|
|
|
rescue LoadError
|
|
|
|
|
puts "JSON gem not found.\nInstall it by running 'gem install json'"
|
|
|
|
|
exit(1)
|
|
|
|
|
end
|
2014-05-22 20:33:29 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
desc "Copy Files to ProcessMaker"
|
|
|
|
|
task :build => [:required] do
|
|
|
|
|
mode = "production"
|
|
|
|
|
#argv1 = ARGV.last
|
|
|
|
|
publicDir = Dir.pwd + "/workflow/public_html"
|
|
|
|
|
|
|
|
|
|
# validate
|
|
|
|
|
unless File.exists?(publicDir)
|
|
|
|
|
puts "Seems it is not a ProcessMaker installation"
|
|
|
|
|
exit(1)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if mode == "production"
|
|
|
|
|
targetDir = publicDir + "/lib"
|
2014-05-29 12:59:20 -04:00
|
|
|
pmUIFontsDir = targetDir + "/fonts"
|
2014-05-22 20:33:29 -04:00
|
|
|
else
|
|
|
|
|
targetDir = publicDir + "/lib-dev"
|
|
|
|
|
pmUIFontsDir = pmUIDir + "/fonts"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
jsTargetDir = targetDir + "/js"
|
|
|
|
|
cssTargetDir = targetDir + "/css"
|
|
|
|
|
cssImagesTargetDir = cssTargetDir + "/images"
|
|
|
|
|
imgTargetDir = targetDir + "/img"
|
|
|
|
|
|
|
|
|
|
pmUIDir = targetDir + "/pmUI"
|
2014-05-23 15:26:01 -04:00
|
|
|
mafeDir = targetDir + "/mafe"
|
|
|
|
|
|
|
|
|
|
prepareDirs([pmUIDir, mafeDir, jsTargetDir, cssTargetDir, cssImagesTargetDir, imgTargetDir, pmUIFontsDir])
|
|
|
|
|
|
|
|
|
|
buildPmUi(Dir.pwd + "/vendor/colosa/pmUI", targetDir, mode)
|
|
|
|
|
buildMafe(Dir.pwd + "/vendor/colosa/MichelangeloFE", targetDir, mode)
|
|
|
|
|
|
2014-05-29 17:16:35 -04:00
|
|
|
pmuiHash = getHash(Dir.pwd + "/vendor/colosa/pmUI")
|
|
|
|
|
mafeHash = getHash(Dir.pwd + "/vendor/colosa/MichelangeloFE")
|
2014-05-23 15:26:01 -04:00
|
|
|
|
2014-05-29 17:16:35 -04:00
|
|
|
hashVendors = pmuiHash+"-"+mafeHash
|
2014-05-23 15:26:01 -04:00
|
|
|
## Building minified JS Files
|
|
|
|
|
puts "Building file: " + "/js/mafe-#{hashVendors}.js".cyan
|
|
|
|
|
mafeCompresedFile = targetDir + "/js/mafe-#{hashVendors}.js"
|
|
|
|
|
mafeCompresedContent = ""
|
|
|
|
|
|
|
|
|
|
getJsIncludeFiles().each do |filename|
|
|
|
|
|
mafeCompresedContent += File.read filename
|
|
|
|
|
mafeCompresedContent += "\n"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
File.open(mafeCompresedFile, 'w+') do |writeFile|
|
|
|
|
|
writeFile.write mafeCompresedContent
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
#Building minified CSS Files
|
|
|
|
|
puts "Building file: " + "/css/mafe-#{hashVendors}.css".cyan
|
|
|
|
|
mafeCompresedFile = targetDir + "/css/mafe-#{hashVendors}.css"
|
|
|
|
|
mafeCompresedContent = ""
|
2014-05-22 20:33:29 -04:00
|
|
|
|
2014-05-23 15:26:01 -04:00
|
|
|
getCssIncludeFiles().each do |filename|
|
|
|
|
|
mafeCompresedContent += File.read filename
|
|
|
|
|
mafeCompresedContent += "\n"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
File.open(mafeCompresedFile, 'w+') do |writeFile|
|
|
|
|
|
writeFile.write mafeCompresedContent
|
|
|
|
|
end
|
2014-05-22 20:33:29 -04:00
|
|
|
|
2014-05-23 15:26:01 -04:00
|
|
|
# Create buildhash file
|
2014-05-29 17:16:35 -04:00
|
|
|
puts "create file: " + "/buildhash".cyan
|
2014-05-23 15:26:01 -04:00
|
|
|
File.open(targetDir+"/buildhash", 'w+') do |writeFile|
|
|
|
|
|
writeFile.write hashVendors
|
|
|
|
|
end
|
2014-05-22 20:33:29 -04:00
|
|
|
|
2014-05-29 17:16:35 -04:00
|
|
|
puts "create file: " + "/versions".cyan
|
|
|
|
|
versions = {
|
|
|
|
|
:pmui_ver => getVersion(Dir.pwd + "/vendor/colosa/pmUI"),
|
|
|
|
|
:pmui_hash => pmuiHash,
|
|
|
|
|
:mafe_ver => getVersion(Dir.pwd + "/vendor/colosa/MichelangeloFE"),
|
|
|
|
|
:mafe_hash => mafeHash
|
|
|
|
|
}
|
|
|
|
|
File.open(targetDir+"/versions", 'w+') do |writeFile|
|
|
|
|
|
writeFile.write versions.to_json
|
|
|
|
|
end
|
|
|
|
|
|
2014-05-23 15:26:01 -04:00
|
|
|
puts "-- DONE --\n".bold
|
2014-05-22 20:33:29 -04:00
|
|
|
#task argv1.to_sym do ; end
|
|
|
|
|
end
|
|
|
|
|
|
2014-05-23 15:26:01 -04:00
|
|
|
def buildPmUi(homeDir, targetDir, mode)
|
|
|
|
|
puts "\nBuilding PMUI library".green.bold
|
2014-05-22 20:33:29 -04:00
|
|
|
|
|
|
|
|
# Defining target directories
|
|
|
|
|
pmUIDir = targetDir + "/pmUI"
|
|
|
|
|
pmUIFontsDir = targetDir + "/fonts"
|
|
|
|
|
jsTargetDir = targetDir + "/js"
|
|
|
|
|
cssTargetDir = targetDir + "/css"
|
|
|
|
|
imgTargetDir = targetDir + "/img"
|
|
|
|
|
version = getVersion(homeDir)
|
|
|
|
|
|
|
|
|
|
puts "Generating Theme files"
|
|
|
|
|
executeInto(homeDir, ["compileTheme[mafe]", "js"])
|
|
|
|
|
|
2014-05-23 15:26:01 -04:00
|
|
|
puts "\nCopying lib files into: #{pmUIDir}".bold
|
2014-05-22 20:33:29 -04:00
|
|
|
|
2014-05-23 15:26:01 -04:00
|
|
|
copyFiles({
|
|
|
|
|
"#{homeDir}/build/js/pmui-#{version}.js" => "#{pmUIDir}/pmui.min.js",
|
|
|
|
|
"#{homeDir}/themes/mafe/build/pmui-mafe.css" => "#{pmUIDir}/pmui.min.css",
|
|
|
|
|
"#{homeDir}/themes/mafe/build/images/*.png" => "#{targetDir}/css/images/",
|
|
|
|
|
"#{homeDir}/img/*" => "#{imgTargetDir}"
|
|
|
|
|
})
|
2014-05-22 20:33:29 -04:00
|
|
|
|
2014-05-23 15:26:01 -04:00
|
|
|
puts "\nCopying lib files into: #{jsTargetDir}".bold
|
|
|
|
|
copyFiles({homeDir + "/libraries/restclient/restclient-min.js" => "#{jsTargetDir}/restclient.min.js"})
|
2014-05-22 20:33:29 -04:00
|
|
|
|
2014-05-23 15:26:01 -04:00
|
|
|
puts "\nCopying font files into: #{pmUIFontsDir}".bold
|
|
|
|
|
theme = "mafe"
|
2014-05-29 12:59:20 -04:00
|
|
|
copyFiles({"#{homeDir}/themes/#{theme}/fonts/*" => "#{pmUIFontsDir}"})
|
2014-05-22 20:33:29 -04:00
|
|
|
|
2014-05-23 15:26:01 -04:00
|
|
|
puts "\nPMUI Build Finished".magenta
|
|
|
|
|
end
|
2014-05-22 20:33:29 -04:00
|
|
|
|
2014-05-23 15:26:01 -04:00
|
|
|
def buildMafe(homeDir, targetDir, mode)
|
|
|
|
|
puts "\nBuilding PM Michelangelo FE".green.bold
|
2014-05-22 20:33:29 -04:00
|
|
|
|
2014-05-23 15:26:01 -04:00
|
|
|
###
|
|
|
|
|
# Defining target directories
|
|
|
|
|
mafeDir = targetDir + "/mafe"
|
|
|
|
|
jsTargetDir = targetDir + "/js"
|
|
|
|
|
cssTargetDir = targetDir + "/css"
|
|
|
|
|
imgTargetDir = targetDir + "/img"
|
|
|
|
|
##
|
2014-05-22 20:33:29 -04:00
|
|
|
|
2014-05-26 11:06:19 -04:00
|
|
|
executeInto(homeDir, ["rmdir", "dir", "compass", "compress_js_files", "compress_app_files"])
|
|
|
|
|
#executeInto(homeDir, ["dir", "mafe"])
|
2014-05-23 15:26:01 -04:00
|
|
|
|
|
|
|
|
puts "\nCopying files into: #{mafeDir}".bold
|
|
|
|
|
copyFiles({
|
|
|
|
|
"#{homeDir}/build/js/designer.js" => "#{mafeDir}/designer.min.js",
|
|
|
|
|
"#{homeDir}/build/js/mafe.js" => "#{mafeDir}/mafe.min.js",
|
|
|
|
|
"#{homeDir}/build/css/mafe.css" => "#{mafeDir}/mafe.min.css",
|
|
|
|
|
"#{homeDir}/img/*.*" => "#{imgTargetDir}"
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
puts "\nCopying lib files into: #{jsTargetDir}".bold
|
|
|
|
|
copyFiles({
|
|
|
|
|
"#{homeDir}/lib/wz_jsgraphics/wz_jsgraphics.js" => "#{jsTargetDir}/wz_jsgraphics.js",
|
|
|
|
|
"#{homeDir}/lib/jQuery/jquery-1.10.2.min.js" => "#{jsTargetDir}/jquery-1.10.2.min.js",
|
|
|
|
|
"#{homeDir}/lib/underscore/underscore-min.js" => "#{jsTargetDir}/underscore-min.js",
|
|
|
|
|
"#{homeDir}/lib/jQueryUI/jquery-ui-1.10.3.custom.min.js" => "#{jsTargetDir}/jquery-ui-1.10.3.custom.min.js",
|
|
|
|
|
"#{homeDir}/lib/jQueryLayout/jquery.layout.min.js" => "#{jsTargetDir}/jquery.layout.min.js",
|
|
|
|
|
"#{homeDir}/lib/modernizr/modernizr.js" => "#{jsTargetDir}/modernizr.js"
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
puts "\nMichelangelo FE Build Finished\n".magenta
|
2014-05-22 20:33:29 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def prepareDirs(dirs)
|
|
|
|
|
homeDir = Dir.pwd
|
|
|
|
|
|
|
|
|
|
puts "Preparing Directories..."
|
|
|
|
|
|
|
|
|
|
dirs.each do |dir|
|
|
|
|
|
if File.directory?(dir)
|
|
|
|
|
puts "Removing #{dir}"
|
|
|
|
|
system "rm -rf #{dir}"
|
|
|
|
|
end
|
2014-05-23 15:26:01 -04:00
|
|
|
#Dir.mkdir(dir)
|
|
|
|
|
system("mkdir -p #{dir}")
|
2014-05-22 20:33:29 -04:00
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getVersion(path)
|
2014-05-29 12:59:20 -04:00
|
|
|
version = ""
|
|
|
|
|
Dir.chdir(path) do
|
|
|
|
|
version = `rake version`
|
2014-05-22 20:33:29 -04:00
|
|
|
end
|
|
|
|
|
|
2014-06-02 13:31:44 -04:00
|
|
|
return /([0-9\.]{5}+)/.match(version)
|
2014-05-22 20:33:29 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
2014-05-23 15:26:01 -04:00
|
|
|
def getHash(path)
|
2014-05-29 12:59:20 -04:00
|
|
|
hash = ""
|
|
|
|
|
Dir.chdir(path) do
|
|
|
|
|
hash = `git rev-parse --short HEAD`
|
|
|
|
|
end
|
|
|
|
|
|
2014-05-23 15:26:01 -04:00
|
|
|
return hash.strip
|
|
|
|
|
end
|
|
|
|
|
|
2014-05-22 20:33:29 -04:00
|
|
|
def executeInto(path, tasks)
|
|
|
|
|
Dir.chdir(path) do
|
|
|
|
|
tasks.each do |task|
|
|
|
|
|
system "rake #{task}"
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
2014-05-23 15:26:01 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def copyFiles(files)
|
|
|
|
|
files.each do |from, to|
|
|
|
|
|
print " Copy ".green + from.gsub(Dir.pwd+'/vendor/colosa/', '')+' -> '.brown+to.gsub(Dir.pwd, '').gray
|
|
|
|
|
system('cp -Rf '+from+' '+to+' 2>&1')
|
|
|
|
|
|
|
|
|
|
if $? == 0
|
|
|
|
|
puts " (ok)".green
|
|
|
|
|
else
|
|
|
|
|
puts " (failed)".red
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def getJsIncludeFiles
|
|
|
|
|
includeFiles = [
|
|
|
|
|
"workflow/public_html/lib/js/wz_jsgraphics.js",
|
|
|
|
|
"workflow/public_html/lib/js/jquery-1.10.2.min.js",
|
|
|
|
|
"workflow/public_html/lib/js/underscore-min.js",
|
|
|
|
|
"workflow/public_html/lib/js/jquery-ui-1.10.3.custom.min.js",
|
|
|
|
|
"workflow/public_html/lib/js/jquery.layout.min.js",
|
|
|
|
|
"workflow/public_html/lib/js/modernizr.js",
|
|
|
|
|
"workflow/public_html/lib/js/restclient.min.js",
|
|
|
|
|
"workflow/public_html/lib/pmUI/pmui.min.js",
|
|
|
|
|
"workflow/public_html/lib/mafe/mafe.min.js",
|
|
|
|
|
"workflow/public_html/lib/mafe/designer.min.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/tiny_mce.js",
|
|
|
|
|
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmGrids/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmSimpleUploader/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/pmVariablePicker/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/visualchars/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/wordcount/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/visualblocks/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/template/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/visualblocks/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/save/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/tabfocus/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/media/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/lists/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/insertdatetime/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/example/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/example_dependency/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/layer/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/legacyoutput/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/iespell/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/autoresize/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/contextmenu/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/advlist/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/autolink/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/directionality/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/emotions/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/themes/advanced/editor_template.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin.js",
|
|
|
|
|
"gulliver/js/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin.js",
|
|
|
|
|
|
|
|
|
|
"gulliver/js/codemirror/lib/codemirror.js",
|
|
|
|
|
"gulliver/js/codemirror/mode/javascript/javascript.js",
|
|
|
|
|
"gulliver/js/codemirror/addon/edit/matchbrackets.js",
|
|
|
|
|
"gulliver/js/codemirror/mode/htmlmixed/htmlmixed.js",
|
|
|
|
|
"gulliver/js/codemirror/mode/xml/xml.js",
|
|
|
|
|
"gulliver/js/codemirror/mode/css/css.js",
|
|
|
|
|
"gulliver/js/codemirror/mode/clike/clike.js",
|
|
|
|
|
"gulliver/js/codemirror/mode/php/php.js",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
return includeFiles
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def getCssIncludeFiles
|
|
|
|
|
return [
|
|
|
|
|
"gulliver/js/codemirror/lib/codemirror.css",
|
2014-05-28 16:05:41 -04:00
|
|
|
# DEPRECATED
|
|
|
|
|
# "gulliver/js/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui.css",
|
|
|
|
|
# "gulliver/js/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css",
|
|
|
|
|
# "gulliver/js/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css",
|
|
|
|
|
# "gulliver/js/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/content.css",
|
|
|
|
|
#
|
2014-05-23 15:26:01 -04:00
|
|
|
"workflow/public_html/lib/pmUI/pmui.min.css",
|
|
|
|
|
"workflow/public_html/lib/mafe/mafe.min.css"
|
|
|
|
|
]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
class String
|
|
|
|
|
def black; "\033[30m#{self}\033[0m" end
|
|
|
|
|
def red; "\033[31m#{self}\033[0m" end
|
|
|
|
|
def green; "\033[32m#{self}\033[0m" end
|
|
|
|
|
def brown; "\033[33m#{self}\033[0m" end
|
|
|
|
|
def blue; "\033[34m#{self}\033[0m" end
|
|
|
|
|
def magenta; "\033[35m#{self}\033[0m" end
|
|
|
|
|
def cyan; "\033[36m#{self}\033[0m" end
|
|
|
|
|
def gray; "\033[37m#{self}\033[0m" end
|
|
|
|
|
def bg_black; "\033[40m#{self}\0330m" end
|
|
|
|
|
def bg_red; "\033[41m#{self}\033[0m" end
|
|
|
|
|
def bg_green; "\033[42m#{self}\033[0m" end
|
|
|
|
|
def bg_brown; "\033[43m#{self}\033[0m" end
|
|
|
|
|
def bg_blue; "\033[44m#{self}\033[0m" end
|
|
|
|
|
def bg_magenta; "\033[45m#{self}\033[0m" end
|
|
|
|
|
def bg_cyan; "\033[46m#{self}\033[0m" end
|
|
|
|
|
def bg_gray; "\033[47m#{self}\033[0m" end
|
|
|
|
|
def bold; "\033[1m#{self}\033[22m" end
|
|
|
|
|
def reverse_color; "\033[7m#{self}\033[27m" end
|
|
|
|
|
end
|
2014-05-29 12:59:20 -04:00
|
|
|
|