Class: BranchIOCLI::Commands::ValidateCommand
- Defined in:
- lib/branch_io_cli/commands/validate_command.rb
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
-
#initialize(options) ⇒ ValidateCommand
constructor
A new instance of ValidateCommand.
- #run! ⇒ Object
Methods inherited from Command
Constructor Details
#initialize(options) ⇒ ValidateCommand
Returns a new instance of ValidateCommand.
4 5 6 7 |
# File 'lib/branch_io_cli/commands/validate_command.rb', line 4 def initialize() super config_helper. end |
Instance Method Details
#run! ⇒ Object
9 10 11 12 13 14 15 16 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 42 43 |
# File 'lib/branch_io_cli/commands/validate_command.rb', line 9 def run! # raises xcodeproj = config_helper.xcodeproj valid = true unless .domains.nil? || .domains.empty? domains_valid = helper.validate_project_domains( .domains, xcodeproj, .target ) if domains_valid say "Project domains match :domains parameter: ✅" else say "Project domains do not match specified :domains" helper.errors.each { |error| say " #{error}" } end valid &&= domains_valid end configuration_valid = helper.validate_team_and_bundle_ids_from_aasa_files xcodeproj, .target unless configuration_valid say "Universal Link configuration failed validation." helper.errors.each { |error| say " #{error}" } end valid &&= configuration_valid say "Universal Link configuration passed validation. ✅" if valid valid end |