class Jive::Cli::App
Public Class Methods
exit_on_failure?()
click to toggle source
# File lib/jive/cli.rb, line 15 def self.exit_on_failure? true end
handle_no_command_error(name)
click to toggle source
# File lib/jive/cli.rb, line 19 def self.handle_no_command_error(name) ::Jive::Cli::App.start(["exec", name]) end
Public Instance Methods
bootstrap()
click to toggle source
# File lib/jive/cli.rb, line 88 def bootstrap Project .new(Pathname.pwd) .bootstrap(Jive.shell) end
build()
click to toggle source
# File lib/jive/cli.rb, line 26 def build Docker.new.build(Pathname.pwd) end
cd(slug)
click to toggle source
# File lib/jive/cli.rb, line 73 def cd(slug) Jive.shell.run_safely { Git.new(Jive.shell).cd(slug) } end
clone(slug)
click to toggle source
# File lib/jive/cli.rb, line 50 def clone(slug) host = options[:host] Jive.shell.run_safely { Git.new(Jive.shell).clone(slug, host: host) } end
create(type = Issue.what_type?)
click to toggle source
# File lib/jive/cli.rb, line 66 def create(type = Issue.what_type?) issue = Issue.create!(name: ask("Name:"), type: type) issue.edit end
exec(command)
click to toggle source
# File lib/jive/cli.rb, line 78 def exec(command) path = Pathname.pwd.join("jive.yml") return shell.error("Error: jive.yml not found") unless path.exist? Jive.shell.run_safely do Jive.shell.execute(YAML.safe_load(path.read).dig("commands", command)) end end
launch()
click to toggle source
# File lib/jive/cli.rb, line 31 def launch Docker.new.launch(Pathname.pwd) end
list(type = Issue.what_type?)
click to toggle source
# File lib/jive/cli.rb, line 59 def list(type = Issue.what_type?) issues = Issue.for(type) issue = Jive.prompt?(issues, display: ->(x) { x.file_name }) issue.edit end
pr()
click to toggle source
# File lib/jive/cli.rb, line 95 def pr pr = PullRequest.new(repo: Repo.current) pr.edit(ENV["EDITOR"]) end
semantic()
click to toggle source
# File lib/jive/cli.rb, line 44 def semantic say Git.new.semantic_help end
setup()
click to toggle source
# File lib/jive/cli.rb, line 101 def setup print "source #{::Jive.root.join("jive.sh")}" end
size()
click to toggle source
# File lib/jive/cli.rb, line 36 def size Docker.new.size(Pathname.pwd) end