Top Level Namespace
Defined Under Namespace
Modules: Jeka
Constant Summary collapse
- ROOT_PATH =
File.(File.dirname(__FILE__))
Instance Method Summary collapse
Instance Method Details
#build(files) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'bin/jeka', line 7 def build(files) Dir.glob(files).each do |d| require File.join(File.join(Dir.getwd, d)) end error = false Jeka::Algorithm.build_all do |p, t, o| case t when :step p = p.to_s while p.length < 3 p = " " + p end puts "[#{p}%] #{o}" when :output o = o.join if o.length > 0 puts o end when :error o = o.join if o.length > 0 puts o end error = true when :done if error puts "[100%] Some error occurs..." else puts "[100%] Done!" end end end end |
#help ⇒ Object
72 73 74 |
# File 'bin/jeka', line 72 def help puts "usage: jeka [build|run] [regexp|file|dir]" end |
#run(files) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'bin/jeka', line 42 def run(files) Dir.glob(files).each do |d| require File.join(File.join(Dir.getwd, d)) end error = false Jeka::Algorithm.run_all do |p, t, o| case t when :step p = p.to_s while p.length < 3 p = " " + p end puts "[#{p}%] #{o}" when :error o = o.join if o.length > 0 puts o end error = true when :done if error puts "[100%] Some error occurs..." else puts "[100%] Done!" end end end end |