class SingularityClient::CLI

Handles all command line interface logic

Attributes

config_hash[R]

Public Class Methods

new(*args) click to toggle source
Calls superclass method
# File lib/singularity_client/cli.rb, line 11
def initialize(*args)
  super
  @cli_options = options
end

Public Instance Methods

add(repo, project) click to toggle source
# File lib/singularity_client/cli.rb, line 35
def add(repo, project)
  run(:add, repo, project, 'proposal')
  run(:add, repo, project, 'change')
end
add_pull(repo, project) click to toggle source
# File lib/singularity_client/cli.rb, line 43
def add_pull(repo, project)
  run(:add, repo, project, 'proposal')
end
add_push(repo, project) click to toggle source
# File lib/singularity_client/cli.rb, line 50
def add_push(repo, project)
  run(:add, repo, project, 'change')
end
remove_repo(repo) click to toggle source
# File lib/singularity_client/cli.rb, line 57
def remove_repo(repo)
  run(:remove, repo)
end

Private Instance Methods

run(action, *args) click to toggle source

desc ‘comment REPO_NAME PR_NUM COMMENT’, ‘Write comment to a pull request’ method_option :github_organization, aliases: ‘-o’, type: :string,

desc: 'Override the default github organization'

def comment(repo, pr, comment)

run(:comment, repo, pr, comment)

end

# File lib/singularity_client/cli.rb, line 70
def run(action, *args)
  config = SingularityClient::Config.new(@cli_options)
  SingularityClient::API.send(action, config, *args)
end