class Abt::Providers::Devops::Commands::Current
Public Class Methods
description()
click to toggle source
# File lib/abt/providers/devops/commands/current.rb, line 12 def self.description "Get or set DevOps configuration for current git repository" end
usage()
click to toggle source
# File lib/abt/providers/devops/commands/current.rb, line 8 def self.usage "abt current devops[:<organization-name>/<project-name>/<board-id>[/<work-item-id>]]" end
Public Instance Methods
perform()
click to toggle source
# File lib/abt/providers/devops/commands/current.rb, line 16 def perform require_local_config! require_board! ensure_valid_configuration! if path != config.path && config.local_available? config.path = path warn("Configuration updated") end print_configuration end
Private Instance Methods
ensure_valid_configuration!()
click to toggle source
# File lib/abt/providers/devops/commands/current.rb, line 39 def ensure_valid_configuration! if board.nil? abort("Board could not be found, ensure that settings for organization, project, and board are correct") end abort("No such work item: ##{work_item_id}") if work_item_id && work_item.nil? end
print_configuration()
click to toggle source
# File lib/abt/providers/devops/commands/current.rb, line 31 def print_configuration if work_item_id.nil? print_board(organization_name, project_name, team_name, board) else print_work_item(organization_name, project_name, team_name, board, work_item) end end