Module: Match

Defined in:
lib/match.rb,
lib/match/nuke.rb,
lib/match/setup.rb,
lib/match/utils.rb,
lib/match/runner.rb,
lib/match/encrypt.rb,
lib/match/options.rb,
lib/match/version.rb,
lib/match/generator.rb,
lib/match/git_helper.rb,
lib/match/table_printer.rb,
lib/match/change_password.rb,
lib/match/spaceship_ensure.rb,
lib/match/commands_generator.rb

Defined Under Namespace

Classes: ChangePassword, CommandsGenerator, Encrypt, Generator, GitHelper, Nuke, Options, Runner, Setup, SpaceshipEnsure, TablePrinter, Utils

Constant Summary collapse

Helper =

you gotta love Ruby: Helper.* should use the Helper class contained in FastlaneCore

FastlaneCore::Helper
UI =
FastlaneCore::UI
ROOT =
Pathname.new(File.expand_path('../..', __FILE__))
VERSION =
"1.0.0"
DESCRIPTION =
"Easily sync your certificates and profiles across your team using git"

Class Method Summary collapse

Class Method Details

.cert_type_sym(type) ⇒ Object



52
53
54
55
56
# File 'lib/match.rb', line 52

def self.cert_type_sym(type)
  return :enterprise if self.type_is_enterprise? type
  return :development if type == "development"
  return :distribution
end

.enterprise?Boolean

Returns true if the unsupported enterprise mode should be enabled

Returns:

  • (Boolean)

    returns true if the unsupported enterprise mode should be enabled



30
31
32
33
34
35
36
37
38
# File 'lib/match.rb', line 30

def self.enterprise?
  force_enterprise = ENV["MATCH_FORCE_ENTERPRISE"]

  return false if (force_enterprise.kind_of?(String) || force_enterprise.kind_of?(Numeric)) &&
                  (force_enterprise.to_s == "0")
  return false if force_enterprise.kind_of?(String) &&
                  (force_enterprise == "" || force_enterprise.casecmp("false") == 0 || force_enterprise.casecmp("no") == 0)
  return !!force_enterprise
end

.environmentsObject



23
24
25
26
27
# File 'lib/match.rb', line 23

def self.environments
  envs = %w(appstore adhoc development)
  envs << "enterprise" if self.enterprise?
  return envs
end

.profile_type_sym(type) ⇒ Object



45
46
47
48
49
50
# File 'lib/match.rb', line 45

def self.profile_type_sym(type)
  return :enterprise if self.type_is_enterprise? type
  return :adhoc if type == "adhoc"
  return :appstore if type == "appstore"
  return :development
end

.type_is_enterprise?(type) ⇒ Boolean

Returns true if match should interpret the given [certificate|profile] type as an enterprise one

Returns:

  • (Boolean)

    returns true if match should interpret the given [certificate|profile] type as an enterprise one



41
42
43
# File 'lib/match.rb', line 41

def self.type_is_enterprise?(type)
  Match.enterprise? && type != "development"
end