Class: Jive::Cli::App
- Inherits:
-
Thor
- Object
- Thor
- Jive::Cli::App
- Defined in:
- lib/jive/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
15 16 17 |
# File 'lib/jive/cli.rb', line 15 def self.exit_on_failure? true end |
Instance Method Details
#bootstrap ⇒ Object
88 89 90 91 92 |
# File 'lib/jive/cli.rb', line 88 def bootstrap Project .new(Pathname.pwd) .bootstrap(Jive.shell) end |
#cd(slug) ⇒ Object
73 74 75 |
# File 'lib/jive/cli.rb', line 73 def cd(slug) Jive.shell.run_safely { Git.new(Jive.shell).cd(slug) } end |
#exec(command) ⇒ Object
78 79 80 81 82 83 84 85 |
# 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 |
#pr ⇒ Object
95 96 97 98 |
# File 'lib/jive/cli.rb', line 95 def pr pr = PullRequest.new(repo: Repo.current) pr.edit(ENV["EDITOR"]) end |