require "hitcher/version" require_relative 'hitcher/dsl' require_relative 'hitcher/run_ops' module Hitcher class Error < StandardError; end # Your code goes here... CONF_PATH = File.join(Dir.home,".hitcher","hitcher_conf.yml") class Cli include Hitcher::Dsl include Hitcher::CliOps::RunOps # DSL start here! def parse(spec) if File.exist?(spec) File.open(spec,"r") do |f| @cont = f.read end begin @inst = start(@cont.strip.lines) @inst rescue Exception => ex Hitcher::Global.instance.glog.error ex.message Hitcher::Global.instance.glog.error ex.backtrace.join("\n") raise ex end #logger.debug "instance_eval after parse" else raise Error, "Given spec file '#{spec}' does not exist" end end # parse end end