module TiyoHw
function hw() {
URL=$1 OUTPUT="$(~/code/tiyo-hw/bin/hw setup $URL)" eval ${OUTPUT} OUTPUT="$(~/code/tiyo-hw/bin/hw run $PWD)" eval ${OUTPUT}
}
Constants
Public Class Methods
fail_msg(msg)
click to toggle source
# File lib/tiyo_hw.rb, line 24 def self.fail_msg(msg) "echo '#{msg}'" end
generate_cmd(command, url_or_path = nil)
click to toggle source
# File lib/tiyo_hw.rb, line 12 def self.generate_cmd(command, url_or_path = nil) return ShellFunction.cmd if command == "init" return fail_msg("Please enter a valid URL: #{url_or_path.inspect} is not a valid url ") if url_or_path.to_s.blank? case command when "setup" Setup.new(url_or_path).cmd when "run" Run.new(url_or_path).cmd end end