Class: Give::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/give.rb

Overview

Give::CLI

Command line interface provides the 4 commands, setup, start, update and finish

Instance Method Summary collapse

Instance Method Details

#finish(owner, project, branch) ⇒ Object



38
39
40
41
42
# File 'lib/give.rb', line 38

def finish(owner, project, branch)
  local_repo = Give::Repo.new(:branch => branch)
  local_repo.push
  Give::Project.new(owner, project).send_pull_request(local_repo)
end

#setup(owner, project) ⇒ Object



22
23
24
# File 'lib/give.rb', line 22

def setup(owner, project)
  Give::Project.new(owner, project).fork
end

#start(branch) ⇒ Object



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

def start(branch)
  Give::Repo.new(:branch => branch).checkout_branch
end

#update(branch, upstream_branch = :master) ⇒ Object



32
33
34
35
# File 'lib/give.rb', line 32

def update(branch,upstream_branch=:master)
  Give::Repo.new(:branch => branch,
                 :upstream_branch => upstream_branch).update
end