class Sem::Views::Projects

Public Class Methods

attach_first_secret(project) click to toggle source
# File lib/sem/views/projects.rb, line 29
def self.attach_first_secret(project)
  puts "You don't have any secrets on this project."
  puts ""
  puts "Add your first secret:"
  puts ""
  puts "  sem projects:secrets:add #{project.full_name} SECRETS_NAME"
  puts ""
end
info(project) click to toggle source
# File lib/sem/views/projects.rb, line 20
def self.info(project)
  print_table [
    ["ID", project.id],
    ["Name", project.full_name],
    ["Created", project.created_at],
    ["Updated", project.updated_at]
  ]
end
list(projects) click to toggle source
# File lib/sem/views/projects.rb, line 10
def self.list(projects)
  header = ["ID", "NAME"]

  body = projects.map do |project|
    [project.id, project.full_name]
  end

  print_table([header, *body])
end
setup_first_project() click to toggle source
# File lib/sem/views/projects.rb, line 3
def self.setup_first_project
  puts "You don't have any project configured on Semaphore."
  puts ""
  puts "Add your first project: https://semaphoreci.com/new"
  puts ""
end