Module: Jive

Defined in:
lib/jive.rb,
lib/jive/cli.rb,
lib/jive/git.rb,
lib/jive/repo.rb,
lib/jive/issue.rb,
lib/jive/popen.rb,
lib/jive/shell.rb,
lib/jive/docker.rb,
lib/jive/runner.rb,
lib/jive/project.rb,
lib/jive/version.rb,
lib/jive/batch_runner.rb,
lib/jive/pull_request.rb

Defined Under Namespace

Modules: Cli, Popen Classes: BatchRunner, Docker, Error, Git, Issue, Project, PullRequest, Repo, Runner, Shell

Constant Summary collapse

VERSION =
"0.7.0"

Class Method Summary collapse

Class Method Details

.homeObject



35
36
37
# File 'lib/jive.rb', line 35

def self.home
  @home ||= Pathname(Dir.home).join(".jive")
end

.prompt?(items, display: ->(x) { x }) ⇒ Boolean

Returns:

  • (Boolean)


39
40
41
42
43
44
45
46
47
# File 'lib/jive.rb', line 39

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

.rootObject



23
24
25
# File 'lib/jive.rb', line 23

def self.root
  @root ||= Pathname.new(__FILE__).parent.parent
end

.run(tasks) ⇒ Object



27
28
29
# File 'lib/jive.rb', line 27

def self.run(tasks)
  Jive::BatchRunner.new.run(tasks)
end

.shellObject



31
32
33
# File 'lib/jive.rb', line 31

def self.shell
  @shell ||= ::Jive::Shell.new
end