Class: Worktree::CLI
- Inherits:
-
Thor
- Object
- Thor
- Worktree::CLI
- Defined in:
- lib/worktree/cli.rb
Overview
:nodoc:
Class Method Summary collapse
Instance Method Summary collapse
- #check_stale ⇒ Object
- #cherry_pick(commit) ⇒ Object
- #configure ⇒ Object
- #init(uri) ⇒ Object
- #new(branch) ⇒ Object
- #open(branch) ⇒ Object
- #remove(branch) ⇒ Object
- #remove_stale ⇒ Object
Class Method Details
.exit_on_failure? ⇒ Boolean
8 9 10 |
# File 'lib/worktree/cli.rb', line 8 def self.exit_on_failure? true end |
Instance Method Details
#check_stale ⇒ Object
51 52 53 |
# File 'lib/worktree/cli.rb', line 51 def check_stale Worktree::Command::CheckStale.new(project_dir: [:project_dir]).do! end |
#cherry_pick(commit) ⇒ Object
66 67 68 69 70 71 72 |
# File 'lib/worktree/cli.rb', line 66 def cherry_pick(commit) Worktree::Command::CherryPick.new(commit, to: [:to], project_dir: [:project_dir], clone_db: [:clone_db], launcher_vars: [:launcher_vars]).do! end |
#configure ⇒ Object
75 76 77 |
# File 'lib/worktree/cli.rb', line 75 def configure Worktree::Command::Configure.new.do! end |
#init(uri) ⇒ Object
83 84 85 86 87 88 |
# File 'lib/worktree/cli.rb', line 83 def init(uri) Worktree::Command::Init.new(uri, path: [:path], name: [:name], remote: [:remote]).do! end |
#new(branch) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/worktree/cli.rb', line 18 def new(branch) Worktree::Command::Add.new(branch, from: [:from], project_dir: [:project_dir], clone_db: [:clone_db], fetch_remote: [:fetch_remote], launcher_vars: [:launcher_vars]).do! end |
#open(branch) ⇒ Object
30 31 32 33 34 |
# File 'lib/worktree/cli.rb', line 30 def open(branch) Worktree::Command::Open.new(branch, project_dir: [:project_dir], launcher_vars: [:launcher_vars]).do! end |
#remove(branch) ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/worktree/cli.rb', line 41 def remove(branch) Worktree::Command::Remove.new(branch, project_dir: [:project_dir], drop_db: [:drop_db], drop_remote_branch: [:drop_remote_branch], check_merged: [:check_merged]).do! end |
#remove_stale ⇒ Object
57 58 59 |
# File 'lib/worktree/cli.rb', line 57 def remove_stale Worktree::Command::RemoveStale.new(project_dir: [:project_dir]).do! end |