require "guard_helpers/base_helper" require 'rrjj/cmds' module ::GuardHelpers module RrjjHelper include ::GuardHelpers::BaseHelper def start super if defined? super cmds_all = ::Rrjj::Cmds.all.dup cmds = ::Pry::CommandSet.new do cmds_all.each do |cmd| block_command cmd.shortcut, cmd.cmd do |*args| ::Kernel.system "#{cmd.cmd} #{args.join(" ")}" end end end ::Pry::Commands.import cmds end def run_on_modifications(paths) super if defined? super handle_each_path(%r{^lib/(.+)\.rb}) do |path| install end end module ClassMethods def install bx 'rake install' end def zro(bash) system "zeus ro #{bash}" end def write2rrjjsh load 'rrjj/cmds.rb' zro "rails_bashs write2rrjjsh" end end end end