class TeachersPet::Cli
Public Class Methods
common_options()
click to toggle source
TODO figure out a way to display options as groups
# File lib/teachers_pet/cli.rb, line 7 def self.common_options check_unknown_options! option :username, default: ENV['USER'] option :password option :token, default: ENV['TEACHERS_PET_GITHUB_TOKEN'], desc: "Provide a token instead of a username+password to authenticate via OAuth. See https://github.com/education/teachers_pet#authentication." option :api, banner: 'ORIGIN', default: Configuration.apiEndpoint, desc: "The API endpoint of your GitHub Enterprise instance, if you have one." option :web, banner: 'ORIGIN', default: Configuration.webEndpoint, desc: "The URL of your GitHub Enterprise instance, if you have one." end
students_option()
click to toggle source
# File lib/teachers_pet/cli.rb, line 18 def self.students_option option :students, default: TeachersPet::Configuration.studentsFile, banner: 'PATH', desc: "The path to the file containing the list of students" end
Public Instance Methods
add_collaborators()
click to toggle source
# File lib/teachers_pet/commands/add_collaborators.rb, line 9 def add_collaborators TeachersPet::Actions::AddCollaborators.new(options).run end
add_to_team()
click to toggle source
# File lib/teachers_pet/commands/add_to_team.rb, line 9 def add_to_team TeachersPet::Actions::AddToTeam.new(options).run end
clone_repos()
click to toggle source
# File lib/teachers_pet/commands/clone_repos.rb, line 11 def clone_repos TeachersPet::Actions::CloneRepos.new(options).run end
create_repos()
click to toggle source
# File lib/teachers_pet/commands/create_repos.rb, line 11 def create_repos TeachersPet::Actions::CreateRepos.new(options).run end
create_student_teams()
click to toggle source
# File lib/teachers_pet/commands/create_student_teams.rb, line 9 def create_student_teams TeachersPet::Actions::CreateStudentTeams.new(options).run end
forks()
click to toggle source
# File lib/teachers_pet/commands/forks.rb, line 8 def forks TeachersPet::Actions::Forks.new(options).run end
merge_pull_requests()
click to toggle source
# File lib/teachers_pet/commands/merge_pull_requests.rb, line 7 def merge_pull_requests TeachersPet::Actions::MergePullRequests.new(options).run end
open_issue()
click to toggle source
# File lib/teachers_pet/commands/open_issue.rb, line 14 def open_issue TeachersPet::Actions::OpenIssue.new(options).run end
push_files()
click to toggle source
# File lib/teachers_pet/commands/push_files.rb, line 11 def push_files TeachersPet::Actions::PushFiles.new(options).run end