# frozen_string_literal: true require "thor" require "jive" require "pathname" module Jive module Cli class App < Thor def self.exit_on_failure? true end desc "cd /", "cd to ~/src/github.com//" def cd(slug) runner.run_safely do Git.new(runner).cd(slug) end end desc "clone /", "git clone to ~/src/github.com//" def clone(slug) runner.run_safely do Git.new(runner).clone(slug) end end desc "setup", "provide instructions to integrate into shell" def setup say <<~MESSAGE Include the following in your ~/.bash_profile source #{::Jive.root.join("jive.sh")} MESSAGE end private def runner @runner ||= ::Jive::Shell.new end end end end