# frozen_string_literal: true require "fileutils" require "open3" require "rugged" require "uri" require "jive/batch_runner" require "jive/docker" require "jive/git" require "jive/issue" require "jive/popen" require "jive/project" require "jive/pull_request" require "jive/repo" require "jive/runner" require "jive/shell" require "jive/version" module Jive class Error < StandardError; end def self.root @root ||= Pathname.new(__FILE__).parent.parent end def self.run(tasks) Jive::BatchRunner.new.run(tasks) end def self.shell @shell ||= ::Jive::Shell.new end def self.home @home ||= Pathname(Dir.home).join(".jive") end def self.prompt?(items, display: ->(x) { x }) CLI::UI::Prompt.ask("Choose?") do |handler| items.each do |item| handler.option(display.call(item)) do |_selection| return item end end end end end