Class: TeachersPet::Cli
- Inherits:
-
Thor
- Object
- Thor
- TeachersPet::Cli
- Defined in:
- lib/teachers_pet/cli.rb,
lib/teachers_pet/commands/forks.rb,
lib/teachers_pet/commands/open_issue.rb,
lib/teachers_pet/commands/push_files.rb,
lib/teachers_pet/commands/add_to_team.rb,
lib/teachers_pet/commands/clone_repos.rb,
lib/teachers_pet/commands/create_repos.rb,
lib/teachers_pet/commands/add_collaborators.rb,
lib/teachers_pet/commands/merge_pull_requests.rb,
lib/teachers_pet/commands/create_student_teams.rb
Class Method Summary collapse
-
.common_options ⇒ Object
TODO figure out a way to display options as groups.
- .students_option ⇒ Object
Instance Method Summary collapse
- #add_collaborators ⇒ Object
- #add_to_team ⇒ Object
- #clone_repos ⇒ Object
- #create_repos ⇒ Object
- #create_student_teams ⇒ Object
- #forks ⇒ Object
- #merge_pull_requests ⇒ Object
- #open_issue ⇒ Object
- #push_files ⇒ Object
Class Method Details
.common_options ⇒ Object
TODO figure out a way to display options as groups
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/teachers_pet/cli.rb', line 7 def self. 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 ⇒ Object
18 19 20 |
# 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 |
Instance Method Details
#add_collaborators ⇒ Object
9 10 11 |
# File 'lib/teachers_pet/commands/add_collaborators.rb', line 9 def add_collaborators TeachersPet::Actions::AddCollaborators.new().run end |
#add_to_team ⇒ Object
9 10 11 |
# File 'lib/teachers_pet/commands/add_to_team.rb', line 9 def add_to_team TeachersPet::Actions::AddToTeam.new().run end |
#clone_repos ⇒ Object
11 12 13 |
# File 'lib/teachers_pet/commands/clone_repos.rb', line 11 def clone_repos TeachersPet::Actions::CloneRepos.new().run end |
#create_repos ⇒ Object
11 12 13 |
# File 'lib/teachers_pet/commands/create_repos.rb', line 11 def create_repos TeachersPet::Actions::CreateRepos.new().run end |
#create_student_teams ⇒ Object
9 10 11 |
# File 'lib/teachers_pet/commands/create_student_teams.rb', line 9 def create_student_teams TeachersPet::Actions::CreateStudentTeams.new().run end |
#forks ⇒ Object
8 9 10 |
# File 'lib/teachers_pet/commands/forks.rb', line 8 def forks TeachersPet::Actions::Forks.new().run end |
#merge_pull_requests ⇒ Object
7 8 9 |
# File 'lib/teachers_pet/commands/merge_pull_requests.rb', line 7 def merge_pull_requests TeachersPet::Actions::MergePullRequests.new().run end |
#open_issue ⇒ Object
14 15 16 |
# File 'lib/teachers_pet/commands/open_issue.rb', line 14 def open_issue TeachersPet::Actions::OpenIssue.new().run end |
#push_files ⇒ Object
11 12 13 |
# File 'lib/teachers_pet/commands/push_files.rb', line 11 def push_files TeachersPet::Actions::PushFiles.new().run end |