Class: Match::TablePrinter

Inherits:
Object
  • Object
show all
Defined in:
lib/match/table_printer.rb

Class Method Summary collapse

Class Method Details

logs public key’s name, user, organisation, country, availability dates



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/match/table_printer.rb', line 4

def self.print_certificate_info(cert_info: nil)
  params = {
    rows: cert_info,
    title: "Installed Certificate".green
  }

  puts ""
  puts Terminal::Table.new(params)
  puts ""
rescue => ex
  UI.error(ex)
end


17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/match/table_printer.rb', line 17

def self.print_summary(app_identifier: nil, type: nil)
  rows = []

  type = type.to_sym

  rows << ["App Identifier", "", app_identifier]
  rows << ["Type", "", type]

  {
    Utils.environment_variable_name(app_identifier: app_identifier, type: type) => "Profile UUID",
    Utils.environment_variable_name_profile_name(app_identifier: app_identifier, type: type) => "Profile Name",
    Utils.environment_variable_name_team_id(app_identifier: app_identifier, type: type) => "Development Team ID"
  }.each do |env_key, name|
    rows << [name, env_key, ENV[env_key]]
  end

  params = {}
  params[:rows] = rows
  params[:title] = "Installed Provisioning Profile".green
  params[:headings] = ['Parameter', 'Environment Variable', 'Value']

  puts ""
  puts Terminal::Table.new(params)
  puts ""
end